[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src/traverso Interface.cpp Interface.h...
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso/src/traverso Interface.cpp Interface.h... |
Date: |
Tue, 03 Apr 2007 14:17:50 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/04/03 14:17:50
Modified files:
src/traverso : Interface.cpp Interface.h traverso.pro
src/traverso/ui: SongManagerDialog.ui
src/traverso/widgets: InfoWidgets.cpp InfoWidgets.h
Added files:
src/traverso/ui: NewSongDialog.ui
Log message:
Added 'NewSongDialog', reworked SongManager Dialog a bit to also make
use of it.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.cpp?cvsroot=traverso&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.h?cvsroot=traverso&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/traverso.pro?cvsroot=traverso&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/SongManagerDialog.ui?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/NewSongDialog.ui?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.cpp?cvsroot=traverso&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.h?cvsroot=traverso&r1=1.3&r2=1.4
Patches:
Index: Interface.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- Interface.cpp 30 Mar 2007 10:37:05 -0000 1.51
+++ Interface.cpp 3 Apr 2007 14:17:50 -0000 1.52
@@ -51,6 +51,7 @@
#include "dialogs/CDTextDialog.h"
#include "dialogs/MarkerDialog.h"
#include "dialogs/BusSelectorDialog.h"
+#include <dialogs/NewSongDialog.h>
// Always put me below _all_ includes, this is needed
@@ -172,6 +173,8 @@
m_cdTextDialog = 0;
m_markerDialog = 0;
m_busSelector = 0;
+ m_newSongDialog = 0;
+ m_newTrackDialog = 0;
create_menus();
@@ -769,4 +772,16 @@
pm().get_undogroup()->redo();
}
+Command* Interface::show_newsong_dialog()
+{
+ if (! m_newSongDialog) {
+ m_newSongDialog = new NewSongDialog(this);
+ }
+
+ m_newSongDialog->show();
+
+ return 0;
+}
+
// eof
+
Index: Interface.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- Interface.h 29 Mar 2007 11:13:02 -0000 1.24
+++ Interface.h 3 Apr 2007 14:17:50 -0000 1.25
@@ -60,6 +60,8 @@
class CDTextDialog;
class MarkerDialog;
class BusSelectorDialog;
+class NewSongDialog;
+class NewTrackDialog;
class Interface : public QMainWindow
{
@@ -105,6 +107,9 @@
InfoToolBar* m_infoBar;
SysInfoToolBar* m_sysinfo;
BusSelectorDialog* m_busSelector;
+ NewSongDialog* m_newSongDialog;
+ NewTrackDialog* m_newTrackDialog;
+
BusMonitor* busMonitor;
Help* helpWindow;
@@ -144,6 +149,7 @@
Command* show_project_manager_dialog();
Command* show_cdtext_dialog();
Command* show_marker_dialog();
+ Command* show_newsong_dialog();
private slots:
void delete_songwidget(Song*);
Index: traverso.pro
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/traverso.pro,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- traverso.pro 2 Apr 2007 09:52:31 -0000 1.36
+++ traverso.pro 3 Apr 2007 14:17:50 -0000 1.37
@@ -52,7 +52,8 @@
widgets/MessageWidget.h \
dialogs/CDTextDialog.h \
dialogs/MarkerDialog.h \
- dialogs/BusSelectorDialog.h
+ dialogs/BusSelectorDialog.h \
+ dialogs/NewSongDialog.h
SOURCES += \
Traverso.cpp \
AudioSourcesTreeWidget.cpp \
@@ -80,7 +81,8 @@
widgets/MessageWidget.cpp \
dialogs/CDTextDialog.cpp \
dialogs/MarkerDialog.cpp \
- dialogs/BusSelectorDialog.cpp
+ dialogs/BusSelectorDialog.cpp \
+ dialogs/NewSongDialog.cpp
FORMS += ui/ExportWidget.ui \
ui/AudioSourcesManagerWidget.ui \
ui/PluginSelectorDialog.ui \
@@ -97,7 +99,8 @@
ui/ProjectManagerDialog.ui \
ui/MarkerDialog.ui \
ui/CDTextDialog.ui \
- ui/BusSelectorDialog.ui
+ ui/BusSelectorDialog.ui \
+ ui/NewSongdialog.ui \
INCLUDEPATH += ../core \
Index: ui/SongManagerDialog.ui
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ui/SongManagerDialog.ui,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ui/SongManagerDialog.ui 21 Mar 2007 19:21:26 -0000 1.4
+++ ui/SongManagerDialog.ui 3 Apr 2007 14:17:50 -0000 1.5
@@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>530</width>
- <height>414</height>
+ <height>236</height>
</rect>
</property>
<property name="maximumSize" >
@@ -26,31 +26,33 @@
<number>6</number>
</property>
<item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
<widget class="QTreeWidget" name="treeSongWidget" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
- <horstretch>0</horstretch>
+ <horstretch>2</horstretch>
<verstretch>5</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
- <width>400</width>
+ <width>250</width>
<height>120</height>
</size>
</property>
- <property name="maximumSize" >
- <size>
- <width>530</width>
- <height>200</height>
- </size>
- </property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
+ <layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
@@ -110,6 +112,9 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Preferred</enum>
+ </property>
<property name="sizeHint" >
<size>
<width>40</width>
@@ -131,26 +136,11 @@
</widget>
</item>
<item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>New Song</string>
</property>
- <layout class="QVBoxLayout" >
+ <layout class="QHBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
@@ -166,113 +156,33 @@
<number>6</number>
</property>
<item>
- <widget class="QLabel" name="label_3_2_2_2_2_2" >
+ <widget class="QPushButton" name="createSongButton" >
<property name="text" >
- <string><html><head><meta name="qrichtext" content="1"
/></head><body style=" white-space: pre-wrap; font-family:Bitstream Vera
Sans; font-weight:400; font-style:normal; text-decoration:none;"><p style="
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0; text-indent:0px;">Name</p></body></html></string>
+ <string>Create new Song</string>
</property>
</widget>
</item>
- <item>
- <widget class="QLineEdit" name="newSongNameLineEdit" />
- </item>
</layout>
</item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="label_2_2_2_2_2_2_2" >
- <property name="text" >
- <string><html><head><meta name="qrichtext" content="1"
/></head><body style=" white-space: pre-wrap; font-family:Bitstream Vera
Sans; font-weight:400; font-style:normal; text-decoration:none;"><p style="
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0;
text-indent:0px;">Artists</p></body></html></string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="artistsLineEdit" >
- <property name="minimumSize" >
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
</layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="label" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>2</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Track count</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="trackCountSpinBox" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
</widget>
</item>
</layout>
</item>
<item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
<spacer>
<property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
- <width>40</width>
- <height>20</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
</spacer>
</item>
- <item>
- <widget class="QPushButton" name="createSongButton" >
- <property name="text" >
- <string>Create</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
- </widget>
</item>
</layout>
</item>
@@ -291,38 +201,6 @@
<resources/>
<connections>
<connection>
- <sender>newSongNameLineEdit</sender>
- <signal>returnPressed()</signal>
- <receiver>createSongButton</receiver>
- <slot>animateClick()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>397</x>
- <y>239</y>
- </hint>
- <hint type="destinationlabel" >
- <x>479</x>
- <y>270</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>artistsLineEdit</sender>
- <signal>returnPressed()</signal>
- <receiver>createSongButton</receiver>
- <slot>animateClick()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>398</x>
- <y>272</y>
- </hint>
- <hint type="destinationlabel" >
- <x>449</x>
- <y>270</y>
- </hint>
- </hints>
- </connection>
- <connection>
<sender>selectedSongName</sender>
<signal>returnPressed()</signal>
<receiver>renameSongButton</receiver>
Index: widgets/InfoWidgets.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- widgets/InfoWidgets.cpp 21 Mar 2007 15:09:55 -0000 1.5
+++ widgets/InfoWidgets.cpp 3 Apr 2007 14:17:50 -0000 1.6
@@ -28,6 +28,7 @@
#include <Utils.h>
#include "QuickDriverConfigWidget.h"
#include "MessageWidget.h"
+#include <Interface.h>
#include <QPixmap>
#include <QByteArray>
@@ -410,13 +411,13 @@
void SongSelector::song_added(Song * song)
{
- connect(song, SIGNAL(propertieChanged()), this, SLOT(update_songs()));
+ connect(song, SIGNAL(propertyChanged()), this, SLOT(update_songs()));
update_songs();
}
void SongSelector::song_removed(Song * song)
{
- disconnect(song, SIGNAL(propertieChanged()), this,
SLOT(update_songs()));
+ disconnect(song, SIGNAL(propertyChanged()), this, SLOT(update_songs()));
update_songs();
}
@@ -588,10 +589,10 @@
, m_song(0)
, m_project(0)
{
- QPalette pallet;
+/* QPalette pallet;
pallet.setColor(QPalette::Background, QColor("#FFF4FF"));
setPalette(pallet);
- setAutoFillBackground(true);
+ setAutoFillBackground(true);*/
setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
connect(&pm(), SIGNAL(projectLoaded(Project*)), this,
SLOT(set_project(Project*)));
@@ -643,9 +644,12 @@
m_record->setMaximumHeight(22);
QMenu* menu = new QMenu;
- menu->addAction("Track");
- menu->addAction("Song");
- menu->addAction("Song using template");
+ QAction* action = menu->addAction("Track");
+ connect(action, SIGNAL(triggered()), this, SLOT(add_new_track()));
+
+ action = menu->addAction("Song");
+ connect(action, SIGNAL(triggered()), this, SLOT(add_new_song()));
+
m_addNew->setMenu(menu);
connect(m_snap, SIGNAL(activated(int)), this,
SLOT(snap_combo_index_changed(int)));
@@ -721,6 +725,16 @@
}
}
+
+void SongInfo::add_new_song()
+{
+ Interface::instance()->show_newsong_dialog();
+}
+
+void SongInfo::add_new_track()
+{
+}
+
QSize SongInfo::sizeHint() const
{
if (m_orientation == Qt::Horizontal) {
Index: widgets/InfoWidgets.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- widgets/InfoWidgets.h 16 Mar 2007 00:10:26 -0000 1.3
+++ widgets/InfoWidgets.h 3 Apr 2007 14:17:50 -0000 1.4
@@ -211,6 +211,8 @@
private slots:
void song_snap_changed();
void snap_combo_index_changed(int index);
+ void add_new_song();
+ void add_new_track();
private:
PlayHeadInfo* m_playhead;
Index: ui/NewSongDialog.ui
===================================================================
RCS file: ui/NewSongDialog.ui
diff -N ui/NewSongDialog.ui
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ui/NewSongDialog.ui 3 Apr 2007 14:17:50 -0000 1.1
@@ -0,0 +1,215 @@
+<ui version="4.0" >
+ <class>NewSongDialog</class>
+ <widget class="QDialog" name="NewSongDialog" >
+ <property name="windowModality" >
+ <enum>Qt::NonModal</enum>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>286</width>
+ <height>174</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>New Song(s)</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>New Song name</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Song count</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Track count</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="useTemplateCheckBox" >
+ <property name="text" >
+ <string>Use Template</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLineEdit" name="titleLineEdit" />
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="countSpinBox" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum" >
+ <number>1</number>
+ </property>
+ <property name="value" >
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="trackCountSpinBox" >
+ <property name="windowModality" >
+ <enum>Qt::NonModal</enum>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QComboBox" name="templateComboBox" />
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons" >
+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>NewSongDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>NewSongDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src/traverso Interface.cpp Interface.h...,
Remon Sijrier <=