[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso src/traverso/Interface.cpp src/travers...
From: |
Nicola Doebelin |
Subject: |
[Traverso-commit] traverso src/traverso/Interface.cpp src/travers... |
Date: |
Mon, 12 May 2008 16:47:52 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Nicola Doebelin <n_doebelin> 08/05/12 16:47:51
Modified files:
src/traverso : Interface.cpp Interface.h traverso.qrc
src/traverso/widgets: InfoWidgets.cpp InfoWidgets.h
Added files:
resources/images/icons: application-exit.png
application-exit.svgz
archive-extract.png archive-extract.svgz
document-export.png document-export.svgz
document-import.png document-import.svgz
document-new.png document-new.svgz
document-open.png document-open.svgz
document-save.png document-save.svgz
edit-redo.png edit-redo.svgz
edit-undo.png edit-undo.svgz
media-playback-start.png
media-playback-start.svgz
media-playback-stop.png
media-playback-stop.svgz
media-record.png media-record.svgz
project-open.png project-open.svgz
tab-new-background.png
tab-new-background.svgz
tools-media-optical-burn.png
tools-media-optical-burn.svgz
Log message:
* This is the first step of moving the actions of the InfoToolBar into
the application menu. More will follow.
* New icons from the KDE4 Oxygen theme. Currently used in PNG format,
later (hopefully) in SVG.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/application-exit.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/application-exit.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/archive-extract.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/archive-extract.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-export.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-export.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-import.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-import.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-new.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-new.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-open.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-open.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-save.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/document-save.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/edit-redo.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/edit-redo.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/edit-undo.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/edit-undo.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/media-playback-start.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/media-playback-start.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/media-playback-stop.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/media-playback-stop.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/media-record.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/media-record.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/project-open.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/project-open.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/tab-new-background.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/tab-new-background.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/tools-media-optical-burn.png?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/resources/images/icons/tools-media-optical-burn.svgz?cvsroot=traverso&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.cpp?cvsroot=traverso&r1=1.134&r2=1.135
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.h?cvsroot=traverso&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/traverso.qrc?cvsroot=traverso&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.cpp?cvsroot=traverso&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.h?cvsroot=traverso&r1=1.22&r2=1.23
Patches:
Index: src/traverso/Interface.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.cpp,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -b -r1.134 -r1.135
--- src/traverso/Interface.cpp 12 May 2008 10:33:29 -0000 1.134
+++ src/traverso/Interface.cpp 12 May 2008 16:47:50 -0000 1.135
@@ -201,6 +201,7 @@
cpointer().add_contextitem(this);
connect(&config(), SIGNAL(configChanged()), this,
SLOT(config_changed()));
+ update_follow_state();
}
Interface::~Interface()
@@ -222,6 +223,8 @@
{
PENTER;
+ m_project = project;
+
if ( project ) {
connect(project, SIGNAL(currentSheetChanged(Sheet*)), this,
SLOT(show_sheet(Sheet*)));
setWindowTitle(project->get_title() + " - Traverso");
@@ -290,8 +293,20 @@
m_sheetWidgets.insert(0, sheetWidget);
}
}
+ m_snapAction->setEnabled(false);
+ m_effectAction->setEnabled(false);
+ m_followAction->setEnabled(false);
} else {
sheetWidget = m_sheetWidgets.value(sheet);
+ connect(sheet, SIGNAL(snapChanged()), this,
SLOT(update_snap_state()));
+ connect(sheet, SIGNAL(modeChanged()), this,
SLOT(update_effects_state()));
+ connect(sheet, SIGNAL(tempFollowChanged(bool)), this,
SLOT(update_temp_follow_state(bool)));
+ connect(sheet, SIGNAL(transferStopped()), this,
SLOT(update_follow_state()));
+ update_snap_state();
+ update_effects_state();
+ m_snapAction->setEnabled(true);
+ m_effectAction->setEnabled(true);
+ m_followAction->setEnabled(true);
}
if (!sheetWidget) {
@@ -449,23 +464,34 @@
m_projectMenu = menuBar()->addMenu(tr("&Project"));
action = m_projectMenu->addAction(tr("&New..."));
- action->setIcon(find_pixmap(":/new-16"));
+ action->setIcon(find_pixmap(":/new"));
action->setShortcuts(QKeySequence::New);
connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_newproject_dialog()));
action = m_projectMenu->addAction(tr("&Open..."));
-
action->setIcon(style()->standardIcon(QStyle::SP_FileDialogContentsView));
+//
action->setIcon(style()->standardIcon(QStyle::SP_FileDialogContentsView));
+ action->setIcon(QIcon(":/open"));
action->setShortcuts(QKeySequence::Open);
connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_open_project_dialog()));
- m_projectMenu->addSeparator();
-
action = m_projectMenu->addAction(tr("&Save"));
- action->setShortcuts(QKeySequence::Save);
m_projectSaveAction = action;
- action->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
+ action->setShortcuts(QKeySequence::Save);
+// action->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
+ action->setIcon(QIcon(":/save"));
connect(action, SIGNAL(triggered(bool)), &pm(), SLOT(save_project()));
+ m_projectMenu->addSeparator();
+
+ action = m_projectMenu->addAction(tr("Import &Audio..."));
+ action->setIcon(QIcon(":/import-audio"));
+ connect(action, SIGNAL(triggered()), this, SLOT(import_audio()));
+ action = m_projectMenu->addAction(tr("Insert Si&lence..."));
+ action->setIcon(QIcon(":/import-silence"));
+ connect(action, SIGNAL(triggered()), this,
SLOT(show_insertsilence_dialog()));
+
+ m_projectMenu->addSeparator();
+
action = m_projectMenu->addAction(tr("&Manage Project..."));
QList<QKeySequence> list;
list.append(QKeySequence("F4"));
@@ -478,7 +504,8 @@
list.clear();
list.append(QKeySequence("F9"));
action->setShortcuts(list);
- action->setIcon(style()->standardIcon(QStyle::SP_DialogApplyButton));
+// action->setIcon(style()->standardIcon(QStyle::SP_DialogApplyButton));
+ action->setIcon(QIcon(":/export"));
m_projectExportAction = action;
connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_export_widget()));
@@ -486,14 +513,16 @@
list.clear();
list.append(QKeySequence("F8"));
action->setShortcuts(list);
- action->setIcon(style()->standardIcon(QStyle::SP_DialogApplyButton));
+// action->setIcon(style()->standardIcon(QStyle::SP_DialogApplyButton));
+ action->setIcon(QIcon(":/write-cd"));
connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_cd_writing_dialog()));
action = m_projectMenu->addAction(tr("&Restore Backup..."));
list.clear();
list.append(QKeySequence("F10"));
action->setShortcuts(list);
- action->setIcon(style()->standardIcon(QStyle::SP_FileDialogBack));
+// action->setIcon(style()->standardIcon(QStyle::SP_FileDialogBack));
+ action->setIcon(QIcon(":/restore"));
connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_restore_project_backup_dialog()));
m_projectMenu->addSeparator();
@@ -502,29 +531,34 @@
list.clear();
list.append(QKeySequence("CTRL+Q"));
action->setShortcuts(list);
- action->setIcon(QIcon(find_pixmap(":/exit-16")));
+ action->setIcon(QIcon(":/exit"));
connect(action, SIGNAL(triggered( bool )), &pm(), SLOT(exit()));
+ m_editMenu = menuBar()->addMenu(tr("&Edit"));
- m_sheetMenu = menuBar()->addMenu(tr("&Sheet"));
- m_sheetMenuAction = m_sheetMenu->menuAction();
-
- action = m_sheetMenu->addAction(tr("New &Track(s)..."));
- connect(action, SIGNAL(triggered()), this,
SLOT(show_newtrack_dialog()));
- action = m_sheetMenu->addAction(tr("New &Sheet(s)..."));
- connect(action, SIGNAL(triggered()), this,
SLOT(show_newsheet_dialog()));
+ action = m_editMenu->addAction(tr("Undo"));
+ action->setIcon(QIcon(":/undo"));
+ connect(action, SIGNAL(triggered( bool )), &pm(), SLOT(undo()));
+ action = m_editMenu->addAction(tr("Redo"));
+ action->setIcon(QIcon(":/redo"));
+ connect(action, SIGNAL(triggered( bool )), &pm(), SLOT(redo()));
+
+
+ m_snapAction = m_editMenu->addAction(tr("&Snap"));
+ m_snapAction->setCheckable(true);
+ m_snapAction->setToolTip(tr("Snap items to edges of other items while
dragging."));
+ connect(m_snapAction, SIGNAL(triggered(bool)), this,
SLOT(snap_state_changed(bool)));
+
+ m_followAction = m_editMenu->addAction(tr("S&croll Playback"));
+ m_followAction->setCheckable(true);
+ m_followAction->setToolTip(tr("Keep play cursor in view while playing
or recording."));
+ connect(m_followAction, SIGNAL(triggered(bool)), this,
SLOT(follow_state_changed(bool)));
+
+ m_effectAction = m_editMenu->addAction(tr("&Show Effects"));
+ m_effectAction->setCheckable(true);
+ m_effectAction->setToolTip(tr("Show effect plugins and automation
curves on tracks"));
+ connect(m_effectAction, SIGNAL(triggered(bool)), this,
SLOT(effect_state_changed(bool)));
- m_sheetMenu->addSeparator();
-
- action = m_sheetMenu->addAction(tr("Marker Editor..."));
- connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_marker_dialog()));
-
- m_sheetMenu->addSeparator();
-
- action = m_sheetMenu->addAction(tr("Import &Audio..."));
- connect(action, SIGNAL(triggered()), this, SLOT(import_audio()));
- action = m_sheetMenu->addAction(tr("Insert Si&lence..."));
- connect(action, SIGNAL(triggered()), this,
SLOT(show_insertsilence_dialog()));
m_viewMenu = menuBar()->addMenu(tr("&View"));
@@ -533,6 +567,9 @@
m_viewMenu->addAction(busMonitorDW->toggleViewAction());
m_viewMenu->addAction(AudioSourcesDW->toggleViewAction());
+ action = m_viewMenu->addAction(tr("Marker Editor..."));
+ connect(action, SIGNAL(triggered(bool)), this,
SLOT(show_marker_dialog()));
+
m_viewMenu->addSeparator();
m_viewMenu->addAction(correlationMeterDW->toggleViewAction());
@@ -546,6 +583,19 @@
m_sysinfo->toggleViewAction()->setText(tr("System Information"));
+ m_sheetMenu = menuBar()->addMenu(tr("&Sheet"));
+ m_sheetMenuAction = m_sheetMenu->menuAction();
+
+ action = m_sheetMenu->addAction(tr("New &Sheet(s)..."));
+ action->setIcon(QIcon(":/new-sheet"));
+ connect(action, SIGNAL(triggered()), this,
SLOT(show_newsheet_dialog()));
+
+ action = m_sheetMenu->addAction(tr("New &Track(s)..."));
+ connect(action, SIGNAL(triggered()), this,
SLOT(show_newtrack_dialog()));
+
+ m_sheetMenu->addSeparator();
+
+
m_settingsMenu = menuBar()->addMenu(tr("Se&ttings"));
m_encodingMenu = m_settingsMenu->addMenu(tr("&Recording File Format"));
@@ -579,11 +629,6 @@
m_settingsMenu->addSeparator();
- m_settingsMenu->addAction(m_infoBar->get_snap_action());
- m_settingsMenu->addAction(m_infoBar->get_follow_action());
-
- m_settingsMenu->addSeparator();
-
action = m_settingsMenu->addAction(tr("&Preferences..."));
connect(action, SIGNAL(triggered( bool )), this,
SLOT(show_settings_dialog()));
@@ -1308,9 +1353,8 @@
Command * Interface::set_recordable_and_start_transport()
{
- Project* project = pm().get_project();
- if (project) {
- Sheet* sheet = project->get_current_sheet();
+ if (m_project) {
+ Sheet* sheet = m_project->get_current_sheet();
if (sheet) {
return sheet->set_recordable_and_start_transport();
}
@@ -1318,3 +1362,84 @@
return 0;
}
+
+// snapping is a global property and should be stored in each sheet
+void Interface::snap_state_changed(bool state)
+{
+ if (m_project) {
+ QList<Sheet* > sheetlist = m_project->get_sheets();
+ foreach( Sheet* sheet, sheetlist) {
+ sheet->set_snapping(state);
+ }
+ }
+}
+
+void Interface::update_snap_state()
+{
+ if (m_project) {
+ bool snapping = m_project->get_current_sheet()->is_snap_on();
+ m_snapAction->setChecked(snapping);
+ }
+}
+
+// scrolling is a global property but should not be stored in the sheets
+void Interface::update_follow_state()
+{
+ m_isFollowing = config().get_property("PlayHead", "Follow",
true).toBool();
+ m_followAction->setChecked(m_isFollowing);
+}
+
+void Interface::update_temp_follow_state(bool state)
+{
+ if (m_project->get_current_sheet()->is_transport_rolling() &&
m_isFollowing) {
+ m_followAction->setChecked(state);
+ }
+}
+
+void Interface::follow_state_changed(bool state)
+{
+ Sheet* sheet = m_project->get_current_sheet();
+
+ if (!sheet) {
+ return;
+ }
+
+ if (!sheet->is_transport_rolling() || !m_isFollowing) {
+ m_isFollowing = state;
+ config().set_property("PlayHead", "Follow", state);
+ config().save();
+ if (sheet->is_transport_rolling()) {
+ sheet->set_temp_follow_state(state);
+ }
+ } else {
+ sheet->set_temp_follow_state(state);
+ }
+}
+
+// the view mode is a sheet property and should be stored in the sheet
+void Interface::effect_state_changed(bool state)
+{
+ Sheet* sheet = m_project->get_current_sheet();
+
+ if (state) {
+ sheet->set_effects_mode();
+ } else {
+ sheet->set_editing_mode();
+ }
+}
+
+void Interface::update_effects_state()
+{
+ Sheet* sheet = m_project->get_current_sheet();
+
+ if (!sheet) {
+ return;
+ }
+
+ if (sheet->get_mode() == Sheet::EDIT) {
+ m_effectAction->setChecked(false);
+ } else {
+ m_effectAction->setChecked(true);
+ }
+}
+
Index: src/traverso/Interface.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- src/traverso/Interface.h 12 May 2008 10:33:29 -0000 1.53
+++ src/traverso/Interface.h 12 May 2008 16:47:50 -0000 1.54
@@ -129,6 +129,8 @@
NewProjectDialog* m_newProjectDialog;
QDialog* m_quickStart;
RestoreProjectBackupDialog* m_restoreProjectBackupDialog;
+ Project* m_project;
+ bool m_isFollowing;
BusMonitor* busMonitor;
@@ -138,10 +140,14 @@
QAction* m_projectSheetManagerAction;
QAction* m_projectExportAction;
QAction* m_sheetMenuAction;
+ QAction* m_snapAction;
+ QAction* m_followAction;
+ QAction* m_effectAction;
QMenu* m_encodingMenu;
QMenu* m_resampleQualityMenu;
QMenu* m_projectMenu;
QMenu* m_sheetMenu;
+ QMenu* m_editMenu;
QMenu* m_viewMenu;
QMenu* m_settingsMenu;
QMenu* m_helpMenu;
@@ -202,6 +208,13 @@
void project_dir_change_detected();
void project_load_failed(QString project, QString reason);
void project_file_mismatch(QString rootdir, QString projectname);
+ void snap_state_changed(bool state);
+ void update_snap_state();
+ void effect_state_changed(bool state);
+ void update_effects_state();
+ void follow_state_changed(bool state);
+ void update_follow_state();
+ void update_temp_follow_state(bool state);
};
Index: src/traverso/traverso.qrc
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/traverso.qrc,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- src/traverso/traverso.qrc 26 Jan 2008 12:04:49 -0000 1.26
+++ src/traverso/traverso.qrc 12 May 2008 16:47:50 -0000 1.27
@@ -36,19 +36,28 @@
<file
alias="memorysmall">../../resources/images/memory.png</file>
<file
alias="appearance">../../resources/images/appearance.png</file>
<file
alias="performance">../../resources/images/performance.png</file>
- <file
alias="playstart">../../resources/images/player_play.png</file>
- <file
alias="playstop">../../resources/images/player_stop.png</file>
+ <file
alias="playstart">../../resources/images/icons/media-playback-start.png</file>
+ <file
alias="playstop">../../resources/images/icons/media-playback-stop.png</file>
<file
alias="projectmanagement">../../resources/images/icons/32X32/projects.png</file>
<file
alias="sheetmanagement">../../resources/images/icons/32X32/sheets.png</file>
<file
alias="audiosourcesmanagement">../../resources/images/icons/32X32/audiosources.png</file>
- <file
alias="exit-16">../../resources/images/icons/16x16/exit.png</file>
- <file
alias="undo-16">../../resources/images/icons/16x16/undo.png</file>
- <file
alias="redo-16">../../resources/images/icons/16x16/redo.png</file>
+ <file
alias="exit">../../resources/images/icons/application-exit.png</file>
+ <file
alias="undo">../../resources/images/icons/edit-undo.png</file>
+ <file
alias="redo">../../resources/images/icons/edit-redo.png</file>
<file
alias="redled-16">../../resources/images/icons/16x16/redled.png</file>
<file
alias="refresh-16">../../resources/images/icons/16x16/reload.png</file>
<file
alias="redledinactive-16">../../resources/images/icons/16x16/redledinactive.png</file>
<file
alias="sheetmanager-16">../../resources/images/icons/16x16/contents.png</file>
- <file
alias="new-16">../../resources/images/icons/16x16/new.png</file>
+ <file
alias="new">../../resources/images/icons/document-new.png</file>
+ <file
alias="open">../../resources/images/icons/project-open.png</file>
+ <file
alias="save">../../resources/images/icons/document-save.png</file>
+ <file
alias="export">../../resources/images/icons/document-export.png</file>
+ <file
alias="import">../../resources/images/icons/document-import.png</file>
+ <file
alias="restore">../../resources/images/icons/archive-extract.png</file>
+ <file
alias="write-cd">../../resources/images/icons/tools-media-optical-burn.png</file>
+ <file
alias="new-sheet">../../resources/images/icons/tab-new-background.png</file>
+ <file
alias="import-audio">../../resources/images/icons/document-open.png</file>
+ <file
alias="import-silence">../../resources/images/icons/document-import.png</file>
<file
alias="traverso_nl">../../resources/translations/traverso_nl.qm</file>
<file
alias="traverso_de">../../resources/translations/traverso_de.qm</file>
<file
alias="traverso_fr">../../resources/translations/traverso_fr.qm</file>
Index: src/traverso/widgets/InfoWidgets.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- src/traverso/widgets/InfoWidgets.cpp 5 May 2008 16:47:08 -0000
1.58
+++ src/traverso/widgets/InfoWidgets.cpp 12 May 2008 16:47:51 -0000
1.59
@@ -559,47 +559,14 @@
m_playhead = new PlayHeadInfo(this);
- m_snapAct = new QAction(tr("&Snap"), this);
- m_snapAct->setCheckable(true);
- m_snapAct->setToolTip(tr("Snap items to edges of other items while
dragging."));
- connect(m_snapAct, SIGNAL(triggered(bool)), this,
SLOT(snap_state_changed(bool)));
-
- m_followAct = new QAction(tr("S&croll Playback"), this);
- m_followAct->setCheckable(true);
- m_followAct->setToolTip(tr("Keep play cursor in view while playing or
recording."));
- connect(m_followAct, SIGNAL(triggered(bool)), this,
SLOT(follow_state_changed(bool)));
-
- m_effectAct = new QAction(tr("&Show Effects"), this);
- m_effectAct->setCheckable(true);
- m_effectAct->setToolTip(tr("Show effect plugins and automation curves
on tracks"));
- connect(m_effectAct, SIGNAL(triggered(bool)), this,
SLOT(effect_state_changed(bool)));
-
m_recAct = new QAction(tr("Record"), this);
m_recAct->setToolTip(tr("Set Sheet Recordable. <br /><br />Hit Spacebar
afterwards to start recording!"));
connect(m_recAct, SIGNAL(triggered(bool)), this,
SLOT(recording_action_clicked()));
- QAction* undoAction = new QAction(tr("Undo"), this);
- undoAction->setIcon(QIcon(find_pixmap(":/undo-16")));
- undoAction->setShortcuts(QKeySequence::Undo);
- connect(undoAction, SIGNAL(triggered( bool )), &pm(), SLOT(undo()));
-
- QAction* redoAction = new QAction(tr("Redo"), this);
- redoAction->setIcon(QIcon(find_pixmap(":/redo-16")));
- redoAction->setShortcuts(QKeySequence::Redo);
- connect(redoAction, SIGNAL(triggered( bool )), &pm(), SLOT(redo()));
-
// the order in which the actions are added determines the order of
appearance in the toolbar
- addAction(redoAction);
- addAction(undoAction);
- addSeparator();
- addAction(m_snapAct);
- addAction(m_followAct);
addAction(m_recAct);
addWidget(m_playhead);
- addAction(m_effectAct);
addWidget(m_sheetselectbox);
-
- update_follow_state();
}
@@ -632,91 +599,14 @@
m_sheet = sheet;
if (m_sheet) {
- connect(m_sheet, SIGNAL(snapChanged()), this,
SLOT(update_snap_state()));
- connect(m_sheet, SIGNAL(modeChanged()), this,
SLOT(update_effects_state()));
- connect(m_sheet, SIGNAL(tempFollowChanged(bool)), this,
SLOT(update_temp_follow_state(bool)));
connect(m_sheet, SIGNAL(recordingStateChanged()), this,
SLOT(update_recording_state()));
- connect(m_sheet, SIGNAL(transferStopped()), this,
SLOT(update_follow_state()));
- update_snap_state();
- update_effects_state();
- update_recording_state();
- m_snapAct->setEnabled(true);
- m_effectAct->setEnabled(true);
m_recAct->setEnabled(true);
- m_followAct->setEnabled(true);
} else {
- m_snapAct->setEnabled(false);
- m_effectAct->setEnabled(false);
m_recAct->setEnabled(false);
- m_followAct->setEnabled(false);
- }
-}
-
-void InfoToolBar::update_snap_state()
-{
- m_snapAct->setChecked(m_sheet->is_snap_on());
-}
-
-void InfoToolBar::update_effects_state()
-{
- if (!m_sheet) {
- return;
- }
-
- if (m_sheet->get_mode() == Sheet::EDIT) {
- m_effectAct->setChecked(false);
- } else {
- m_effectAct->setChecked(true);
}
}
-void InfoToolBar::snap_state_changed(bool state)
-{
- if (! m_sheet) {
- return;
- }
- m_sheet->set_snapping(state);
-}
-void InfoToolBar::update_follow_state()
-{
- m_isFollowing = config().get_property("PlayHead", "Follow",
true).toBool();
- m_followAct->setChecked(m_isFollowing);
-}
-
-void InfoToolBar::update_temp_follow_state(bool state)
-{
- if (m_sheet->is_transport_rolling() && m_isFollowing) {
- m_followAct->setChecked(state);
- }
-}
-
-void InfoToolBar::follow_state_changed(bool state)
-{
- if (!m_sheet) {
- return;
- }
-
- if (!m_sheet->is_transport_rolling() || !m_isFollowing) {
- m_isFollowing = state;
- config().set_property("PlayHead", "Follow", state);
- config().save();
- if (m_sheet->is_transport_rolling()) {
- m_sheet->set_temp_follow_state(state);
- }
- } else {
- m_sheet->set_temp_follow_state(state);
- }
-}
-
-void InfoToolBar::effect_state_changed(bool state)
-{
- if (state) {
- m_sheet->set_effects_mode();
- } else {
- m_sheet->set_editing_mode();
- }
-}
void InfoToolBar::recording_action_clicked()
{
Index: src/traverso/widgets/InfoWidgets.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- src/traverso/widgets/InfoWidgets.h 5 May 2008 16:47:08 -0000 1.22
+++ src/traverso/widgets/InfoWidgets.h 12 May 2008 16:47:51 -0000 1.23
@@ -176,8 +176,6 @@
Q_OBJECT
public:
InfoToolBar(QWidget* parent);
- QAction *get_snap_action() {return m_snapAct;};
- QAction *get_follow_action() {return m_followAct;};
protected:
Sheet* m_sheet;
@@ -186,11 +184,7 @@
private:
QComboBox* m_sheetselectbox;
PlayHeadInfo* m_playhead;
- QAction* m_snapAct;
- QAction* m_followAct;
QAction* m_recAct;
- QAction* m_effectAct;
- bool m_isFollowing;
protected slots:
void set_project(Project* project);
@@ -202,13 +196,6 @@
void sheet_selector_sheet_added(Sheet* sheet);
void sheet_selector_sheet_removed(Sheet* sheet);
void sheet_selector_update_sheets();
- void update_snap_state();
- void snap_state_changed(bool state);
- void update_follow_state();
- void update_temp_follow_state(bool state);
- void update_effects_state();
- void follow_state_changed(bool state);
- void effect_state_changed(bool state);
void recording_action_clicked();
void update_recording_state();
void project_load_finished();
Index: resources/images/icons/application-exit.png
===================================================================
RCS file: resources/images/icons/application-exit.png
diff -N resources/images/icons/application-exit.png
Binary files /dev/null and /tmp/cvsoHKHDk differ
Index: resources/images/icons/application-exit.svgz
===================================================================
RCS file: resources/images/icons/application-exit.svgz
diff -N resources/images/icons/application-exit.svgz
Binary files /dev/null and /tmp/cvsJT5Xdl differ
Index: resources/images/icons/archive-extract.png
===================================================================
RCS file: resources/images/icons/archive-extract.png
diff -N resources/images/icons/archive-extract.png
Binary files /dev/null and /tmp/cvsSdHlol differ
Index: resources/images/icons/archive-extract.svgz
===================================================================
RCS file: resources/images/icons/archive-extract.svgz
diff -N resources/images/icons/archive-extract.svgz
Binary files /dev/null and /tmp/cvs3aZyOj differ
Index: resources/images/icons/document-export.png
===================================================================
RCS file: resources/images/icons/document-export.png
diff -N resources/images/icons/document-export.png
Binary files /dev/null and /tmp/cvsaMAvZj differ
Index: resources/images/icons/document-export.svgz
===================================================================
RCS file: resources/images/icons/document-export.svgz
diff -N resources/images/icons/document-export.svgz
Binary files /dev/null and /tmp/cvsZbpn4m differ
Index: resources/images/icons/document-import.png
===================================================================
RCS file: resources/images/icons/document-import.png
diff -N resources/images/icons/document-import.png
Binary files /dev/null and /tmp/cvsCNX56l differ
Index: resources/images/icons/document-import.svgz
===================================================================
RCS file: resources/images/icons/document-import.svgz
diff -N resources/images/icons/document-import.svgz
Binary files /dev/null and /tmp/cvsf955Ap differ
Index: resources/images/icons/document-new.png
===================================================================
RCS file: resources/images/icons/document-new.png
diff -N resources/images/icons/document-new.png
Binary files /dev/null and /tmp/cvsiso1io differ
Index: resources/images/icons/document-new.svgz
===================================================================
RCS file: resources/images/icons/document-new.svgz
diff -N resources/images/icons/document-new.svgz
Binary files /dev/null and /tmp/cvsvK207r differ
Index: resources/images/icons/document-open.png
===================================================================
RCS file: resources/images/icons/document-open.png
diff -N resources/images/icons/document-open.png
Binary files /dev/null and /tmp/cvsGVbTMq differ
Index: resources/images/icons/document-open.svgz
===================================================================
RCS file: resources/images/icons/document-open.svgz
diff -N resources/images/icons/document-open.svgz
Binary files /dev/null and /tmp/cvs5PXtpr differ
Index: resources/images/icons/document-save.png
===================================================================
RCS file: resources/images/icons/document-save.png
diff -N resources/images/icons/document-save.png
Binary files /dev/null and /tmp/cvsWqPKeu differ
Index: resources/images/icons/document-save.svgz
===================================================================
RCS file: resources/images/icons/document-save.svgz
diff -N resources/images/icons/document-save.svgz
Binary files /dev/null and /tmp/cvsZTAmMt differ
Index: resources/images/icons/edit-redo.png
===================================================================
RCS file: resources/images/icons/edit-redo.png
diff -N resources/images/icons/edit-redo.png
Binary files /dev/null and /tmp/cvsC9Qh1w differ
Index: resources/images/icons/edit-redo.svgz
===================================================================
RCS file: resources/images/icons/edit-redo.svgz
diff -N resources/images/icons/edit-redo.svgz
Binary files /dev/null and /tmp/cvsp8YICw differ
Index: resources/images/icons/edit-undo.png
===================================================================
RCS file: resources/images/icons/edit-undo.png
diff -N resources/images/icons/edit-undo.png
Binary files /dev/null and /tmp/cvsu8PZLz differ
Index: resources/images/icons/edit-undo.svgz
===================================================================
RCS file: resources/images/icons/edit-undo.svgz
diff -N resources/images/icons/edit-undo.svgz
Binary files /dev/null and /tmp/cvs7ZHhHy differ
Index: resources/images/icons/media-playback-start.png
===================================================================
RCS file: resources/images/icons/media-playback-start.png
diff -N resources/images/icons/media-playback-start.png
Binary files /dev/null and /tmp/cvs09v3PB differ
Index: resources/images/icons/media-playback-start.svgz
===================================================================
RCS file: resources/images/icons/media-playback-start.svgz
diff -N resources/images/icons/media-playback-start.svgz
Binary files /dev/null and /tmp/cvs5FSkwA differ
Index: resources/images/icons/media-playback-stop.png
===================================================================
RCS file: resources/images/icons/media-playback-stop.png
diff -N resources/images/icons/media-playback-stop.png
Binary files /dev/null and /tmp/cvsuwd68A differ
Index: resources/images/icons/media-playback-stop.svgz
===================================================================
RCS file: resources/images/icons/media-playback-stop.svgz
diff -N resources/images/icons/media-playback-stop.svgz
Binary files /dev/null and /tmp/cvsPsPVWD differ
Index: resources/images/icons/media-record.png
===================================================================
RCS file: resources/images/icons/media-record.png
diff -N resources/images/icons/media-record.png
Binary files /dev/null and /tmp/cvsUqDq3E differ
Index: resources/images/icons/media-record.svgz
===================================================================
RCS file: resources/images/icons/media-record.svgz
diff -N resources/images/icons/media-record.svgz
Binary files /dev/null and /tmp/cvsvn5FlD differ
Index: resources/images/icons/project-open.png
===================================================================
RCS file: resources/images/icons/project-open.png
diff -N resources/images/icons/project-open.png
Binary files /dev/null and /tmp/cvsIbWfVD differ
Index: resources/images/icons/project-open.svgz
===================================================================
RCS file: resources/images/icons/project-open.svgz
diff -N resources/images/icons/project-open.svgz
Binary files /dev/null and /tmp/cvsLhj1pH differ
Index: resources/images/icons/tab-new-background.png
===================================================================
RCS file: resources/images/icons/tab-new-background.png
diff -N resources/images/icons/tab-new-background.png
Binary files /dev/null and /tmp/cvs2LeXNF differ
Index: resources/images/icons/tab-new-background.svgz
===================================================================
RCS file: resources/images/icons/tab-new-background.svgz
diff -N resources/images/icons/tab-new-background.svgz
Binary files /dev/null and /tmp/cvsTOOPoG differ
Index: resources/images/icons/tools-media-optical-burn.png
===================================================================
RCS file: resources/images/icons/tools-media-optical-burn.png
diff -N resources/images/icons/tools-media-optical-burn.png
Binary files /dev/null and /tmp/cvseIZVDJ differ
Index: resources/images/icons/tools-media-optical-burn.svgz
===================================================================
RCS file: resources/images/icons/tools-media-optical-burn.svgz
diff -N resources/images/icons/tools-media-optical-burn.svgz
Binary files /dev/null and /tmp/cvslHNrUH differ
- [Traverso-commit] traverso src/traverso/Interface.cpp src/travers...,
Nicola Doebelin <=