traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src commands/Zoom.cpp traverso/Interfa...


From: Ben Levitt
Subject: [Traverso-commit] traverso/src commands/Zoom.cpp traverso/Interfa...
Date: Tue, 03 Apr 2007 21:25:25 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     07/04/03 21:25:25

Modified files:
        src/commands   : Zoom.cpp 
        src/traverso   : Interface.cpp Interface.h 
                         QuickDriverConfigWidget.cpp 
                         QuickDriverConfigWidget.h 
        src/traverso/dialogs/settings: Pages.cpp Pages.h 
                                       SettingsDialog.cpp 
        src/traverso/songcanvas: SongWidget.cpp SongWidget.h 
        src/traverso/ui: BehaviorConfigPage.ui 
                         QuickDriverConfigWidget.ui ThemeConfigPage.ui 
        src/traverso/widgets: InfoWidgets.cpp InfoWidgets.h 

Log message:
        change Snap toolbar item to a button, add a Scroll Playback button, 
change prefs and driver settings to use okay/cancel, move OpenGL setting into 
Appearance prefs, reverse vertical zooming

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/Zoom.cpp?cvsroot=traverso&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.cpp?cvsroot=traverso&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.h?cvsroot=traverso&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/QuickDriverConfigWidget.cpp?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/QuickDriverConfigWidget.h?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/settings/Pages.cpp?cvsroot=traverso&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/settings/Pages.h?cvsroot=traverso&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/settings/SettingsDialog.cpp?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongWidget.cpp?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongWidget.h?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/BehaviorConfigPage.ui?cvsroot=traverso&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/QuickDriverConfigWidget.ui?cvsroot=traverso&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/ThemeConfigPage.ui?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.cpp?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.h?cvsroot=traverso&r1=1.4&r2=1.5

Patches:
Index: commands/Zoom.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/Zoom.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- commands/Zoom.cpp   16 Jan 2007 20:21:08 -0000      1.8
+++ commands/Zoom.cpp   3 Apr 2007 21:25:25 -0000       1.9
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: Zoom.cpp,v 1.8 2007/01/16 20:21:08 r_sijrier Exp $
+    $Id: Zoom.cpp,v 1.9 2007/04/03 21:25:25 benjie Exp $
 */
 
 #include <libtraversocore.h>
@@ -97,10 +97,10 @@
 
         int vzy = y - verticalJogZoomLastY;
         if (vzy>10) {
-                m_sv->vzoom_out();
+                m_sv->vzoom_in();
                 verticalJogZoomLastY = verticalJogZoomLastY + 10;
         } else if (vzy<-10) {
-                m_sv->vzoom_in();
+                m_sv->vzoom_out();
                 verticalJogZoomLastY = verticalJogZoomLastY - 10;
         }
         return 1;

Index: traverso/Interface.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- traverso/Interface.cpp      3 Apr 2007 19:05:38 -0000       1.53
+++ traverso/Interface.cpp      3 Apr 2007 21:25:25 -0000       1.54
@@ -189,6 +189,8 @@
        connect(&pm(), SIGNAL(aboutToDelete(Song*)), this, 
SLOT(delete_songwidget(Song*)));
 
        cpointer().add_contextitem(this);
+
+       connect(&config(), SIGNAL(configChanged()), this, 
SLOT(update_opengl()));
 }
 
 Interface::~Interface()
@@ -334,7 +336,7 @@
         
        menu = menuBar()->addMenu(tr("&File"));
        
-       action = menu->addAction(tr("Open / Create"));
+       action = menu->addAction(tr("&Open / Create..."));
        
action->setIcon(style()->standardIcon(QStyle::SP_FileDialogContentsView));
        action->setShortcuts(QKeySequence::Open);
        connect(action, SIGNAL(triggered(bool)), this, 
SLOT(show_open_create_project_dialog()));
@@ -354,7 +356,7 @@
        action->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
        connect(action, SIGNAL(triggered(bool)), &pm(), SLOT(save_project()));
        
-       action = menu->addAction(tr("Manage Project"));
+       action = menu->addAction(tr("&Manage Project..."));
        QList<QKeySequence> list;
        list.append(QKeySequence("F4"));
        action->setShortcuts(list);
@@ -363,7 +365,7 @@
        
        connect(action, SIGNAL(triggered(bool)), this, 
SLOT(show_project_manager_dialog()));
        
-       action = menu->addAction(tr("Export"));
+       action = menu->addAction(tr("&Export..."));
        action->setIcon(style()->standardIcon(QStyle::SP_DialogApplyButton));
        m_projectExportAction = action;
        connect(action, SIGNAL(triggered(bool)), this, 
SLOT(show_export_widget()));
@@ -396,7 +398,13 @@
        m_sysinfo->toggleViewAction()->setText(tr("System Information"));
                
                
-       action = menuBar()->addAction(tr("&Settings"));
+       menu = menuBar()->addMenu(tr("&Settings"));
+       menu->addAction(m_infoBar->get_snap_action());
+       menu->addAction(m_infoBar->get_follow_action());
+       
+       menu->addSeparator();
+
+       action = menu->addAction(tr("&Preferences..."));
        connect(action, SIGNAL(triggered( bool )), this, 
SLOT(show_settings_dialog()));
        
        
@@ -409,12 +417,6 @@
        connect(action, SIGNAL(triggered(bool)), this, SLOT(about_traverso()));
        
        
-       action = menuBar()->addAction(tr("OpenGL"));
-       action->setEnabled(QGLFormat::hasOpenGL());
-       action->setCheckable(true);
-       connect(action, SIGNAL(toggled(bool)), this, SLOT(toggle_OpenGL(bool)));
-       
-       
        action = menuBar()->addAction(tr("Undo"));
        action->setIcon(QIcon(find_pixmap(":/undo-16")));
        action->setShortcuts(QKeySequence::Undo);
@@ -667,8 +669,10 @@
        return menu;
 }
 
-void Interface::toggle_OpenGL(bool toggled)
+void Interface::update_opengl()
 {
+       bool toggled = config().get_property("Interface", "OpenGL", 
false).toBool();
+
        foreach(SongWidget* widget, m_songWidgets) {
                widget->set_use_opengl(toggled);
        }

Index: traverso/Interface.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- traverso/Interface.h        3 Apr 2007 19:05:39 -0000       1.26
+++ traverso/Interface.h        3 Apr 2007 21:25:25 -0000       1.27
@@ -138,7 +138,7 @@
        void process_context_menu_action(QAction* action);
        void set_fade_in_shape(QAction* action);
        void set_fade_out_shape(QAction* action);
-       void toggle_OpenGL(bool);
+       void update_opengl();
        
        Command* show_song_widget();
        Command* full_screen();

Index: traverso/QuickDriverConfigWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/QuickDriverConfigWidget.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- traverso/QuickDriverConfigWidget.cpp        19 Mar 2007 11:20:55 -0000      
1.6
+++ traverso/QuickDriverConfigWidget.cpp        3 Apr 2007 21:25:25 -0000       
1.7
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: QuickDriverConfigWidget.cpp,v 1.6 2007/03/19 11:20:55 r_sijrier Exp $
+$Id: QuickDriverConfigWidget.cpp,v 1.7 2007/04/03 21:25:25 benjie Exp $
 */
 
 #include "QuickDriverConfigWidget.h"
@@ -53,9 +53,14 @@
 {}
 
 
-void QuickDriverConfigWidget::on_applyButton_clicked( )
+void QuickDriverConfigWidget::on_cancelButton_clicked( )
+{
+       hide();
+       update_driver_info();
+}
+
+void QuickDriverConfigWidget::on_okButton_clicked( )
 {
-//     hide();
        QString driver = driverComboBox->currentText();
        int rate = rateComboBox->currentText().toInt();
        int bufSize = periodBufferSizesList.at(latencyComboBox->currentIndex());
@@ -83,13 +88,12 @@
        
        
        audiodevice().set_parameters(rate, bufSize, driver, capture, playback, 
cardDevice);
-}
 
-void QuickDriverConfigWidget::on_saveButton_clicked( )
-{
        config().set_property("Hardware", "samplerate", 
rateComboBox->currentText().toInt());
        config().set_property("Hardware", "bufferSize", 
periodBufferSizesList.at(latencyComboBox->currentIndex()));
        config().set_property("Hardware", "drivertype", 
driverComboBox->currentText());
+
+       hide();
 }
 
 void QuickDriverConfigWidget::driver_combobox_index_changed( QString )

Index: traverso/QuickDriverConfigWidget.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/QuickDriverConfigWidget.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- traverso/QuickDriverConfigWidget.h  18 Oct 2006 12:09:47 -0000      1.1
+++ traverso/QuickDriverConfigWidget.h  3 Apr 2007 21:25:25 -0000       1.2
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: QuickDriverConfigWidget.h,v 1.1 2006/10/18 12:09:47 r_sijrier Exp $
+    $Id: QuickDriverConfigWidget.h,v 1.2 2007/04/03 21:25:25 benjie Exp $
 */
 
 #ifndef QUICK_DRIVERCONFIG_WIDGET_H
@@ -42,8 +42,8 @@
         void update_driver_info();
        
 private slots:
-       void on_applyButton_clicked();
-       void on_saveButton_clicked();
+       void on_cancelButton_clicked();
+       void on_okButton_clicked();
        
        void driver_combobox_index_changed(QString);
        void rate_combobox_index_changed(QString);

Index: traverso/dialogs/settings/Pages.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/dialogs/settings/Pages.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- traverso/dialogs/settings/Pages.cpp 2 Apr 2007 18:56:35 -0000       1.7
+++ traverso/dialogs/settings/Pages.cpp 3 Apr 2007 21:25:25 -0000       1.8
@@ -402,6 +402,7 @@
        m_configpage = new BehaviorConfigPage(this);
        mainLayout->addWidget(m_configpage);
        mainLayout->addStretch(1);
+       connect(&config(), SIGNAL(configChanged()), this, 
SLOT(update_follow()));
        load_config();
 }
 
@@ -431,19 +432,16 @@
        bool loadLastUsedProject = config().get_property("Project", 
"loadLastUsed", 1).toBool();
        QString oncloseaction = config().get_property("Project", "onclose", 
"save").toString();
        int defaultNumTracks = config().get_property("Song", 
"trackCreationCount", 6).toInt();
-       bool keepCursorVisible = config().get_property("PlayHead", "Follow", 
true).toBool();
        int scrollMode = config().get_property("PlayHead", "Scrollmode", 
2).toInt();
        bool resyncAudio = config().get_property("AudioClip", "SyncDuringDrag", 
true).toBool();
        
        m_configpage->projectDirLineEdit->setText(dir);
        m_configpage->loadLastProjectCheckBox->setChecked(loadLastUsedProject);
        m_configpage->numberOfTrackSpinBox->setValue(defaultNumTracks);
-       m_configpage->keepCursorVisibleCheckBox->setChecked(keepCursorVisible);
        m_configpage->scrollModeComboBox->setCurrentIndex(scrollMode);
        m_configpage->resyncAudioCheckBox->setChecked(resyncAudio);
        
-       if (!keepCursorVisible)
-               m_configpage->scrollModeComboBox->setEnabled(true);
+       update_follow();
 
        if (oncloseaction == "save") {
                m_configpage->saveRadioButton->setChecked(true);
@@ -455,6 +453,13 @@
 }
 
 
+void BehaviorPage::update_follow()
+{
+       bool keepCursorVisible = config().get_property("PlayHead", "Follow", 
true).toBool();
+       m_configpage->keepCursorVisibleCheckBox->setChecked(keepCursorVisible);
+       m_configpage->scrollModeComboBox->setEnabled(keepCursorVisible);
+}
+
 void BehaviorPage::reset_default_config()
 {
        config().set_property("Project", "DefaultDirectory", getenv("HOME"));
@@ -518,6 +523,7 @@
        config().set_property("Themer", "coloradjust", 
m_themepage->colorAdjustBox->value());
        config().set_property("Themer", "style", 
m_themepage->styleCombo->currentText());
        config().set_property("Themer", "usestylepallet", 
m_themepage->useStylePalletCheckBox->isChecked());
+       config().set_property("Interface", "OpenGL", 
m_themepage->useOpenGLCheckBox->isChecked());
 }
 
 void AppearancePage::load_config()
@@ -545,6 +551,7 @@
        QString theme  = config().get_property("Themer", "currenttheme", 
"TraversoLight").toString();
        int coloradjust = config().get_property("Themer", "coloradjust", 
100).toInt();
        bool usestylepallete = config().get_property("Themer", 
"usestylepallet", "").toBool();
+       bool useOpenGL = config().get_property("Interface", "OpenGL", 
false).toBool();
        
        int index = m_themepage->styleCombo->findText(style);
        m_themepage->styleCombo->setCurrentIndex(index);
@@ -553,7 +560,7 @@
        m_themepage->colorAdjustBox->setValue(coloradjust);
        m_themepage->useStylePalletCheckBox->setChecked(usestylepallete);
        m_themepage->themePathLineEdit->setText(themepath);
-       
+       m_themepage->useOpenGLCheckBox->setChecked(useOpenGL);  
 }
 
 void AppearancePage::reset_default_config()
@@ -566,6 +573,7 @@
        QString systemstyle = 
QString(QApplication::style()->metaObject()->className()).remove("Q").remove("Style");
        config().set_property("Themer", "style", systemstyle);
        config().set_property("Themer", "usestylepallet", false);
+       config().set_property("Interface", "OpenGL", false);
        
        load_config();
 }

Index: traverso/dialogs/settings/Pages.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/dialogs/settings/Pages.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- traverso/dialogs/settings/Pages.h   19 Mar 2007 11:25:30 -0000      1.2
+++ traverso/dialogs/settings/Pages.h   3 Apr 2007 21:25:25 -0000       1.3
@@ -209,12 +209,16 @@
 
 class BehaviorPage : public ConfigPage
 {
+       Q_OBJECT
 public:
        BehaviorPage(QWidget *parent = 0);
        void load_config();
        void save_config();
        void reset_default_config();
        
+private slots:
+       void update_follow();
+
 private:
        BehaviorConfigPage* m_configpage;
 };

Index: traverso/dialogs/settings/SettingsDialog.cpp
===================================================================
RCS file: 
/sources/traverso/traverso/src/traverso/dialogs/settings/SettingsDialog.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- traverso/dialogs/settings/SettingsDialog.cpp        29 Mar 2007 21:09:42 
-0000      1.4
+++ traverso/dialogs/settings/SettingsDialog.cpp        3 Apr 2007 21:25:25 
-0000       1.5
@@ -51,12 +51,13 @@
        
        QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
        
-       QPushButton* closeButton = 
buttonBox->addButton(QDialogButtonBox::Close);
-       QPushButton* saveButton = buttonBox->addButton(QDialogButtonBox::Save); 
+       QPushButton* cancelButton = 
buttonBox->addButton(QDialogButtonBox::Cancel);
+       QPushButton* okButton = buttonBox->addButton(QDialogButtonBox::Ok); 
        QPushButton* restoreDefaultsButton = 
buttonBox->addButton(QDialogButtonBox::RestoreDefaults); 
        
-       connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
-       connect(saveButton, SIGNAL(clicked()), this, SLOT(save_config()));
+       connect(cancelButton, SIGNAL(clicked()), this, SLOT(close()));
+       connect(okButton, SIGNAL(clicked()), this, SLOT(save_config()));
+       connect(okButton, SIGNAL(clicked()), this, SLOT(close()));
        connect(restoreDefaultsButton, SIGNAL(clicked()), this, 
SLOT(restore_defaults_button_clicked()));
        
        QHBoxLayout *buttonsLayout = new QHBoxLayout;

Index: traverso/songcanvas/SongWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongWidget.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- traverso/songcanvas/SongWidget.cpp  21 Mar 2007 15:11:34 -0000      1.10
+++ traverso/songcanvas/SongWidget.cpp  3 Apr 2007 21:25:25 -0000       1.11
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: SongWidget.cpp,v 1.10 2007/03/21 15:11:34 r_sijrier Exp $
+    $Id: SongWidget.cpp,v 1.11 2007/04/03 21:25:25 benjie Exp $
 */
 
                
@@ -28,6 +28,7 @@
 #include "SongView.h"
 #include "ViewItem.h"
 #include "Themer.h"
+#include "Config.h"
 
 #include <Song.h>
 #include <QtOpenGL>
@@ -86,6 +87,9 @@
        
        connect(themer(), SIGNAL(themeLoaded()), this, SLOT(load_theme_data()), 
Qt::QueuedConnection);
        
+       m_usingOpenGL  = false;
+       set_use_opengl(config().get_property("Interface", "OpenGL", 
false).toBool());
+
        setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
 }
 
@@ -111,8 +115,11 @@
 
 void SongWidget::set_use_opengl( bool useOpenGL )
 {
+       if (useOpenGL != m_usingOpenGL) {
        m_clipsViewPort->setViewport(useOpenGL ? new 
QGLWidget(QGLFormat(QGL::SampleBuffers)) : new QWidget);
        m_trackPanel->setViewport(useOpenGL ? new 
QGLWidget(QGLFormat(QGL::SampleBuffers)) : new QWidget);
+       }
+       m_usingOpenGL = useOpenGL;
 }
 
 

Index: traverso/songcanvas/SongWidget.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongWidget.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- traverso/songcanvas/SongWidget.h    2 Apr 2007 09:52:31 -0000       1.10
+++ traverso/songcanvas/SongWidget.h    3 Apr 2007 21:25:25 -0000       1.11
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: SongWidget.h,v 1.10 2007/04/02 09:52:31 r_sijrier Exp $
+    $Id: SongWidget.h,v 1.11 2007/04/03 21:25:25 benjie Exp $
 */
 
 #ifndef SONG_WIDGET_H
@@ -63,6 +63,7 @@
        QGraphicsScene*         m_scene;
        QScrollBar*             m_vScrollBar;
        QScrollBar*             m_hScrollBar;
+       bool                    m_usingOpenGL;
        
        friend class SongView;
 

Index: traverso/ui/BehaviorConfigPage.ui
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ui/BehaviorConfigPage.ui,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- traverso/ui/BehaviorConfigPage.ui   29 Mar 2007 11:15:28 -0000      1.2
+++ traverso/ui/BehaviorConfigPage.ui   3 Apr 2007 21:25:25 -0000       1.3
@@ -14,7 +14,7 @@
   </property>
   <layout class="QVBoxLayout" >
    <property name="margin" >
-    <number>9</number>
+    <number>0</number>
    </property>
    <property name="spacing" >
     <number>6</number>
@@ -209,8 +209,14 @@
         </property>
         <item>
          <widget class="QCheckBox" name="keepCursorVisibleCheckBox" >
+          <property name="toolTip" >
+           <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" 
/>&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; 
font-weight:400; font-style:normal; text-decoration:none;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; 
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Keep the play cursor in 
view while playing or recording.&lt;/p>&lt;/body>&lt;/html></string>
+          </property>
           <property name="text" >
-           <string>Keep Play Cursor Visible</string>
+           <string>Scroll playback</string>
           </property>
           <property name="checked" >
            <bool>true</bool>
@@ -241,7 +247,7 @@
       <item>
        <widget class="QCheckBox" name="resyncAudioCheckBox" >
         <property name="text" >
-         <string>Continuously Adjust Audio While Dragging</string>
+         <string>Continuously adjust audio while dragging</string>
         </property>
         <property name="checked" >
          <bool>false</bool>

Index: traverso/ui/QuickDriverConfigWidget.ui
===================================================================
RCS file: 
/sources/traverso/traverso/src/traverso/ui/QuickDriverConfigWidget.ui,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- traverso/ui/QuickDriverConfigWidget.ui      18 Oct 2006 12:26:05 -0000      
1.3
+++ traverso/ui/QuickDriverConfigWidget.ui      3 Apr 2007 21:25:25 -0000       
1.4
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>QuickDriverConfigWidget</class>
  <widget class="QWidget" name="QuickDriverConfigWidget" >
   <property name="geometry" >
@@ -15,265 +12,469 @@
   <property name="palette" >
    <palette>
     <active>
-     <color>
+     <colorrole role="WindowText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Button" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>221</red>
       <green>223</green>
       <blue>228</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Light" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Midlight" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Dark" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>85</red>
       <green>85</green>
       <blue>85</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Mid" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>199</red>
       <green>199</green>
       <blue>199</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Text" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="BrightText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="ButtonText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Base" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Window" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>247</red>
       <green>249</green>
       <blue>208</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Shadow" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Highlight" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>103</red>
       <green>141</green>
       <blue>178</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="HighlightedText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Link" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>238</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="LinkVisited" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>82</red>
       <green>24</green>
       <blue>139</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="AlternateBase" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>232</red>
       <green>232</green>
       <blue>232</blue>
      </color>
+      </brush>
+     </colorrole>
     </active>
     <inactive>
-     <color>
+     <colorrole role="WindowText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Button" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>221</red>
       <green>223</green>
       <blue>228</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Light" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Midlight" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Dark" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>85</red>
       <green>85</green>
       <blue>85</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Mid" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>199</red>
       <green>199</green>
       <blue>199</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Text" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="BrightText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="ButtonText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Base" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Window" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>247</red>
       <green>249</green>
       <blue>208</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Shadow" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Highlight" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>103</red>
       <green>141</green>
       <blue>178</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="HighlightedText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Link" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>238</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="LinkVisited" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>82</red>
       <green>24</green>
       <blue>139</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="AlternateBase" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>232</red>
       <green>232</green>
       <blue>232</blue>
      </color>
+      </brush>
+     </colorrole>
     </inactive>
     <disabled>
-     <color>
+     <colorrole role="WindowText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>128</red>
       <green>128</green>
       <blue>128</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Button" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>221</red>
       <green>223</green>
       <blue>228</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Light" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Midlight" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Dark" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>85</red>
       <green>85</green>
       <blue>85</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Mid" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>199</red>
       <green>199</green>
       <blue>199</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Text" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>199</red>
       <green>199</green>
       <blue>199</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="BrightText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="ButtonText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>128</red>
       <green>128</green>
       <blue>128</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Base" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>247</red>
       <green>249</green>
       <blue>208</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Window" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>247</red>
       <green>249</green>
       <blue>208</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Shadow" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>0</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Highlight" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>86</red>
       <green>117</green>
       <blue>148</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="HighlightedText" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>255</red>
       <green>255</green>
       <blue>255</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="Link" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>0</red>
       <green>0</green>
       <blue>238</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="LinkVisited" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>82</red>
       <green>24</green>
       <blue>139</blue>
      </color>
-     <color>
+      </brush>
+     </colorrole>
+     <colorrole role="AlternateBase" >
+      <brush brushstyle="SolidPattern" >
+       <color alpha="255" >
       <red>232</red>
       <green>232</green>
       <blue>232</blue>
      </color>
+      </brush>
+     </colorrole>
     </disabled>
    </palette>
   </property>
@@ -295,7 +496,7 @@
     </widget>
    </item>
    <item row="4" column="2" >
-    <widget class="QPushButton" name="applyButton" >
+    <widget class="QPushButton" name="okButton" >
      <property name="maximumSize" >
       <size>
        <width>16777215</width>
@@ -303,7 +504,7 @@
       </size>
      </property>
      <property name="text" >
-      <string>Apply</string>
+      <string>OK</string>
      </property>
      <property name="autoDefault" >
       <bool>false</bool>
@@ -327,7 +528,7 @@
     </spacer>
    </item>
    <item row="4" column="0" >
-    <widget class="QPushButton" name="saveButton" >
+    <widget class="QPushButton" name="cancelButton" >
      <property name="maximumSize" >
       <size>
        <width>16777215</width>
@@ -335,7 +536,7 @@
       </size>
      </property>
      <property name="text" >
-      <string>Save</string>
+      <string>Cancel</string>
      </property>
     </widget>
    </item>
@@ -504,13 +705,12 @@
    </item>
   </layout>
  </widget>
- <pixmapfunction></pixmapfunction>
  <tabstops>
   <tabstop>driverComboBox</tabstop>
   <tabstop>rateComboBox</tabstop>
   <tabstop>latencyComboBox</tabstop>
-  <tabstop>saveButton</tabstop>
-  <tabstop>applyButton</tabstop>
+  <tabstop>cancelButton</tabstop>
+  <tabstop>okButton</tabstop>
  </tabstops>
  <resources/>
  <connections/>

Index: traverso/ui/ThemeConfigPage.ui
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ui/ThemeConfigPage.ui,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- traverso/ui/ThemeConfigPage.ui      27 Feb 2007 19:51:54 -0000      1.1
+++ traverso/ui/ThemeConfigPage.ui      3 Apr 2007 21:25:25 -0000       1.2
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>372</width>
-    <height>321</height>
+    <width>346</width>
+    <height>410</height>
    </rect>
   </property>
   <property name="windowTitle" >
@@ -17,7 +17,7 @@
     <number>0</number>
    </property>
    <property name="spacing" >
-    <number>12</number>
+    <number>6</number>
    </property>
    <item>
     <widget class="QGroupBox" name="groupBox" >
@@ -163,7 +163,7 @@
    <item>
     <widget class="QGroupBox" name="groupBox_2" >
      <property name="title" >
-      <string>Theme options</string>
+      <string>Theme Options</string>
      </property>
      <layout class="QVBoxLayout" >
       <property name="margin" >
@@ -212,7 +212,7 @@
        <number>9</number>
       </property>
       <property name="spacing" >
-       <number>12</number>
+       <number>6</number>
       </property>
       <item>
        <layout class="QHBoxLayout" >
@@ -261,6 +261,38 @@
      </layout>
     </widget>
    </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_3" >
+     <property name="title" >
+      <string>Open GL Options</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>
+         <widget class="QCheckBox" name="useOpenGLCheckBox" >
+          <property name="text" >
+           <string>Use OpenGL</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>

Index: traverso/widgets/InfoWidgets.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- traverso/widgets/InfoWidgets.cpp    3 Apr 2007 14:17:50 -0000       1.6
+++ traverso/widgets/InfoWidgets.cpp    3 Apr 2007 21:25:25 -0000       1.7
@@ -627,11 +627,21 @@
 {
        m_selector = new SongSelector(this);
        m_playhead = new PlayHeadInfo(this);
-       m_snap = new QComboBox(this);
-       m_snap->addItem("Snap: On");
-       m_snap->addItem("Snap: Off");
+
+       m_snap = new QToolButton(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."));
+       m_snap->setDefaultAction(m_snapAct);
        m_snap->setFocusPolicy(Qt::NoFocus);
        
+       m_follow = new QToolButton(this);
+       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."));
+       m_follow->setDefaultAction(m_followAct);
+       m_follow->setFocusPolicy(Qt::NoFocus);
+       
        m_addNew = new QPushButton(tr("Add new..."), this);
        m_addNew->setFocusPolicy(Qt::NoFocus);
        m_addNew->setToolTip(tr("Create new Song or Track"));
@@ -644,6 +654,7 @@
        m_record->setMaximumHeight(22);
        
        QMenu* menu = new QMenu;
+
        QAction* action = menu->addAction("Track");
        connect(action, SIGNAL(triggered()), this, SLOT(add_new_track()));
        
@@ -652,7 +663,10 @@
        
        m_addNew->setMenu(menu);
        
-       connect(m_snap, SIGNAL(activated(int)), this, 
SLOT(snap_combo_index_changed(int)));
+       connect(m_snapAct, SIGNAL(triggered(bool)), this, 
SLOT(snap_state_changed(bool)));
+       connect(m_followAct, SIGNAL(triggered(bool)), this, 
SLOT(follow_state_changed(bool)));
+       connect(&config(), SIGNAL(configChanged()), this, 
SLOT(update_follow_state()));
+       update_follow_state();
 }
 
 void SongInfo::set_orientation(Qt::Orientation orientation)
@@ -669,6 +683,7 @@
                lay->addWidget(m_playhead);
                lay->addWidget(m_record);
                lay->addWidget(m_snap);
+               lay->addWidget(m_follow);
                lay->addWidget(m_selector);
                lay->addWidget(m_addNew);
                
@@ -682,6 +697,7 @@
                lay->addWidget(m_playhead);
                lay->addWidget(m_record);
                lay->addWidget(m_snap);
+               lay->addWidget(m_follow);
                lay->addWidget(m_addNew);
                lay->addWidget(m_selector);
                
@@ -696,33 +712,35 @@
        m_song = song;
        
        if (m_song) {
-               connect(m_song, SIGNAL(snapChanged()), this, 
SLOT(song_snap_changed()));
-               song_snap_changed();
+               connect(m_song, SIGNAL(snapChanged()), this, 
SLOT(update_snap_state()));
+               update_snap_state();
        } else {
-               m_snap->setEnabled(false);
+               m_snapAct->setEnabled(false);
        }
 }
 
-void SongInfo::song_snap_changed()
+void SongInfo::update_snap_state()
 {
-       if (m_song->is_snap_on()) {
-               m_snap->setCurrentIndex(0);
-       } else {
-               m_snap->setCurrentIndex(1);
-       }
+       m_snapAct->setChecked(m_song->is_snap_on());
 }
 
-void SongInfo::snap_combo_index_changed(int index)
+void SongInfo::snap_state_changed(bool state)
 {
        if (! m_song) {
                return;
        }
+       m_song->set_snapping(state);
+}
        
-       if (index == 0) {
-               m_song->set_snapping(true);
-       } else {
-               m_song->set_snapping(false);
-       }
+void SongInfo::update_follow_state()
+{
+       m_followAct->setChecked(config().get_property("PlayHead", "Follow", 
true).toBool());
+}
+
+void SongInfo::follow_state_changed(bool state)
+{
+       config().set_property("PlayHead", "Follow", state);
+       config().save();
 }
 
 

Index: traverso/widgets/InfoWidgets.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- traverso/widgets/InfoWidgets.h      3 Apr 2007 14:17:50 -0000       1.4
+++ traverso/widgets/InfoWidgets.h      3 Apr 2007 21:25:25 -0000       1.5
@@ -24,7 +24,9 @@
 
 #include <QPushButton>
 #include <QComboBox>
+#include <QAction>
 #include <QToolBar>
+#include <QToolButton>
 #include <QTimer>
 #include <QLabel>
 #include <QFrame>
@@ -200,6 +202,8 @@
        Q_OBJECT
 public:
        SongInfo(QWidget* parent);
+       QAction *get_snap_action() {return m_snapAct;};
+       QAction *get_follow_action() {return m_followAct;};
        
 protected:
        void set_orientation(Qt::Orientation orientation);
@@ -209,15 +213,20 @@
        void set_song(Song* );
        
 private slots:
-       void song_snap_changed();
-       void snap_combo_index_changed(int index);
+       void update_snap_state();
+       void snap_state_changed(bool state);
+       void update_follow_state();
+       void follow_state_changed(bool state);
        void add_new_song();
        void add_new_track();
        
 private:
        PlayHeadInfo*   m_playhead;
        SongSelector*   m_selector;
-       QComboBox*      m_snap;
+       QToolButton*    m_snap;
+       QAction*        m_snapAct;
+       QToolButton*    m_follow;
+       QAction*        m_followAct;
        QPushButton*    m_addNew;
        QPushButton*    m_record;
 };
@@ -229,6 +238,8 @@
 
 public:
        InfoToolBar(QWidget* parent);
+       QAction *get_snap_action() {return m_songinfo->get_snap_action();};
+       QAction *get_follow_action() {return m_songinfo->get_follow_action();};
 
 private:
        QList<InfoWidget* > m_widgets;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]