diff options
| author | Robert Jonsson <spamatica@gmail.com> | 2011-04-15 18:52:45 +0000 | 
|---|---|---|
| committer | Robert Jonsson <spamatica@gmail.com> | 2011-04-15 18:52:45 +0000 | 
| commit | 47a10173ea203de2036dd00791fe5c24fb673135 (patch) | |
| tree | 6cb2e59a1e099adb30ec4f394097e33974c54ac4 /attic/muse_qt4_evolution/muse/widgets | |
| parent | 8edb9ca0e8e056faa0b488c947e7447a8148f880 (diff) | |
removing unnecessary duplication
Diffstat (limited to 'attic/muse_qt4_evolution/muse/widgets')
70 files changed, 0 insertions, 8610 deletions
diff --git a/attic/muse_qt4_evolution/muse/widgets/CMakeLists.txt b/attic/muse_qt4_evolution/muse/widgets/CMakeLists.txt deleted file mode 100644 index 03866a0c..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -#============================================================================= -#  MusE -#  Linux Music Editor -#  $Id:$ -# -#  Copyright (C) 2002-2006 by Werner Schweer and others -# -#  This program is free software; you can redistribute it and/or modify -#  it under the terms of the GNU General Public License version 2. -# -#  This program is distributed in the hope that it will be useful, -#  but WITHOUT ANY WARRANTY; without even the implied warranty of -#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -#  GNU General Public License for more details. -# -#  You should have received a copy of the GNU General Public License -#  along with this program; if not, write to the Free Software -#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#============================================================================= - -QT4_WRAP_CPP (widget_mocs -      doublelabel.h -      noteinfo.h -      dentry.h -      siglabel.h -      simplebutton.h -      tb1.h -      tools.h -      fontsel.h -      ctrlcombo.h -      filedialog.h -      outportcombo.h splitter.h -      quantcombo.h rastercombo.h -      comboQuant.h bigtime.h -      midisync.h -      mixdowndialog.h  -      comment.h  -      shortcutconfig.h  -      shortcutcapturedialog.h -      greendotbutton.h recordbutton.h -      ) - -QT4_WRAP_UI (widget_ui_headers -      comment.ui  -      midisync.ui  -      mixdowndialog.ui -      shortcutcapturedialog.ui  -      shortcutconfig.ui  -      ) - -# add_custom_command(OUTPUT ui_midisync.h -#      COMMAND ${QT_UIC_EXECUTABLE} -#      ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/ui_midisync.h ${CMAKE_CURRENT_SOURCE_DIR}/midisync.ui -#      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/midisync.ui -#      ) - -# ADD_FILE_DEPENDENCIES(moc_midisync.cxx ${CMAKE_CURRENT_BINARY_DIR}/ui_midisync.h) - -add_library ( widgets STATIC  -      ${widget_ui_headers} -      ${widget_mocs} - -      utils.cpp  -      shortcutconfig.cpp -      shortcutconfig.h -      shortcutcapturedialog.cpp -      midisync.cpp  -      comment.cpp -      mixdowndialog.cpp -      tools.cpp -      doublelabel.cpp  -      noteinfo.cpp  -      dentry.cpp  -      siglabel.cpp  -      simplebutton.cpp -      tb1.cpp -      fontsel.cpp  -      ctrlcombo.cpp  -      filedialog.cpp -      outportcombo.cpp splitter.cpp -      quantcombo.cpp rastercombo.cpp -      comboQuant.cpp bigtime.cpp  -      ) - -set_target_properties( widgets -   PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" -   ) - diff --git a/attic/muse_qt4_evolution/muse/widgets/action.h b/attic/muse_qt4_evolution/muse/widgets/action.h deleted file mode 100644 index c71ac1bb..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/action.h +++ /dev/null @@ -1,42 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __ACTION_H__ -#define __ACTION_H__ - -//--------------------------------------------------------- -//   Action -//--------------------------------------------------------- - -class Action : public QAction { -      int _id; - -   public: -      Action(QObject* parent, int i, const char* name = 0, bool toggle = false) -         : QAction(parent, name, toggle) { -            _id = i; -            } -      void setId(int i) { _id = i; } -      int id() const    { return _id; } -      }; - - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/bigtime.cpp b/attic/muse_qt4_evolution/muse/widgets/bigtime.cpp deleted file mode 100644 index 3d1c7b21..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/bigtime.cpp +++ /dev/null @@ -1,267 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "globals.h" -#include "bigtime.h" -#include "song.h" -#include "gconfig.h" - -#include "al/al.h" -#include "al/sig.h" -#include "al/tempo.h" - -// -// the bigtime widget -// display is split into several parts to avoid flickering. -// - -//--------------------------------------------------------- -//   BigTime -//--------------------------------------------------------- - -BigTime::BigTime(QWidget* parent) -   : QWidget(parent) -      { -	setWindowFlags(Qt::WindowStaysOnTopHint); - -      barLabel   = new QLabel(this); -      beatLabel  = new QLabel(this); -      tickLabel  = new QLabel(this); -      hourLabel  = new QLabel(this); -      minLabel   = new QLabel(this); -      secLabel   = new QLabel(this); -      frameLabel = new QLabel(this); -      sep1       = new QLabel(QString("."), this); -      sep2       = new QLabel(QString("."), this); -      sep3       = new QLabel(QString(":"), this); -      sep4       = new QLabel(QString(":"), this); -      sep5       = new QLabel(QString(":"), this); - -      oldbar = oldbeat = oldtick = oldhour = oldmin = oldsec = oldframe = -1; - -      setString(song->cPos()); - -      configChanged(); - -      QFont f(QString("Courier")); -      f.setPixelSize(10); -      setFont(f); -      setWindowTitle(tr("MusE: Bigtime")); -      } - -//--------------------------------------------------------- -//   configChanged -//--------------------------------------------------------- - -void BigTime::configChanged() -      { -      setBgColor(config.bigTimeBackgroundColor); -      setFgColor(config.bigTimeForegroundColor); -      } - -//--------------------------------------------------------- -//   closeEvent -//--------------------------------------------------------- - -void BigTime::closeEvent(QCloseEvent *ev) -      { -      emit closed(); -      QWidget::closeEvent(ev); -      } - -//--------------------------------------------------------- -//   setString -//--------------------------------------------------------- - -bool BigTime::setString(AL::Pos pos) -      { -      int bar, beat, tick; -      pos.mbt(&bar, &beat, &tick); -      int min, sec, hour, frame, subframe; -      pos.msf(&min, &sec, &frame, &subframe); - -      hour = min / 60; -      min  %= 60; - -      QString s; - -      if(oldbar != bar) { -	      s.sprintf("%04d", bar+1); -	      barLabel->setText(s); -	      oldbar = bar; -      } - -      if(oldbeat != beat) { -	      s.sprintf("%02d", beat+1); -	      beatLabel->setText(s); -	      oldbeat = beat; -      } - -      if(oldtick != tick) { -	      s.sprintf("%03d", tick); -	      tickLabel->setText(s); -	      oldtick = tick; -      } - -      if(oldhour != hour) { -	      s.sprintf("%02d", hour); -	      hourLabel->setText(s); -	      oldhour = hour; -      } - -      if(oldmin != min) { -	      s.sprintf("%02d", min); -	      minLabel->setText(s); -	      oldmin = min; -      } - -      if(oldsec != sec) { -	      s.sprintf("%02d", sec); -	      secLabel->setText(s); -	      oldsec = sec; -      } - -      if(oldframe != frame) { -	      s.sprintf("%02d", frame); -	      frameLabel->setText(s); -	      oldframe = frame; -      } - -      return false; -      } - -//--------------------------------------------------------- -//   setPos -//--------------------------------------------------------- - -void BigTime::setPos(int idx, AL::Pos pos, bool) -      { -      if (idx == 0) -            setString(pos); -      } - -//--------------------------------------------------------- -//   resizeEvent -//--------------------------------------------------------- - -void BigTime::resizeEvent(QResizeEvent *ev) -      { -	QFont f    = font(); -      QFontMetrics fm(f); -	int fs     = f.pixelSize(); -	int hspace = 20; -	int tw     = fm.width(QString("00:00:00:00")); -	fs         = ((ev->size().width() - hspace*2)*fs) / tw; - -// printf("resize BigTime %d -> %d, w %d\n", fs, nfs, ev->size().width()); - -	// set min/max -	if (fs < 10) -            fs = 10; -	else if (fs > 256) -            fs = 256; -	f.setPixelSize(fs); -	setFont(f); - -	int digitWidth = fontMetrics().width(QString("0")); -	 -	int vspace = (ev->size().height() - (fs*2)) / 3; -	int tickY = vspace; -	int timeY = vspace*2 + fs; - -	barLabel->resize(digitWidth*4, fs); -	beatLabel->resize(digitWidth*2, fs); -	tickLabel->resize(digitWidth*3, fs); -	hourLabel->resize(digitWidth*2, fs); -	minLabel->resize(digitWidth*2, fs); -	secLabel->resize(digitWidth*2, fs); -	frameLabel->resize(digitWidth*2, fs); - -	sep1->resize(digitWidth, fs); -	sep2->resize(digitWidth, fs); -	sep3->resize(digitWidth, fs); -	sep4->resize(digitWidth, fs); -	sep5->resize(digitWidth, fs); -	 -	barLabel->move(		hspace + (digitWidth*0), tickY); -	sep1->move(		hspace + (digitWidth*4), tickY); -	beatLabel->move(	hspace + (digitWidth*5), tickY); -	sep2->move(		hspace + (digitWidth*7), tickY); -	tickLabel->move(	hspace + (digitWidth*8), tickY); - -	hourLabel->move(	hspace + (digitWidth*0), timeY); -	sep3->move(		hspace + (digitWidth*2), timeY); -	minLabel->move(		hspace + (digitWidth*3), timeY); -	sep4->move(		hspace + (digitWidth*5), timeY); -	secLabel->move(		hspace + (digitWidth*6), timeY); -	sep5->move(		hspace + (digitWidth*8), timeY); -	frameLabel->move(	hspace + (digitWidth*9), timeY); -      } - -//--------------------------------------------------------- -//   setForegroundColor -//--------------------------------------------------------- - -void BigTime::setFgColor(QColor c) -      { -        QPalette cg = palette(); -        cg.setColor(QPalette::Foreground, c); -        setPalette(cg); - -        barLabel->setPalette(cg); -        beatLabel->setPalette(cg); -        tickLabel->setPalette(cg); -        hourLabel->setPalette(cg); -        minLabel->setPalette(cg); -        secLabel->setPalette(cg); -        frameLabel->setPalette(cg); - -        sep1->setPalette(cg); -        sep2->setPalette(cg); -        sep3->setPalette(cg); -        sep4->setPalette(cg); -        sep5->setPalette(cg); -      } - -//--------------------------------------------------------- -//   setBackgroundColor -//--------------------------------------------------------- - -void BigTime::setBgColor(QColor c) -      { -        QPalette cg = palette(); -        cg.setColor(QPalette::Background, c); -        setPalette(cg); - -        barLabel->setPalette(cg); -        beatLabel->setPalette(cg); -        tickLabel->setPalette(cg); -        hourLabel->setPalette(cg); -        minLabel->setPalette(cg); -        secLabel->setPalette(cg); -        frameLabel->setPalette(cg); - -        sep1->setPalette(cg); -        sep2->setPalette(cg); -        sep3->setPalette(cg); -        sep4->setPalette(cg); -        sep5->setPalette(cg); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/bigtime.h b/attic/muse_qt4_evolution/muse/widgets/bigtime.h deleted file mode 100644 index 82b054bf..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/bigtime.h +++ /dev/null @@ -1,64 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __BIGTIME_H__ -#define __BIGTIME_H__ - -#include "al/pos.h" - -class MusE; -class AL::Pos; - -//--------------------------------------------------------- -//   BigTime -//--------------------------------------------------------- - -class BigTime : public QWidget { -      bool tickmode; -      MusE* seq; -      Q_OBJECT - -      bool setString(AL::Pos); - -      QLabel *barLabel, *beatLabel, *tickLabel, -             *hourLabel, *minLabel, *secLabel, *frameLabel, -             *sep1, *sep2, *sep3, *sep4, *sep5; -      int oldbar, oldbeat, oldhour, oldmin, oldsec, oldframe; -      int oldtick; - -      void setFgColor(QColor c); -      void setBgColor(QColor c); - -   protected: -      virtual void resizeEvent(QResizeEvent*); -      virtual void closeEvent(QCloseEvent*); - -   public slots: -      void setPos(int, AL::Pos, bool); -      void configChanged(); - -   signals: -      void closed(); - -   public: -      BigTime(QWidget* parent); -      }; - -#endif diff --git a/attic/muse_qt4_evolution/muse/widgets/cliplisteditorbase.h b/attic/muse_qt4_evolution/muse/widgets/cliplisteditorbase.h deleted file mode 100644 index 789edac6..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/cliplisteditorbase.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef CLIPLISTEDITORBASE_H -#define CLIPLISTEDITORBASE_H - -#include <qvariant.h> - - -#include <Qt3Support/Q3GroupBox> -#include <Qt3Support/Q3Header> -#include <Qt3Support/Q3ListView> -#include <QtCore/QVariant> -#include <QtGui/QAction> -#include <QtGui/QApplication> -#include <QtGui/QButtonGroup> -#include <QtGui/QHBoxLayout> -#include <QtGui/QLabel> -#include <QtGui/QSpacerItem> -#include <QtGui/QVBoxLayout> -#include <QtGui/QWidget> -#include "awl/posedit.h" -#include <awl::posedit.h> -#include <Qt3Support/Q3MimeSourceFactory> - -class Ui_ClipListEditorBase -{ -public: -    QVBoxLayout *vboxLayout; -    Q3ListView *view; -    Q3GroupBox *GroupBox1; -    QHBoxLayout *hboxLayout; -    QLabel *TextLabel1; -    Awl::PosEdit *start; -    QLabel *TextLabel2; -    Awl::PosEdit *len; -    QSpacerItem *spacerItem; - -    void setupUi(QWidget *ClipListEditorBase) -    { -    ClipListEditorBase->setObjectName(QString::fromUtf8("ClipListEditorBase")); -    ClipListEditorBase->resize(QSize(600, 480).expandedTo(ClipListEditorBase->minimumSizeHint())); -    vboxLayout = new QVBoxLayout(ClipListEditorBase); -    vboxLayout->setSpacing(6); -    vboxLayout->setMargin(11); -    vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); -    view = new Q3ListView(ClipListEditorBase); -    view->addColumn(QApplication::translate("ClipListEditorBase", "Name", 0, QApplication::UnicodeUTF8)); -    view->header()->setClickEnabled(true, view->header()->count() - 1); -    view->addColumn(QApplication::translate("ClipListEditorBase", "Refs", 0, QApplication::UnicodeUTF8)); -    view->header()->setClickEnabled(true, view->header()->count() - 1); -    view->addColumn(QApplication::translate("ClipListEditorBase", "Start", 0, QApplication::UnicodeUTF8)); -    view->header()->setClickEnabled(true, view->header()->count() - 1); -    view->addColumn(QApplication::translate("ClipListEditorBase", "Len", 0, QApplication::UnicodeUTF8)); -    view->header()->setClickEnabled(true, view->header()->count() - 1); -    view->addColumn(QApplication::translate("ClipListEditorBase", "Data", 0, QApplication::UnicodeUTF8)); -    view->header()->setClickEnabled(true, view->header()->count() - 1); -    view->setObjectName(QString::fromUtf8("view")); -    view->setAllColumnsShowFocus(true); -    view->setRootIsDecorated(true); - -    vboxLayout->addWidget(view); - -    GroupBox1 = new Q3GroupBox(ClipListEditorBase); -    GroupBox1->setObjectName(QString::fromUtf8("GroupBox1")); -    GroupBox1->setColumnLayout(0, Qt::Vertical); -    GroupBox1->layout()->setSpacing(6); -    GroupBox1->layout()->setMargin(11); -    hboxLayout = new QHBoxLayout(GroupBox1->layout()); -    hboxLayout->setAlignment(Qt::AlignTop); -    hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); -    hboxLayout->setMargin(11); -    hboxLayout->setSpacing(6); -    TextLabel1 = new QLabel(GroupBox1); -    TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); - -    hboxLayout->addWidget(TextLabel1); - -    start = new Awl::PosEdit(GroupBox1); -    start->setObjectName(QString::fromUtf8("start")); -    start->setSmpte(true); - -    hboxLayout->addWidget(start); - -    TextLabel2 = new QLabel(GroupBox1); -    TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); - -    hboxLayout->addWidget(TextLabel2); - -    len = new Awl::PosEdit(GroupBox1); -    len->setObjectName(QString::fromUtf8("len")); -    len->setSmpte(true); - -    hboxLayout->addWidget(len); - -    spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - -    hboxLayout->addItem(spacerItem); - - -    vboxLayout->addWidget(GroupBox1); - -    retranslateUi(ClipListEditorBase); - -    QMetaObject::connectSlotsByName(ClipListEditorBase); -    } // setupUi - -    void retranslateUi(QWidget *ClipListEditorBase) -    { -    ClipListEditorBase->setWindowTitle(QApplication::translate("ClipListEditorBase", "MusE: ClipList", 0, QApplication::UnicodeUTF8)); -    view->header()->setLabel(0, QApplication::translate("ClipListEditorBase", "Name", 0, QApplication::UnicodeUTF8)); -    view->header()->setLabel(1, QApplication::translate("ClipListEditorBase", "Refs", 0, QApplication::UnicodeUTF8)); -    view->header()->setLabel(2, QApplication::translate("ClipListEditorBase", "Start", 0, QApplication::UnicodeUTF8)); -    view->header()->setLabel(3, QApplication::translate("ClipListEditorBase", "Len", 0, QApplication::UnicodeUTF8)); -    view->header()->setLabel(4, QApplication::translate("ClipListEditorBase", "Data", 0, QApplication::UnicodeUTF8)); -    GroupBox1->setTitle(QApplication::translate("ClipListEditorBase", "Clip Properties", 0, QApplication::UnicodeUTF8)); -    TextLabel1->setText(QApplication::translate("ClipListEditorBase", "Pos:", 0, QApplication::UnicodeUTF8)); -    TextLabel2->setText(QApplication::translate("ClipListEditorBase", "Len:", 0, QApplication::UnicodeUTF8)); -    Q_UNUSED(ClipListEditorBase); -    } // retranslateUi - -}; - -namespace Ui { -    class ClipListEditorBase: public Ui_ClipListEditorBase {}; -} // namespace Ui - -class ClipListEditorBase : public QWidget, public Ui::ClipListEditorBase -{ -    Q_OBJECT - -public: -    ClipListEditorBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); -    ~ClipListEditorBase(); - -protected slots: -    virtual void languageChange(); - -}; - -#endif // CLIPLISTEDITORBASE_H diff --git a/attic/muse_qt4_evolution/muse/widgets/cliplisteditorbase.ui b/attic/muse_qt4_evolution/muse/widgets/cliplisteditorbase.ui deleted file mode 100644 index 0dab43be..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/cliplisteditorbase.ui +++ /dev/null @@ -1,146 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>ClipListEditorBase</class> - <widget class="QWidget" name="ClipListEditorBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>600</width> -    <height>480</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>MusE: ClipList</string> -  </property> -  <layout class="QVBoxLayout" > -   <property name="margin" > -    <number>11</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item> -    <widget class="Q3ListView" name="view" > -     <property name="allColumnsShowFocus" > -      <bool>true</bool> -     </property> -     <property name="rootIsDecorated" > -      <bool>true</bool> -     </property> -     <column> -      <property name="text" > -       <string>Name</string> -      </property> -     </column> -     <column> -      <property name="text" > -       <string>Refs</string> -      </property> -     </column> -     <column> -      <property name="text" > -       <string>Start</string> -      </property> -     </column> -     <column> -      <property name="text" > -       <string>Len</string> -      </property> -     </column> -     <column> -      <property name="text" > -       <string>Data</string> -      </property> -     </column> -    </widget> -   </item> -   <item> -    <widget class="Q3GroupBox" name="GroupBox1" > -     <property name="title" > -      <string>Clip Properties</string> -     </property> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <layout class="QHBoxLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item> -       <widget class="QLabel" name="TextLabel1" > -        <property name="text" > -         <string>Pos:</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="Awl::PosEdit" name="start" /> -      </item> -      <item> -       <widget class="QLabel" name="TextLabel2" > -        <property name="text" > -         <string>Len:</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="Awl::PosEdit" name="len" /> -      </item> -      <item> -       <spacer> -        <property name="orientation" > -         <enum>Qt::Horizontal</enum> -        </property> -        <property name="sizeType" > -         <enum>QSizePolicy::Expanding</enum> -        </property> -        <property name="sizeHint" > -         <size> -          <width>20</width> -          <height>20</height> -         </size> -        </property> -       </spacer> -      </item> -     </layout> -    </widget> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> -  <customwidget> -   <class>Q3ListView</class> -   <extends></extends> -   <header>q3listview.h</header> -   <container>0</container> -   <pixmap></pixmap> -  </customwidget> -  <customwidget> -   <class>Q3GroupBox</class> -   <extends></extends> -   <header>Qt3Support/Q3GroupBox</header> -   <container>1</container> -   <pixmap></pixmap> -  </customwidget> -  <customwidget> -   <class>Awl::PosEdit</class> -   <extends>QWidget</extends> -   <header>awl::posedit.h</header> -   <container>1</container> -   <pixmap></pixmap> -  </customwidget> - </customwidgets> - <includes> -  <include location="local" >awl/posedit.h</include> - </includes> - <resources/> - <connections/> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/comboQuant.cpp b/attic/muse_qt4_evolution/muse/widgets/comboQuant.cpp deleted file mode 100644 index 1a95e3b6..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/comboQuant.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "comboQuant.h" - -static int quantTable[] = { -      1, 16, 32,  64, 128, 256,  512, 1024, -      1, 24, 48,  96, 192, 384,  768, 1536, -      1, 36, 72, 144, 288, 576, 1152, 2304 -      }; - -static const char* quantStrings[] = { -      QT_TR_NOOP("Off"), "64T", "32T", "16T", "8T", "4T", "2T", "1T", -      QT_TR_NOOP("Off"), "64",  "32",  "16",  "8",  "4",  "2",  "1", -      QT_TR_NOOP("Off"), "64.", "32.", "16.", "8.", "4.", "2.", "1." -      }; - -//--------------------------------------------------------- -//   ComboQuant -//--------------------------------------------------------- - -ComboQuant::ComboQuant(QWidget* parent) -   : QComboBox(parent) -      { -      for (int i = 0; i < 24; i++) -            addItem(tr(quantStrings[i]), i); -      connect(this, SIGNAL(activated(int)), SLOT(activated(int))); -      } - -//--------------------------------------------------------- -//   activated -//--------------------------------------------------------- - -void ComboQuant::activated(int index) -      { -      emit valueChanged(quantTable[index]); -      } - -//--------------------------------------------------------- -//   setQuant -//--------------------------------------------------------- - -void ComboQuant::setValue(int val) -      { -      for (int i = 0; i < 24; i++) { -            if (val == quantTable[i]) { -                  setCurrentIndex(i); -                  return; -                  } -            } -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/comboQuant.h b/attic/muse_qt4_evolution/muse/widgets/comboQuant.h deleted file mode 100644 index de2a8d82..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/comboQuant.h +++ /dev/null @@ -1,43 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __COMBOQUANT_H__ -#define __COMBOQUANT_H__ - -//--------------------------------------------------------- -//   ComboQuant -//--------------------------------------------------------- - -class ComboQuant : public QComboBox { -      Q_OBJECT - -   private slots: -      void activated(int); - -   signals: -      void valueChanged(int); - -   public: -      ComboQuant(QWidget* parent = 0); -      void setValue(int val); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/combobox.cpp b/attic/muse_qt4_evolution/muse/widgets/combobox.cpp deleted file mode 100644 index 8b6a5ea2..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/combobox.cpp +++ /dev/null @@ -1,81 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "combobox.h" - -//--------------------------------------------------------- -//   ComboBox -//--------------------------------------------------------- - -ComboBox::ComboBox(QWidget* parent, const char* name) -   : QLabel(parent, name) -      { -      _currentItem = 0; -      _id = -1; -      list = new Q3PopupMenu(0, "comboPopup"); -      connect(list, SIGNAL(activated(int)), SLOT(activatedIntern(int))); -      setFrameStyle(Q3Frame::Panel | Q3Frame::Raised); -      setLineWidth(2); -      } - -ComboBox::~ComboBox() -      { -      delete list; -      } - -//--------------------------------------------------------- -//   mousePressEvent -//--------------------------------------------------------- - -void ComboBox::mousePressEvent(QMouseEvent*) -      { -      list->exec(QCursor::pos()); -      } - -//--------------------------------------------------------- -//   activated -//--------------------------------------------------------- - -void ComboBox::activatedIntern(int n) -      { -      _currentItem = n; -      emit activated(n, _id); -      setText(list->text(_currentItem)); -      } - -//--------------------------------------------------------- -//   setCurrentItem -//--------------------------------------------------------- - -void ComboBox::setCurrentItem(int i) -      { -      _currentItem = i; -      setText(list->text(list->idAt(_currentItem))); -      } - -//--------------------------------------------------------- -//   insertItem -//--------------------------------------------------------- - -void ComboBox::insertItem(const QString& s, int id, int idx) -      { -      list->insertItem(s, id, idx); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/combobox.h b/attic/muse_qt4_evolution/muse/widgets/combobox.h deleted file mode 100644 index 70d71030..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/combobox.h +++ /dev/null @@ -1,57 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __COMBOBOX_H__ -#define __COMBOBOX_H__ - -class Q3PopupMenu; - -//--------------------------------------------------------- -//   ComboBox -//--------------------------------------------------------- - -class ComboBox : public QLabel { -      Q_OBJECT -      Q_PROPERTY(int id READ id WRITE setId) - -      int _id; -      int _currentItem; -      Q3PopupMenu* list; -      virtual void mousePressEvent(QMouseEvent*); - -   private slots: -      void activatedIntern(int); - -   signals: -      void activated(int val, int id); - -   public: -      ComboBox(QWidget* parent, const char* name = 0); -      ~ComboBox(); -      void setCurrentItem(int); -      void insertItem(const QString& s, int id = -1, int idx=-1); -      int id() const       { return _id; } -      void setId(int i)    { _id = i; } -      }; - -#endif - - - diff --git a/attic/muse_qt4_evolution/muse/widgets/comment.cpp b/attic/muse_qt4_evolution/muse/widgets/comment.cpp deleted file mode 100644 index 2bb981eb..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/comment.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "comment.h" -#include "song.h" -#include "track.h" - -//--------------------------------------------------------- -//   Comment -//--------------------------------------------------------- - -Comment::Comment(QWidget* parent) -   : QWidget(parent) -      { -      setupUi(this); -      } - -//--------------------------------------------------------- -//   textChanged -//--------------------------------------------------------- - -void Comment::textChanged() -      { -      setText(textentry->document()->toPlainText()); -      } - -//--------------------------------------------------------- -//   TrackComment -//--------------------------------------------------------- - -TrackComment::TrackComment(Track* t, QWidget* parent) -   : Comment(parent) -      { -      setWindowTitle(tr("MusE: Track Comment")); -      track = t; -      connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); -      textentry->setPlainText(track->comment()); -      connect(textentry, SIGNAL(textChanged()), SLOT(textChanged())); -      label1->setText(tr("Track Comment:")); -      label2->setText(track->name()); -      } - -//--------------------------------------------------------- -//   songChanged -//--------------------------------------------------------- - -void TrackComment::songChanged(int flags) -      { -      if ((flags & (SC_TRACK_INSERTED|SC_TRACK_REMOVED|SC_TRACK_MODIFIED)) == 0) -            return; -      if (!song->trackExists(track)) { -            close(); -            return; -            } -      label2->setText(track->name()); -      QString txt(textentry->document()->toPlainText()); -      if (track->comment() != txt) { -            disconnect(textentry, SIGNAL(textChanged()), this, SLOT(textChanged())); -            textentry->setPlainText(track->comment()); -//            textentry->setCursorPosition(1000, 1000); -            connect(textentry, SIGNAL(textChanged()), this, SLOT(textChanged())); -            } -      } - -//--------------------------------------------------------- -//   setText -//--------------------------------------------------------- - -void TrackComment::setText(const QString& s) -      { -      track->setComment(s); -      song->update(SC_TRACK_MODIFIED); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/comment.h b/attic/muse_qt4_evolution/muse/widgets/comment.h deleted file mode 100644 index 9d356d7a..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/comment.h +++ /dev/null @@ -1,69 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __COMMENT_H__ -#define __COMMENT_H__ - -#include "ui_comment.h" - -namespace AL { -      class Xml; -      }; -using AL::Xml; - -class Track; - -//--------------------------------------------------------- -//   Comment -//--------------------------------------------------------- - -class Comment : public QWidget, public Ui::CommentBase { -      Q_OBJECT - -   private: -      virtual void setText(const QString& s) = 0; - -   private slots: -      void textChanged(); - -   public: -      Comment(QWidget* parent); -      }; - -//--------------------------------------------------------- -//   TrackComment -//--------------------------------------------------------- - -class TrackComment : public Comment { -      Track* track; -      Q_OBJECT - -   private: -      virtual void setText(const QString& s); - -   private slots: -      void songChanged(int); - -   public: -      TrackComment(Track*, QWidget*); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/comment.ui b/attic/muse_qt4_evolution/muse/widgets/comment.ui deleted file mode 100644 index fc1b8d64..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/comment.ui +++ /dev/null @@ -1,97 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>CommentBase</class> - <widget class="QWidget" name="CommentBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>387</width> -    <height>205</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>Form1</string> -  </property> -  <layout class="QVBoxLayout" > -   <property name="margin" > -    <number>11</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="QLabel" name="label1" > -       <property name="sizePolicy" > -        <sizepolicy> -         <hsizetype>4</hsizetype> -         <vsizetype>1</vsizetype> -         <horstretch>0</horstretch> -         <verstretch>0</verstretch> -        </sizepolicy> -       </property> -       <property name="text" > -        <string>Track Comment</string> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QLabel" name="label2" > -       <property name="font" > -        <font> -         <family>Arial</family> -         <pointsize>12</pointsize> -         <weight>75</weight> -         <italic>false</italic> -         <bold>true</bold> -         <underline>false</underline> -         <strikeout>false</strikeout> -        </font> -       </property> -       <property name="frameShape" > -        <enum>QFrame::Box</enum> -       </property> -       <property name="frameShadow" > -        <enum>QFrame::Sunken</enum> -       </property> -       <property name="midLineWidth" > -        <number>1</number> -       </property> -       <property name="text" > -        <string>Track 1</string> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item> -    <widget class="QTextEdit" name="textentry" > -     <property name="font" > -      <font> -       <family>Arial</family> -       <pointsize>12</pointsize> -       <weight>75</weight> -       <italic>false</italic> -       <bold>true</bold> -       <underline>false</underline> -       <strikeout>false</strikeout> -      </font> -     </property> -    </widget> -   </item> -  </layout> - </widget> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <resources/> - <connections/> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/ctrlcombo.cpp b/attic/muse_qt4_evolution/muse/widgets/ctrlcombo.cpp deleted file mode 100644 index 3139265a..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/ctrlcombo.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "ctrlcombo.h" - -//--------------------------------------------------------- -//   CtrlComboBox -//--------------------------------------------------------- - -CtrlComboBox::CtrlComboBox(QWidget* parent) -   : QComboBox(parent) -      { -      const char* ctxt[] = { -            "No Ctrl",    "BankSelMSB", "Modulation",  "BreathCtrl", -            "Control 3",  "Foot Ctrl",  "Porta Time",  "DataEntMSB", -            "MainVolume", "Balance",    "Control 9",   "Pan", -            "Expression", "Control 12", "Control 13",  "Control 14", -            "Control 15", "Gen.Purp.1", "Gen.Purp.2",  "Gen.Purp.3", -            "Gen.Purp.4", "Control 20", "Control 21",  "Control 22", -            "Control 23", "Control 24", "Control 25",  "Control 26", -            "Control 27", "Control 28", "Control 29",  "Control 30", -            "Control 31", "BankSelLSB", "Modul. LSB",  "BrthCt.LSB", -            "Control 35", "FootCt.LSB", "Port.T LSB",  "DataEntLSB", -            "MainVolLSB", "BalanceLSB", "Control 41",  "Pan LSB", -            "Expr. LSB",  "Control 44", "Control 45",  "Control 46", -            "Control 47", "Gen.P.1LSB", "Gen.P.2LSB",  "Gen.P.3LSB", -            "Gen.P.4LSB", "Control 52", "Control 53",  "Control 54", -            "Control 55", "Control 56", "Control 57",  "Control 58", -            "Control 59", "Control 60", "Control 61",  "Control 62", -            "Control 63", "Sustain",    "Porta Ped",   "Sostenuto", -            "Soft Pedal", "Control 68", "Hold 2",      "Control 70", -            "HarmonicCo", "ReleaseTime", "Attack Time", "Brightness", -            "Control 75", "Control 76", "Control 77",  "Control 78", -            "Control 79", "Gen.Purp.5", "Gen.Purp.6",  "Gen.Purp.7", -            "Gen.Purp.8", "Porta Ctrl", "Control 85",  "Control 86", -            "Control 87", "Control 88", "Control 89",  "Control 90", -            "Effect1Dep", "Effect2Dep", "Effect3Dep",  "Effect4Dep", -            "Phaser Dep", "Data Incr",  "Data Decr",   "NRPN LSB", -            "NRPN MSB",   "RPN LSB",    "RPN MSB",     "Control102", -            "Control103", "Control104", "Control105",  "Control106", -            "Control107", "Control108", "Control109",  "Control110", -            "Control111", "Control112", "Control113",  "Control114", -            "Control115", "Control116", "Control117",  "Control118", -            "Control119", "AllSndOff",  "Reset Ctrl",  "Local Ctrl", -            "AllNoteOff", "OmniModOff", "OmniModeOn",  "MonoModeOn", -            "PolyModeOn" -            }; -      for (unsigned int i = 0; i < sizeof(ctxt)/sizeof(*ctxt); ++i) -            addItem(QString(ctxt[i])); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/ctrlcombo.h b/attic/muse_qt4_evolution/muse/widgets/ctrlcombo.h deleted file mode 100644 index 1eb59ab0..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/ctrlcombo.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __CTRLGRP_H__ -#define __CTRLGRP_H__ - -class CtrlComboBox : public QComboBox { -      Q_OBJECT -   public: -      CtrlComboBox(QWidget* parent); -      }; - - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/dentry.cpp b/attic/muse_qt4_evolution/muse/widgets/dentry.cpp deleted file mode 100644 index b52d4363..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/dentry.cpp +++ /dev/null @@ -1,208 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "dentry.h" -#include "globals.h" - -#define TIMER1    400 -#define TIMER2    200 -#define TIMEC     7 -#define TIMER3    100 -#define TIMEC2    20 -#define TIMER4    50 - -//--------------------------------------------------------- -//   Dentry -//    lineedit double values -//--------------------------------------------------------- - -Dentry::Dentry(QWidget* parent) -   : QLineEdit(parent) -      { -      _id = -1; -      drawFrame = false; -      QLineEdit::setFrame(drawFrame); -      timer = new QTimer(this); -      connect(timer, SIGNAL(timeout()), SLOT(repeat())); -      val = 0.01; -      connect(this, SIGNAL(returnPressed()), SLOT(endEdit())); -      setCursor(QCursor(Qt::ArrowCursor)); -      evx = 1.0; -      } - -//--------------------------------------------------------- -//   setFrame -//--------------------------------------------------------- - -void Dentry::setFrame(bool flag) -      { -      drawFrame = flag; -      QLineEdit::setFrame(drawFrame); -      update(); -      } - -//--------------------------------------------------------- -//   endEdit -//--------------------------------------------------------- - -void Dentry::endEdit() -      { -      if (isModified()) { -            if (setSValue(text())) { -                  setString(val); -                  return; -                  } -            } -      setString(val); -      clearFocus(); -      if (!drawFrame) -            QLineEdit::setFrame(false); -      } - -//--------------------------------------------------------- -//   mousePressEvent -//--------------------------------------------------------- - -void Dentry::mousePressEvent(QMouseEvent* event) -      { -      button = event->button(); -      starty = event->y(); -      evx    = double(event->x()); -      timecount = 0; -      repeat(); -      timer->start(TIMER1); -      } - -//--------------------------------------------------------- -//   wheelEvent -//--------------------------------------------------------- - -void Dentry::wheelEvent(QWheelEvent* event) -      { -      int delta = event->delta(); - -      if (delta < 0) -            decValue(-1.0); -      else if (delta > 0) -            incValue(1.0); -      } - -//--------------------------------------------------------- -//   repeat -//--------------------------------------------------------- - -void Dentry::repeat() -      { -      if (timecount == 1) { -           ++timecount; -            timer->stop(); -            timer->start(TIMER2); -            return; -            } -      ++timecount; -      if (timecount == TIMEC) { -            timer->stop(); -            timer->start(TIMER3); -            } -      if (timecount == TIMEC2) { -            timer->stop(); -            timer->start(TIMER4); -            } - -      switch (button) { -            case Qt::LeftButton: -                  return; -            case Qt::MidButton: -                  decValue(evx); -                  break; -            case Qt::RightButton: -                  incValue(evx); -                  break; -            default: -                  break; -            } -      } - -//--------------------------------------------------------- -//   mouseReleaseEvent -//--------------------------------------------------------- - -void Dentry::mouseReleaseEvent(QMouseEvent*) -      { -      button = Qt::NoButton; -      timer->stop(); -      } - -//--------------------------------------------------------- -//   mouseMoveEvent -//--------------------------------------------------------- - -void Dentry::mouseMoveEvent(QMouseEvent*) -      { -      switch (button) { -            case Qt::LeftButton: -                  break; -            case Qt::MidButton: -                  break; -            case Qt::RightButton: -                  break; -            default: -                  break; -            } -      } - -//--------------------------------------------------------- -//   mouseDoubleClickEvent -//--------------------------------------------------------- - -void Dentry::mouseDoubleClickEvent(QMouseEvent* event) -      { -      if (event->button() != Qt::LeftButton) { -            mousePressEvent(event); -            return; -            } -      setFocus(); -      QLineEdit::setFrame(true); -      update(); -      } - -//--------------------------------------------------------- -//   setValue -//--------------------------------------------------------- - -void Dentry::setValue(double v) -      { -      if (v == val) -           return; -      setString(v); -#if 0 -      if (setString(v)) { -            clearFocus(); -            if (!drawFrame) -                  QLineEdit::setFrame(false); -            setEnabled(false); -            } -      else { -            setEnabled(true); -            } -#endif -      val = v; -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/dentry.h b/attic/muse_qt4_evolution/muse/widgets/dentry.h deleted file mode 100644 index 5e2ba724..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/dentry.h +++ /dev/null @@ -1,79 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __DENTRY_H__ -#define __DENTRY_H__ - -class QTimer; - -//--------------------------------------------------------- -//   Dentry -//--------------------------------------------------------- - -class Dentry : public QLineEdit { -      Q_OBJECT - -      Q_PROPERTY( int id READ id WRITE setId ) -      Q_PROPERTY( double value READ value WRITE setValue ) -      Q_PROPERTY( bool frame READ frame WRITE setFrame ) - -      int button; -      int starty; -      bool drawFrame; -      QTimer* timer; -      double evx; -      int timecount; - -      virtual void wheelEvent(QWheelEvent*); -      virtual void mousePressEvent(QMouseEvent*); -      virtual void mouseMoveEvent(QMouseEvent*); -      virtual void mouseDoubleClickEvent(QMouseEvent*); -      virtual void mouseReleaseEvent(QMouseEvent*); - -   protected: -      int _id; -      double val; - -      virtual void incValue(double x) = 0; -      virtual void decValue(double x) = 0; -      virtual bool setString(double) = 0; -      virtual bool setSValue(const QString&) = 0; - -   private slots: -      void repeat(); - -   protected slots: -      void endEdit(); - -   signals: -      void valueChanged(double, int); - -   public slots: -      virtual void setValue(double); - -   public: -      Dentry(QWidget* parent = 0); -      double value() const { return val; } -      bool frame() const { return drawFrame; } -      void setFrame(bool); -      int id() const    { return _id; } -      void setId(int i) { _id = i; } -      }; -#endif diff --git a/attic/muse_qt4_evolution/muse/widgets/doublelabel.cpp b/attic/muse_qt4_evolution/muse/widgets/doublelabel.cpp deleted file mode 100644 index 4026800b..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/doublelabel.cpp +++ /dev/null @@ -1,144 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "doublelabel.h" -#include "utils.h" - -//--------------------------------------------------------- -//   DoubleLabel -//--------------------------------------------------------- - -DoubleLabel::DoubleLabel(QWidget* parent) -   : Dentry(parent), _specialText("---") -      { -      min        = 0.0; -      max        = 1.0; -      _precision = 3; -      setValue(0.0); -      } - -DoubleLabel::DoubleLabel(double _val, double m, double mx, QWidget* parent) -   : Dentry(parent), _specialText("---") -      { -      min = m; -      max = mx; -      _precision = 3; -      setValue(_val); -      } - -//--------------------------------------------------------- -//   setString -//--------------------------------------------------------- - -bool DoubleLabel::setString(double v) -      { -      QString s; -      if (v < min || v > max) { -            setText(_specialText); -            return true; -            } -      s.setNum(v, 'f', _precision); -      if (!_suffix.isEmpty()) { -            s += " "; -            s += _suffix; -            } - -      setText(s); -      return false; -      } - -//--------------------------------------------------------- -//   setSValue -//--------------------------------------------------------- - -bool DoubleLabel::setSValue(const QString& s) -      { -      bool ok; -      double v = s.toDouble(&ok); -      if (ok && (v != val)) { -            if (v < min) -                  v = min; -            if (v > max) -                  v = max; -            setValue(v); -            emit valueChanged(val, _id); -            } -      return false; -      } - -//--------------------------------------------------------- -//   incValue -//--------------------------------------------------------- - -void DoubleLabel::incValue(double) -      { -      if (val + 1.0 < max) { -            setValue(val + 1.0); -            emit valueChanged(val, _id); -            } -      } - -//--------------------------------------------------------- -//   decValue -//--------------------------------------------------------- - -void DoubleLabel::decValue(double) -      { -      if (val - 1.0 > min) { -            setValue(val - 1.0); -            emit valueChanged(val, _id); -            } -      } - -//--------------------------------------------------------- -//   setPrecision -//--------------------------------------------------------- - -void DoubleLabel::setPrecision(int v) -      { -      _precision = v; -      setString(val); -      } - -//--------------------------------------------------------- -//   sizeHint -//--------------------------------------------------------- - -QSize DoubleLabel::sizeHint() const -      { -      QFontMetrics fm = fontMetrics(); -      int h           = fm.height() + 4; -      int n = _precision + 3; -#if 0 -      double aval = fabs(val); -      if (aval >= 10.0) -            ++n; -      if (aval >= 100.0) -            ++n; -      if (aval >= 1000.0) -            ++n; -      if (aval >= 10000.0) -            ++n; -      if (aval >= 100000.0) -            ++n; -#endif -      int w = fm.width(QString("-0.")) + fm.width('0') * n + 6; -      return QSize(w, h); -      } diff --git a/attic/muse_qt4_evolution/muse/widgets/doublelabel.h b/attic/muse_qt4_evolution/muse/widgets/doublelabel.h deleted file mode 100644 index 0ed72514..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/doublelabel.h +++ /dev/null @@ -1,68 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __DOUBLELABEL_H__ -#define __DOUBLELABEL_H__ - -#include "dentry.h" - -//--------------------------------------------------------- -//   DoubleLabel -//--------------------------------------------------------- - -class DoubleLabel : public Dentry { -      Q_PROPERTY( double minValue READ minValue WRITE setMinValue ) -      Q_PROPERTY( double maxValue READ maxValue WRITE setMaxValue ) -      Q_PROPERTY( QString specialText READ specialText WRITE setSpecialText ) -      Q_PROPERTY( QString suffix READ suffix WRITE setSuffix ) -      Q_PROPERTY( int precision READ precision WRITE setPrecision ) - -      double min, max; -      QString _specialText;   // text to show if value outside min,max -      QString _suffix; -      int _precision; -      Q_OBJECT - -      virtual bool setSValue(const QString&); -      virtual bool setString(double val); -      virtual void incValue(double); -      virtual void decValue(double); - -   public: -      DoubleLabel(QWidget* parent = 0); -      DoubleLabel(double val, double min, double max, QWidget*); -      virtual QSize sizeHint() const; -      double minValue() const               { return min; } -      double maxValue() const               { return max; } -      void setMinValue(double v)            { min = v; } -      void setMaxValue(double v)            { max = v; } -      void setRange(double a, double b)     { min = a; max = b; } -      int precision() const                 { return _precision; } -      void setPrecision(int val); -      QString specialText() const           { return _specialText; } -      void setSpecialText(const QString& s) { -            _specialText = s; -            update(); -            } -      QString suffix() const                { return _suffix; } -      void setSuffix(const QString& s)      { _suffix = s; } -      }; - -#endif diff --git a/attic/muse_qt4_evolution/muse/widgets/editmetadialogbase.cpp b/attic/muse_qt4_evolution/muse/widgets/editmetadialogbase.cpp deleted file mode 100644 index 0bbe8dd1..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/editmetadialogbase.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "editmetadialogbase.h" - -#include <qvariant.h> -#include <awl/posedit.h> -/* - *  Constructs a EditMetaDialogBase as a child of 'parent', with the - *  name 'name' and widget flags set to 'f'. - * - *  The dialog will by default be modeless, unless you set 'modal' to - *  true to construct a modal dialog. - */ -EditMetaDialogBase::EditMetaDialogBase(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) -    : QDialog(parent, name, modal, fl) -{ -    setupUi(this); - - -    // signals and slots connections -    connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); -    connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); -} - -/* - *  Destroys the object and frees any allocated resources - */ -EditMetaDialogBase::~EditMetaDialogBase() -{ -    // no need to delete child widgets, Qt does it all for us -} - -/* - *  Sets the strings of the subwidgets using the current - *  language. - */ -void EditMetaDialogBase::languageChange() -{ -    retranslateUi(this); -} - -/**************************************************************************** -** Meta object code from reading C++ file 'editmetadialogbase.h' -** -** Created: Fri Sep 23 12:43:18 2005 -**      by: The Qt Meta Object Compiler version 58 (Qt 4.0.1) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "editmetadialogbase.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'editmetadialogbase.h' doesn't include <QObject>." -#elif Q_MOC_OUTPUT_REVISION != 58 -#error "This file was generated using the moc from 4.0.1. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -static const uint qt_meta_data_EditMetaDialogBase[] = { - - // content: -       1,       // revision -       0,       // classname -       0,    0, // classinfo -       1,   10, // methods -       0,    0, // properties -       0,    0, // enums/sets - - // slots: signature, parameters, type, tag, flags -      20,   19,   19,   19, 0x09, - -       0        // eod -}; - -static const char qt_meta_stringdata_EditMetaDialogBase[] = { -    "EditMetaDialogBase\0\0languageChange()\0" -}; - -const QMetaObject EditMetaDialogBase::staticMetaObject = { -    { &QDialog::staticMetaObject, qt_meta_stringdata_EditMetaDialogBase, -      qt_meta_data_EditMetaDialogBase, 0 } -}; - -const QMetaObject *EditMetaDialogBase::metaObject() const -{ -    return &staticMetaObject; -} - -void *EditMetaDialogBase::qt_metacast(const char *_clname) -{ -    if (!_clname) return 0; -    if (!strcmp(_clname, qt_meta_stringdata_EditMetaDialogBase)) -	return static_cast<void*>(const_cast<EditMetaDialogBase*>(this)); -    if (!strcmp(_clname, "Ui::EditMetaDialogBase")) -	return static_cast<Ui::EditMetaDialogBase*>(const_cast<EditMetaDialogBase*>(this)); -    return QDialog::qt_metacast(_clname); -} - -int EditMetaDialogBase::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ -    _id = QDialog::qt_metacall(_c, _id, _a); -    if (_id < 0) -        return _id; -    if (_c == QMetaObject::InvokeMetaMethod) { -        switch (_id) { -        case 0: languageChange(); break; -        } -        _id -= 1; -    } -    return _id; -} diff --git a/attic/muse_qt4_evolution/muse/widgets/editmetadialogbase.ui b/attic/muse_qt4_evolution/muse/widgets/editmetadialogbase.ui deleted file mode 100644 index 3f5730de..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/editmetadialogbase.ui +++ /dev/null @@ -1,137 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>EditMetaDialogBase</class> - <widget class="QDialog" name="EditMetaDialogBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>400</width> -    <height>300</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>Dialog</string> -  </property> -  <layout class="QGridLayout" > -   <property name="margin" > -    <number>8</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item row="3" column="0" colspan="3" > -    <widget class="QTextEdit" name="textEdit" /> -   </item> -   <item row="4" column="0" colspan="3" > -    <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>131</width> -         <height>31</height> -        </size> -       </property> -      </spacer> -     </item> -     <item> -      <widget class="QPushButton" name="okButton" > -       <property name="text" > -        <string>OK</string> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="cancelButton" > -       <property name="text" > -        <string>Cancel</string> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item row="0" column="1" > -    <widget class="QSpinBox" name="spinBox" /> -   </item> -   <item row="1" column="1" > -    <widget class="QSpinBox" name="spinBox_2" /> -   </item> -   <item row="2" column="0" colspan="2" > -    <widget class="QCheckBox" name="checkBox" > -     <property name="text" > -      <string>Enter Hex</string> -     </property> -    </widget> -   </item> -   <item row="1" column="0" > -    <widget class="QLabel" name="label_2" > -     <property name="text" > -      <string>Meta Type:</string> -     </property> -    </widget> -   </item> -   <item row="0" column="0" > -    <widget class="QLabel" name="label" > -     <property name="text" > -      <string>Time Position:</string> -     </property> -    </widget> -   </item> -   <item row="2" column="2" > -    <widget class="QLabel" name="label_3" > -     <property name="text" > -      <string>TextLabel</string> -     </property> -    </widget> -   </item> -  </layout> - </widget> - <pixmapfunction></pixmapfunction> - <resources/> - <connections> -  <connection> -   <sender>okButton</sender> -   <signal>clicked()</signal> -   <receiver>EditMetaDialogBase</receiver> -   <slot>accept()</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>278</x> -     <y>253</y> -    </hint> -    <hint type="destinationlabel" > -     <x>96</x> -     <y>254</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>cancelButton</sender> -   <signal>clicked()</signal> -   <receiver>EditMetaDialogBase</receiver> -   <slot>reject()</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>369</x> -     <y>253</y> -    </hint> -    <hint type="destinationlabel" > -     <x>179</x> -     <y>282</y> -    </hint> -   </hints> -  </connection> - </connections> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/fdialogbuttons.ui b/attic/muse_qt4_evolution/muse/widgets/fdialogbuttons.ui deleted file mode 100644 index 9d46cb59..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/fdialogbuttons.ui +++ /dev/null @@ -1,167 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>FileDialogButtons</class> - <widget class="QWidget" name="FileDialogButtons" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>175</width> -    <height>438</height> -   </rect> -  </property> -  <property name="sizePolicy" > -   <sizepolicy> -    <hsizetype>5</hsizetype> -    <vsizetype>5</vsizetype> -    <horstretch>0</horstretch> -    <verstretch>0</verstretch> -   </sizepolicy> -  </property> -  <property name="windowTitle" > -   <string>Form1</string> -  </property> -  <layout class="QVBoxLayout" > -   <property name="margin" > -    <number>11</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item> -    <widget class="Q3ButtonGroup" name="pathGroup" > -     <property name="title" > -      <string/> -     </property> -     <property name="flat" > -      <bool>true</bool> -     </property> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <property name="exclusive" > -      <bool>true</bool> -     </property> -     <layout class="QVBoxLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item> -       <widget class="QToolButton" name="globalButton" > -        <property name="text" > -         <string>Global</string> -        </property> -        <property name="icon" > -         <iconset>image0</iconset> -        </property> -        <property name="checkable" > -         <bool>true</bool> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QToolButton" name="userButton" > -        <property name="text" > -         <string>User</string> -        </property> -        <property name="icon" > -         <iconset>image1</iconset> -        </property> -        <property name="checkable" > -         <bool>true</bool> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QToolButton" name="projectButton" > -        <property name="text" > -         <string>Project</string> -        </property> -        <property name="icon" > -         <iconset>image2</iconset> -        </property> -        <property name="checkable" > -         <bool>true</bool> -        </property> -       </widget> -      </item> -     </layout> -    </widget> -   </item> -   <item> -    <spacer> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <property name="sizeType" > -      <enum>QSizePolicy::Expanding</enum> -     </property> -     <property name="sizeHint" > -      <size> -       <width>20</width> -       <height>60</height> -      </size> -     </property> -    </spacer> -   </item> -   <item> -    <widget class="Q3ButtonGroup" name="loadAllGroup" > -     <property name="title" > -      <string>Load:</string> -     </property> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <property name="exclusive" > -      <bool>true</bool> -     </property> -     <layout class="QVBoxLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item> -       <widget class="QRadioButton" name="loadAllButton" > -        <property name="text" > -         <string>Songdata + -Cofiguration</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QRadioButton" name="loadSongButton" > -        <property name="text" > -         <string>only -Songdata</string> -        </property> -        <property name="checked" > -         <bool>true</bool> -        </property> -       </widget> -      </item> -     </layout> -    </widget> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction></pixmapfunction> - <customwidgets> -  <customwidget> -   <class>Q3ButtonGroup</class> -   <extends></extends> -   <header>Qt3Support/Q3ButtonGroup</header> -   <container>1</container> -   <pixmap></pixmap> -  </customwidget> - </customwidgets> - <resources/> - <connections/> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/filedialog.cpp b/attic/muse_qt4_evolution/muse/widgets/filedialog.cpp deleted file mode 100644 index eec678f5..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/filedialog.cpp +++ /dev/null @@ -1,193 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "filedialog.h" -#include "../globals.h" - -//--------------------------------------------------------- -//   MFileDialog -//--------------------------------------------------------- - -MFileDialog::MFileDialog(const QString& dir, -   const QString& filter, QWidget* parent, bool /*writeFlag*/) -   : QFileDialog(parent, QString(), dir, filter) -      { -      } - -//--------------------------------------------------------- -//   getOpenFileName -//--------------------------------------------------------- - -QString getOpenFileName(const QString &startWith, -   const QStringList& filters, QWidget* parent, const QString& name) -      { -      MFileDialog *dlg = new MFileDialog(startWith, QString::null, parent); -      dlg->setFilters(filters); -      dlg->setWindowTitle(name); -      dlg->setFileMode(QFileDialog::ExistingFile); -      QString result; -      if (dlg->exec() == QDialog::Accepted) { -            QStringList sl = dlg->selectedFiles(); -            result = sl.at(0); -            } -      delete dlg; -      return result; -      } - -//--------------------------------------------------------- -//   getSaveFileName -//--------------------------------------------------------- - -QString getSaveFileName(const QString &startWith, -   const QStringList& filters, QWidget* parent, const QString& name) -      { -      MFileDialog *dlg = new MFileDialog(startWith, QString::null, parent, true); -      dlg->setFilters(filters); -      dlg->setWindowTitle(name); -      dlg->setFileMode(QFileDialog::AnyFile); -      QString result; -      if (dlg->exec() == QDialog::Accepted) { -            QStringList sl = dlg->selectedFiles(); -            result = sl.at(0); -            } -      delete dlg; -      return result; -      } - -//--------------------------------------------------------- -//   getImageFileName -//--------------------------------------------------------- - -QString getImageFileName(const QString& startWith, -   const QStringList& filters, QWidget* parent, const QString& name) -      { -      QString initialSelection; -	QString* workingDirectory = new QString(QDir::current().absolutePath()); -      if (!startWith.isEmpty() ) { -            QFileInfo fi(startWith); -            if (fi.exists() && fi.isDir()) { -                  *workingDirectory = startWith; -                  } -            else if (fi.exists() && fi.isFile()) { -                  *workingDirectory = fi.absolutePath(); -                  initialSelection = fi.absolutePath(); -                  } -            } -      MFileDialog *dlg = new MFileDialog(*workingDirectory, QString::null, -         parent); - -//TD      dlg->setContentsPreviewEnabled(true); -//      ContentsPreview* preview = new ContentsPreview(dlg); -//      dlg->setContentsPreview(preview, preview); -//      dlg->setPreviewMode(QFileDialog::Contents); - -      dlg->setWindowTitle(name); -      dlg->setFilters(filters); -      dlg->setFileMode(QFileDialog::ExistingFile); -      QString result; -      if (!initialSelection.isEmpty()) -            dlg->selectFile(initialSelection); -      if (dlg->exec() == QDialog::Accepted) { -            QStringList sl = dlg->selectedFiles(); -            result = sl.at(0); -            } -      delete dlg; -      return result; -      } - -//--------------------------------------------------------- -//   fileOpen -//    opens file "name" with extension "ext" in mode "mode" -// -//    mode = "r" or "w" -//    noError     show no error if file was not found in "r" -//                mode. Has no effect in "w" mode -//    overwriteWarning -//                warn in "w" mode, if file exists -//--------------------------------------------------------- - -QFile* fileOpen(QWidget* parent, QString name, const QString& ext, -   QIODevice::OpenMode mode, bool overwriteWarning) -      { -      QFileInfo info(name); - -      if (info.completeSuffix() == "") { -            name += ext; -            info.setFile(name); -            } -      if (mode == QIODevice::WriteOnly && overwriteWarning && info.exists()) { -            QString s(QWidget::tr("File\n") + name + QWidget::tr("\nexists")); -            int rv = QMessageBox::warning(parent, -               QWidget::tr("MusE: write"), -               s, -               QWidget::tr("Overwrite"), -               QWidget::tr("Quit"), QString::null, 0, 1); -            switch(rv) { -                  case 0:  // overwrite -                        break; -                  case 1:  // quit -                        return 0; -                  } -            } -      QFile* file = new QFile(name); -	if (!file->open(mode)) { -            QString s(QWidget::tr("Open File\n") + name + QWidget::tr("\nfailed: ") -               + QString(strerror(errno))); -            QMessageBox::critical(parent, QWidget::tr("MusE: Open File"), s); -            } -      return file; -      } - -//--------------------------------------------------------- -//   MFile -//--------------------------------------------------------- - -MFile::MFile(const QString& _path, const QString& _ext) -   : path(_path), ext(_ext) -      { -      f = 0; -      } - -MFile::~MFile() -      { -      if (f) { -		f->close(); -            delete f; -            } -      } - -//--------------------------------------------------------- -//   open -//--------------------------------------------------------- - -QFile* MFile::open(QIODevice::OpenMode mode, const QStringList& pattern, -   QWidget* parent, bool warnIfOverwrite, const QString& caption) -      { -      QString name; -      if (mode == QIODevice::ReadOnly) -           name = getOpenFileName(path, pattern, parent, caption); -      else -           name = getSaveFileName(path, pattern, parent, caption); -      if (name.isEmpty()) -            return 0; -      f = fileOpen(parent, name, ext, mode, warnIfOverwrite); -      return f; -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/filedialog.h b/attic/muse_qt4_evolution/muse/widgets/filedialog.h deleted file mode 100644 index cb906e00..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/filedialog.h +++ /dev/null @@ -1,65 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -class FileDialogButtons; - -//--------------------------------------------------------- -//   MFileDialog -//--------------------------------------------------------- - -class MFileDialog : public QFileDialog { -      bool showButtons; -      QString baseDir; -      Q_OBJECT - -   public: -      MFileDialog(const QString& dir, const QString& filter = QString::null, -         QWidget* parent = 0, bool writeFlag = false); -      }; - -QString getSaveFileName(const QString& startWidth, const QStringList& filter, -         QWidget* parent, const QString& name); -QString getOpenFileName(const QString& startWidth, const QStringList& filter, -         QWidget* parent, const QString& name); -QString getImageFileName(const QString& startWith, const QStringList& filter, -         QWidget* parent, const QString& name); - -QFile* fileOpen(QWidget*, QString, const QString&, -   QIODevice::OpenMode, bool = false); - - -//--------------------------------------------------------- -//   MFile -//    "Muse" File -//--------------------------------------------------------- - -class MFile { -      QFile* f; -      QString path; -      QString ext; - -   public: -      MFile(const QString& path, const QString& ext); -      ~MFile(); -      QFile* open(QIODevice::OpenMode, const QStringList& pattern, -         QWidget* parent, -         bool warnIfOverwrite, const QString& caption); -      }; - diff --git a/attic/muse_qt4_evolution/muse/widgets/floatlabel.cpp b/attic/muse_qt4_evolution/muse/widgets/floatlabel.cpp deleted file mode 100644 index 75e81419..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/floatlabel.cpp +++ /dev/null @@ -1,144 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "doublelabel.h" -#include "utils.h" - -//--------------------------------------------------------- -//   DoubleLabel -//--------------------------------------------------------- - -DoubleLabel::DoubleLabel(QWidget* parent, const char* name) -   : Dentry(parent, name), _specialText("---") -      { -      min        = 0.0; -      max        = 1.0; -      _precision = 3; -      setValue(0.0); -      } - -DoubleLabel::DoubleLabel(double _val, double m, double mx, QWidget* parent) -   : Dentry(parent), _specialText("---") -      { -      min = m; -      max = mx; -      _precision = 3; -      setValue(_val); -      } - -//--------------------------------------------------------- -//   setString -//--------------------------------------------------------- - -bool DoubleLabel::setString(double v) -      { -      QString s; -      if (v < min || v > max) { -            setText(_specialText); -            return true; -            } -      s.setNum(v, 'f', _precision); -      if (!_suffix.isEmpty()) { -            s += " "; -            s += _suffix; -            } - -      setText(s); -      return false; -      } - -//--------------------------------------------------------- -//   setSValue -//--------------------------------------------------------- - -bool DoubleLabel::setSValue(const QString& s) -      { -      bool ok; -      double v = s.toDouble(&ok); -      if (ok && (v != val)) { -            if (v < min) -                  v = min; -            if (v > max) -                  v = max; -            setValue(v); -            emit valueChanged(val, _id); -            } -      return false; -      } - -//--------------------------------------------------------- -//   incValue -//--------------------------------------------------------- - -void DoubleLabel::incValue(double) -      { -      if (val + 1.0 < max) { -            setValue(val + 1.0); -            emit valueChanged(val, _id); -            } -      } - -//--------------------------------------------------------- -//   decValue -//--------------------------------------------------------- - -void DoubleLabel::decValue(double) -      { -      if (val - 1.0 > min) { -            setValue(val - 1.0); -            emit valueChanged(val, _id); -            } -      } - -//--------------------------------------------------------- -//   setPrecision -//--------------------------------------------------------- - -void DoubleLabel::setPrecision(int v) -      { -      _precision = v; -      setString(val); -      } - -//--------------------------------------------------------- -//   sizeHint -//--------------------------------------------------------- - -QSize DoubleLabel::sizeHint() const -      { -      QFontMetrics fm = fontMetrics(); -      int h           = fm.height() + 4; -      int n = _precision + 3; -#if 0 -      double aval = fabs(val); -      if (aval >= 10.0) -            ++n; -      if (aval >= 100.0) -            ++n; -      if (aval >= 1000.0) -            ++n; -      if (aval >= 10000.0) -            ++n; -      if (aval >= 100000.0) -            ++n; -#endif -      int w = fm.width(QString("-0.")) + fm.width('0') * n + 6; -      return QSize(w, h); -      } diff --git a/attic/muse_qt4_evolution/muse/widgets/floatlabel.h b/attic/muse_qt4_evolution/muse/widgets/floatlabel.h deleted file mode 100644 index 9f51d7d4..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/floatlabel.h +++ /dev/null @@ -1,68 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __FLOATLABEL_H__ -#define __FLOATLABEL_H__ - -#include "dentry.h" - -//--------------------------------------------------------- -//   FloatLabel -//--------------------------------------------------------- - -class FloatLabel : public Dentry { -      Q_PROPERTY(float minValue READ minValue WRITE setMinValue ) -      Q_PROPERTY(float maxValue READ maxValue WRITE setMaxValue ) -      Q_PROPERTY(QString specialText READ specialText WRITE setSpecialText ) -      Q_PROPERTY(QString suffix READ suffix WRITE setSuffix ) -      Q_PROPERTY(int precision READ precision WRITE setPrecision ) - -      float min, max; -      QString _specialText;   // text to show if value outside min,max -      QString _suffix; -      int _precision; -      Q_OBJECT - -      virtual bool setSValue(const QString&); -      virtual bool setString(double val); -      virtual void incValue(double); -      virtual void decValue(double); - -   public: -      DoubleLabel(QWidget*, const char* name = 0); -      DoubleLabel(double val, double min, double max, QWidget*); -      virtual QSize sizeHint() const; -      double minValue() const               { return min; } -      double maxValue() const               { return max; } -      void setMinValue(double v)            { min = v; } -      void setMaxValue(double v)            { max = v; } -      void setRange(double a, double b)     { min = a; max = b; } -      int precision() const                 { return _precision; } -      void setPrecision(int val); -      QString specialText() const           { return _specialText; } -      void setSpecialText(const QString& s) { -            _specialText = s; -            update(); -            } -      QString suffix() const                { return _suffix; } -      void setSuffix(const QString& s)      { _suffix = s; } -      }; - -#endif diff --git a/attic/muse_qt4_evolution/muse/widgets/fontsel.cpp b/attic/muse_qt4_evolution/muse/widgets/fontsel.cpp deleted file mode 100644 index b0d6c95b..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/fontsel.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "icons.h" -#include "fontsel.h" - -//--------------------------------------------------------- -//   FontSel -//--------------------------------------------------------- - -FontSel::FontSel(QWidget* parent, const QFont& f, const QString& name) -  : QWidget(parent) -      { -      _font = f; -      QHBoxLayout* box = new QHBoxLayout(this); - -      cb = new QComboBox(this); -      cb->setFixedWidth(80); -      cb->addItem(QString("arial")); -      cb->addItem(QString("avantgarde")); -      cb->addItem(QString("charter")); -      cb->addItem(QString("garamond")); -      cb->addItem(QString("gillsans")); -      cb->addItem(QString("helvetica")); -      cb->addItem(QString("times")); -      cb->addItem(QString("terminal")); -      cb->addItem(QString("utopia")); -      cb->addItem(QString("new century schoolbook")); - -      QLabel* l1 = new QLabel(tr("Size:"), this); -      s1 = new QSpinBox(this); -      s1->setRange(8, 48); - -      fcb1 = new QToolButton(this); -      fcb1->setCheckable(true); -      fcb1->setIcon(*boldIcon); - -      fcb2 = new QToolButton(this); -      fcb2->setCheckable(true); -      fcb2->setIcon(*italicIcon); - -      fcb3 = new QToolButton(this); -      fcb3->setCheckable(true); -      fcb3->setIcon(*underlinedIcon); - -      QToolButton* pb = new QToolButton(this); -      connect(pb, SIGNAL(pressed()), SLOT(fontSelect())); -      pb->setText(QString("??")); - -      QLabel* l2 = new QLabel(name, this); - -      box->addWidget(cb); -      box->addSpacing(8); -      box->addWidget(l1); -      box->addSpacing(5); -      box->addWidget(s1); -      box->addSpacing(5); -      box->addWidget(fcb1); -      box->addWidget(fcb2); -      box->addWidget(fcb3); -      box->addSpacing(2); -      box->addWidget(pb); -      box->addSpacing(5); -      box->addWidget(l2); -      box->addStretch(100); -      setFixedHeight(18); -      setFont(); -      } - -//--------------------------------------------------------- -//   fontSelect -//--------------------------------------------------------- - -void FontSel::fontSelect() -      { -      bool ok; -      QFont f = QFontDialog::getFont(&ok, _font, this); -      if (ok) { -            _font = f; -            setFont(); -            } -      } - -//--------------------------------------------------------- -//   setFont -//--------------------------------------------------------- - -void FontSel::setFont() -      { -      s1->setValue(_font.pointSize()); -      fcb1->setChecked(_font.weight() == QFont::Bold); -      fcb2->setChecked(_font.italic()); -      fcb3->setChecked(_font.underline()); -      int i; -      for (i = 0; i < cb->count(); ++i) { -            QString s = cb->itemText(i); -            if (s == _font.family()) { -                  cb->setCurrentIndex(i); -                  break; -                  } -            } -      if (i == cb->count()) { -            cb->addItem(_font.family()); -            cb->setCurrentIndex(i); -            } -      } - -//--------------------------------------------------------- -//   font -//--------------------------------------------------------- - -const QFont& FontSel::font() -      { -      _font.setPointSize(s1->value()); -      _font.setWeight(fcb1->isChecked() ? QFont::Bold : QFont::Normal); -      _font.setItalic(fcb2->isChecked()); -      _font.setUnderline(fcb3->isChecked()); -      _font.setFamily(cb->currentText()); -      return _font; -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/fontsel.h b/attic/muse_qt4_evolution/muse/widgets/fontsel.h deleted file mode 100644 index 92d076b6..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/fontsel.h +++ /dev/null @@ -1,57 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __FONTSEL_H__ -#define __FONTSEL_H__ - -#include "song.h" - -class QFont; -class QSpinBox; -class QToolButton; -class QComboBox; - -//--------------------------------------------------------- -//   FontSel -//--------------------------------------------------------- - -class FontSel : public QWidget { -      QFont _font; -      QSpinBox* s1; -      QToolButton* fcb1; -      QToolButton* fcb2; -      QToolButton* fcb3; -      QComboBox* cb; - -      Q_OBJECT - -      void setFont(); - -   private slots: -      void fontSelect(); - -   public: -      FontSel(QWidget* parent, const QFont&, const QString&); -      const QFont& font(); -      }; - - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/greendotbutton.h b/attic/muse_qt4_evolution/muse/widgets/greendotbutton.h deleted file mode 100644 index 84bfab96..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/greendotbutton.h +++ /dev/null @@ -1,38 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __GREENDOTBUTTON_H__ -#define __GREENDOTBUTTON_H__ - -#include "simplebutton.h" - -//--------------------------------------------------------- -//   GreendotButton -//--------------------------------------------------------- - -class GreendotButton : public SimpleButton { -      Q_OBJECT - -   public: -      GreendotButton(QWidget* parent = 0); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/intlabel.h b/attic/muse_qt4_evolution/muse/widgets/intlabel.h deleted file mode 100644 index c8919735..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/intlabel.h +++ /dev/null @@ -1,56 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __INTLABEL_H__ -#define __INTLABEL_H__ - -#include "nentry.h" - -class QString; - -//--------------------------------------------------------- -//   IntLabel -//--------------------------------------------------------- - -class IntLabel : public Nentry { -      int min, max, off; -      QString suffix; -      QString specialValue; -      Q_OBJECT - -      void init(); - -      virtual bool setSValue(const QString&); -      virtual bool setString(int val, bool editable = false); -      virtual void incValue(int); -      virtual void decValue(int); - -   signals: -      void valueChanged(int); - -   public: -      IntLabel(int, int, int, QWidget*, int _off = MAXINT, -         const QString& = QString(""), int lpos = 0); -      void setOff(int v); -      void setSuffix(const QString& s) { suffix = s; } -      void setSpecialValueText(const QString& s); -      }; - -#endif diff --git a/attic/muse_qt4_evolution/muse/widgets/menutitle.cpp b/attic/muse_qt4_evolution/muse/widgets/menutitle.cpp deleted file mode 100644 index 0dd7ddab..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/menutitle.cpp +++ /dev/null @@ -1,50 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "menutitle.h" - -//--------------------------------------------------------- -//   MenuTitleItem -//--------------------------------------------------------- - -MenuTitleItem::MenuTitleItem(QString ss) -  : s(ss) -      { -      } - -//--------------------------------------------------------- -//   sizeHint -//--------------------------------------------------------- - -QSize MenuTitleItem::sizeHint() -      { -      return QSize(60, 20); -      } - -//--------------------------------------------------------- -//   drawItem -//--------------------------------------------------------- - -void MenuTitleItem::paint(QPainter* p, const QColorGroup&, bool, -   bool, int x, int y, int w, int h) -      { -      p->fillRect(x, y, w, h, QBrush(lightGray)); -      p->drawText(x, y, w, h, AlignCenter, s); -      } diff --git a/attic/muse_qt4_evolution/muse/widgets/menutitle.h b/attic/muse_qt4_evolution/muse/widgets/menutitle.h deleted file mode 100644 index f3e85849..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/menutitle.h +++ /dev/null @@ -1,41 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __MENUTITLE_H__ -#define __MENUTITLE_H__ - -//--------------------------------------------------------- -//   MenuTitleItem -//--------------------------------------------------------- - -class MenuTitleItem : public QCustomMenuItem { -      QString s; -      virtual bool fullSpan() const    { return true; } -      virtual bool isSeparator() const { return true; } -      virtual void paint(QPainter* p, const QColorGroup& cg, bool act, -         bool, int, int, int, int); -      virtual QSize sizeHint(); - -   public: -      MenuTitleItem(QString s); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/midisync.cpp b/attic/muse_qt4_evolution/muse/widgets/midisync.cpp deleted file mode 100644 index 7b6f69df..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/midisync.cpp +++ /dev/null @@ -1,128 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "al/al.h" -#include "midisync.h" -#include "sync.h" - -//--------------------------------------------------------- -//   MidiSyncConfig -//    Midi Sync Config -//--------------------------------------------------------- - -MidiSyncConfig::MidiSyncConfig(QWidget* parent) -  : QDialog(parent) -      { -      setupUi(this); -      connect(okButton, SIGNAL(clicked()), SLOT(ok())); -      connect(applyButton, SIGNAL(clicked()), SLOT(apply())); -      connect(cancelButton, SIGNAL(clicked()), SLOT(cancel())); - -      connect(syncMaster, SIGNAL(toggled(bool)), SLOT(syncMasterChanged(bool))); -      connect(syncSlave, SIGNAL(toggled(bool)), SLOT(syncSlaveChanged(bool))); - -//      dstDevId->setValue(txDeviceId); -//      srcDevId->setValue(rxDeviceId); - -      mtcSync->setChecked(genMTCSync); -      mcSync->setChecked(genMCSync); -      midiMachineControl->setChecked(genMMC); - -      acceptMTCCheckbox->setChecked(acceptMTC); -      acceptMCCheckbox->setChecked(acceptMC); -      acceptMMCCheckbox->setChecked(acceptMMC); - -      mtcSyncType->setCurrentIndex(AL::mtcType); - -      mtcOffH->setValue(mtcOffset.h()); -      mtcOffM->setValue(mtcOffset.m()); -      mtcOffS->setValue(mtcOffset.s()); -      mtcOffF->setValue(mtcOffset.f()); -      mtcOffSf->setValue(mtcOffset.sf()); - -      syncSlaveChanged(extSyncFlag); -      } - -//--------------------------------------------------------- -//   ok Pressed -//--------------------------------------------------------- - -void MidiSyncConfig::ok() -      { -      apply(); -      cancel(); -      } - -//--------------------------------------------------------- -//   cancel Pressed -//--------------------------------------------------------- - -void MidiSyncConfig::cancel() -      { -      close(); -      } - -//--------------------------------------------------------- -//   apply Pressed -//--------------------------------------------------------- - -void MidiSyncConfig::apply() -      { -//      txDeviceId  = dstDevId->value(); -//      rxDeviceId  = srcDevId->value(); - -      genMTCSync  = mtcSync->isChecked(); -      genMCSync   = mcSync->isChecked(); -      genMMC      = midiMachineControl->isChecked(); - -      AL::mtcType = mtcSyncType->currentIndex(); -      extSyncFlag = syncSlave->isChecked(); - -      mtcOffset.setH(mtcOffH->value()); -      mtcOffset.setM(mtcOffM->value()); -      mtcOffset.setS(mtcOffS->value()); -      mtcOffset.setF(mtcOffF->value()); -      mtcOffset.setSf(mtcOffSf->value()); - -      acceptMC  = acceptMCCheckbox->isChecked(); -      acceptMMC = acceptMMCCheckbox->isChecked(); -      acceptMTC = acceptMTCCheckbox->isChecked(); -      emit syncChanged(); -      } - -//--------------------------------------------------------- -//   syncMasterChanged -//--------------------------------------------------------- - -void MidiSyncConfig::syncMasterChanged(bool val) -      { -      syncSlave->setChecked(!val); -      } - -//--------------------------------------------------------- -//   syncSlaveChanged -//--------------------------------------------------------- - -void MidiSyncConfig::syncSlaveChanged(bool val) -      { -      syncMaster->setChecked(!val); -      } - - diff --git a/attic/muse_qt4_evolution/muse/widgets/midisync.h b/attic/muse_qt4_evolution/muse/widgets/midisync.h deleted file mode 100644 index c1db5fdd..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/midisync.h +++ /dev/null @@ -1,49 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __MIDISYNC_H__ -#define __MIDISYNC_H__ - -#include "ui_midisync.h" - -//--------------------------------------------------------- -//   MidiSyncConfig -//--------------------------------------------------------- - -class MidiSyncConfig : public QDialog, private Ui::MidiSyncConfigBase { -      Q_OBJECT - -   private slots: -      void syncMasterChanged(bool); -      void syncSlaveChanged(bool); -      void ok(); -      void cancel(); -      void apply(); - -   signals: -      void syncChanged(); - -   public: -      MidiSyncConfig(QWidget* parent=0); -      MidiSyncConfig(); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/midisync.ui b/attic/muse_qt4_evolution/muse/widgets/midisync.ui deleted file mode 100644 index 6ea9ef1a..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/midisync.ui +++ /dev/null @@ -1,711 +0,0 @@ -<ui version="4.0" > - <author>werner schweer</author> - <comment>midi sync -configuration dialog</comment> - <exportmacro></exportmacro> - <class>MidiSyncConfigBase</class> - <widget class="QDialog" name="MidiSyncConfigBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>530</width> -    <height>359</height> -   </rect> -  </property> -  <property name="sizePolicy" > -   <sizepolicy> -    <hsizetype>4</hsizetype> -    <vsizetype>4</vsizetype> -    <horstretch>0</horstretch> -    <verstretch>0</verstretch> -   </sizepolicy> -  </property> -  <property name="windowTitle" > -   <string>MusE: Midi Sync</string> -  </property> -  <layout class="QGridLayout" > -   <property name="margin" > -    <number>9</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item row="0" column="0" > -    <widget class="QGroupBox" name="syncMaster" > -     <property name="title" > -      <string>Master</string> -     </property> -     <property name="checkable" > -      <bool>true</bool> -     </property> -     <property name="checked" > -      <bool>true</bool> -     </property> -     <layout class="QVBoxLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item> -       <widget class="QCheckBox" name="mtcSync" > -        <property name="enabled" > -         <bool>true</bool> -        </property> -        <property name="text" > -         <string>Midi Time Code (MTC)</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QCheckBox" name="mcSync" > -        <property name="enabled" > -         <bool>true</bool> -        </property> -        <property name="text" > -         <string>Midi Clock</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QCheckBox" name="midiMachineControl" > -        <property name="enabled" > -         <bool>true</bool> -        </property> -        <property name="text" > -         <string>Midi Machine Control (MMC)</string> -        </property> -       </widget> -      </item> -      <item> -       <layout class="QHBoxLayout" > -        <property name="margin" > -         <number>0</number> -        </property> -        <property name="spacing" > -         <number>6</number> -        </property> -        <item> -         <widget class="QLabel" name="TextLabel7" > -          <property name="enabled" > -           <bool>true</bool> -          </property> -          <property name="sizePolicy" > -           <sizepolicy> -            <hsizetype>5</hsizetype> -            <vsizetype>0</vsizetype> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -           </sizepolicy> -          </property> -          <property name="text" > -           <string>Id:</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="dstDevId" > -          <property name="enabled" > -           <bool>true</bool> -          </property> -          <property name="sizePolicy" > -           <sizepolicy> -            <hsizetype>5</hsizetype> -            <vsizetype>0</vsizetype> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -           </sizepolicy> -          </property> -          <property name="toolTip" > -           <string>device id</string> -          </property> -          <property name="maximum" > -           <number>127</number> -          </property> -          <property name="minimum" > -           <number>0</number> -          </property> -          <property name="value" > -           <number>127</number> -          </property> -         </widget> -        </item> -        <item> -         <spacer> -          <property name="orientation" > -           <enum>Qt::Horizontal</enum> -          </property> -          <property name="sizeType" > -           <enum>QSizePolicy::Preferred</enum> -          </property> -          <property name="sizeHint" > -           <size> -            <width>30</width> -            <height>20</height> -           </size> -          </property> -         </spacer> -        </item> -       </layout> -      </item> -     </layout> -    </widget> -   </item> -   <item row="0" column="1" > -    <widget class="QGroupBox" name="syncSlave" > -     <property name="title" > -      <string>Slave</string> -     </property> -     <property name="checkable" > -      <bool>true</bool> -     </property> -     <property name="checked" > -      <bool>false</bool> -     </property> -     <layout class="QVBoxLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item> -       <widget class="QCheckBox" name="acceptMTCCheckbox" > -        <property name="enabled" > -         <bool>false</bool> -        </property> -        <property name="text" > -         <string>accept MTC</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QCheckBox" name="acceptMCCheckbox" > -        <property name="enabled" > -         <bool>false</bool> -        </property> -        <property name="text" > -         <string>accept Midi Clock</string> -        </property> -       </widget> -      </item> -      <item> -       <widget class="QCheckBox" name="acceptMMCCheckbox" > -        <property name="enabled" > -         <bool>false</bool> -        </property> -        <property name="text" > -         <string>accept MMC</string> -        </property> -       </widget> -      </item> -      <item> -       <layout class="QHBoxLayout" > -        <property name="margin" > -         <number>0</number> -        </property> -        <property name="spacing" > -         <number>6</number> -        </property> -        <item> -         <widget class="QLabel" name="TextLabel7_2" > -          <property name="sizePolicy" > -           <sizepolicy> -            <hsizetype>5</hsizetype> -            <vsizetype>0</vsizetype> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -           </sizepolicy> -          </property> -          <property name="text" > -           <string>Id:</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="srcDevId" > -          <property name="sizePolicy" > -           <sizepolicy> -            <hsizetype>5</hsizetype> -            <vsizetype>0</vsizetype> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -           </sizepolicy> -          </property> -          <property name="toolTip" > -           <string>device id</string> -          </property> -          <property name="maximum" > -           <number>127</number> -          </property> -          <property name="minimum" > -           <number>0</number> -          </property> -          <property name="value" > -           <number>127</number> -          </property> -         </widget> -        </item> -        <item> -         <spacer> -          <property name="orientation" > -           <enum>Qt::Horizontal</enum> -          </property> -          <property name="sizeType" > -           <enum>QSizePolicy::Expanding</enum> -          </property> -          <property name="sizeHint" > -           <size> -            <width>40</width> -            <height>20</height> -           </size> -          </property> -         </spacer> -        </item> -       </layout> -      </item> -     </layout> -    </widget> -   </item> -   <item row="2" column="0" colspan="2" > -    <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="sizeType" > -        <enum>QSizePolicy::Expanding</enum> -       </property> -       <property name="sizeHint" > -        <size> -         <width>20</width> -         <height>20</height> -        </size> -       </property> -      </spacer> -     </item> -     <item> -      <widget class="QPushButton" name="applyButton" > -       <property name="text" > -        <string>Apply</string> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="okButton" > -       <property name="text" > -        <string>Ok</string> -       </property> -       <property name="default" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="cancelButton" > -       <property name="text" > -        <string>Cancel</string> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item row="1" column="0" colspan="2" > -    <widget class="QGroupBox" name="GroupBox13" > -     <property name="enabled" > -      <bool>true</bool> -     </property> -     <property name="sizePolicy" > -      <sizepolicy> -       <hsizetype>5</hsizetype> -       <vsizetype>5</vsizetype> -       <horstretch>0</horstretch> -       <verstretch>0</verstretch> -      </sizepolicy> -     </property> -     <property name="title" > -      <string>MTC</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="QLabel" name="textLabel2" > -          <property name="sizePolicy" > -           <sizepolicy> -            <hsizetype>5</hsizetype> -            <vsizetype>0</vsizetype> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -           </sizepolicy> -          </property> -          <property name="text" > -           <string>Type:</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QComboBox" name="mtcSyncType" > -          <property name="sizePolicy" > -           <sizepolicy> -            <hsizetype>5</hsizetype> -            <vsizetype>0</vsizetype> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -           </sizepolicy> -          </property> -          <item> -           <property name="text" > -            <string>24</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>25</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>30D</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>30N</string> -           </property> -          </item> -         </widget> -        </item> -        <item> -         <spacer> -          <property name="orientation" > -           <enum>Qt::Horizontal</enum> -          </property> -          <property name="sizeType" > -           <enum>QSizePolicy::Expanding</enum> -          </property> -          <property name="sizeHint" > -           <size> -            <width>407</width> -            <height>69</height> -           </size> -          </property> -         </spacer> -        </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="textLabel1" > -          <property name="text" > -           <string>Offset:</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="mtcOffH" > -          <property name="enabled" > -           <bool>false</bool> -          </property> -          <property name="toolTip" > -           <string>hour</string> -          </property> -          <property name="maximum" > -           <number>23</number> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QLabel" name="TextLabel2" > -          <property name="text" > -           <string>h</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="mtcOffM" > -          <property name="enabled" > -           <bool>false</bool> -          </property> -          <property name="toolTip" > -           <string>minute</string> -          </property> -          <property name="maximum" > -           <number>59</number> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QLabel" name="TextLabel3" > -          <property name="text" > -           <string>m</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="mtcOffS" > -          <property name="enabled" > -           <bool>false</bool> -          </property> -          <property name="toolTip" > -           <string>second</string> -          </property> -          <property name="maximum" > -           <number>59</number> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QLabel" name="TextLabel4" > -          <property name="text" > -           <string>s</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="mtcOffF" > -          <property name="enabled" > -           <bool>false</bool> -          </property> -          <property name="toolTip" > -           <string>frame</string> -          </property> -          <property name="maximum" > -           <number>30</number> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QLabel" name="TextLabel5" > -          <property name="text" > -           <string>f</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QSpinBox" name="mtcOffSf" > -          <property name="enabled" > -           <bool>false</bool> -          </property> -          <property name="toolTip" > -           <string>subframe</string> -          </property> -         </widget> -        </item> -       </layout> -      </item> -     </layout> -    </widget> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <tabstops> -  <tabstop>acceptMTCCheckbox</tabstop> -  <tabstop>acceptMCCheckbox</tabstop> -  <tabstop>mtcSync</tabstop> -  <tabstop>mcSync</tabstop> -  <tabstop>midiMachineControl</tabstop> -  <tabstop>dstDevId</tabstop> -  <tabstop>mtcOffH</tabstop> -  <tabstop>mtcOffM</tabstop> -  <tabstop>mtcOffS</tabstop> -  <tabstop>mtcOffF</tabstop> -  <tabstop>mtcOffSf</tabstop> -  <tabstop>applyButton</tabstop> -  <tabstop>okButton</tabstop> -  <tabstop>cancelButton</tabstop> - </tabstops> - <resources/> - <connections> -  <connection> -   <sender>syncSlave</sender> -   <signal>toggled(bool)</signal> -   <receiver>acceptMTCCheckbox</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>377</x> -     <y>79</y> -    </hint> -    <hint type="destinationlabel" > -     <x>341</x> -     <y>67</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncSlave</sender> -   <signal>toggled(bool)</signal> -   <receiver>acceptMCCheckbox</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>365</x> -     <y>102</y> -    </hint> -    <hint type="destinationlabel" > -     <x>361</x> -     <y>94</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncSlave</sender> -   <signal>toggled(bool)</signal> -   <receiver>acceptMMCCheckbox</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>392</x> -     <y>132</y> -    </hint> -    <hint type="destinationlabel" > -     <x>328</x> -     <y>121</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncSlave</sender> -   <signal>toggled(bool)</signal> -   <receiver>srcDevId</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>366</x> -     <y>103</y> -    </hint> -    <hint type="destinationlabel" > -     <x>375</x> -     <y>147</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>mcSync</sender> -   <signal>toggled(bool)</signal> -   <receiver>mcSync</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>255</x> -     <y>94</y> -    </hint> -    <hint type="destinationlabel" > -     <x>255</x> -     <y>94</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>mtcSync</sender> -   <signal>toggled(bool)</signal> -   <receiver>mtcSync</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>255</x> -     <y>67</y> -    </hint> -    <hint type="destinationlabel" > -     <x>255</x> -     <y>67</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncMaster</sender> -   <signal>toggled(bool)</signal> -   <receiver>midiMachineControl</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>268</x> -     <y>131</y> -    </hint> -    <hint type="destinationlabel" > -     <x>255</x> -     <y>121</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncMaster</sender> -   <signal>toggled(bool)</signal> -   <receiver>dstDevId</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>268</x> -     <y>129</y> -    </hint> -    <hint type="destinationlabel" > -     <x>175</x> -     <y>147</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncMaster</sender> -   <signal>toggled(bool)</signal> -   <receiver>mtcSync</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>268</x> -     <y>40</y> -    </hint> -    <hint type="destinationlabel" > -     <x>255</x> -     <y>67</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>syncMaster</sender> -   <signal>toggled(bool)</signal> -   <receiver>GroupBox13</receiver> -   <slot>setEnabled(bool)</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>53</x> -     <y>17</y> -    </hint> -    <hint type="destinationlabel" > -     <x>41</x> -     <y>256</y> -    </hint> -   </hints> -  </connection> - </connections> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/mittransposebase.h b/attic/muse_qt4_evolution/muse/widgets/mittransposebase.h deleted file mode 100644 index 531cb200..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/mittransposebase.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef MITTRANSPOSEBASE_H -#define MITTRANSPOSEBASE_H - -#include <qvariant.h> - - -#include <QtCore/QVariant> -#include <QtGui/QAction> -#include <QtGui/QApplication> -#include <QtGui/QButtonGroup> -#include <QtGui/QCheckBox> -#include <QtGui/QHBoxLayout> -#include <QtGui/QLabel> -#include <QtGui/QWidget> -#include "awl/pitchedit.h" -#include <awl::pitchedit.h> -#include <Qt3Support/Q3MimeSourceFactory> - -class Ui_MITTransposeBase -{ -public: -    QHBoxLayout *hboxLayout; -    QCheckBox *onCheckBox; -    QLabel *TextLabel1; -    Awl::PitchEdit *triggerKeySpinBox; -    QLabel *TextLabel2; -    QLabel *transposeLabel; - -    void setupUi(QWidget *MITTransposeBase) -    { -    MITTransposeBase->setObjectName(QString::fromUtf8("MITTransposeBase")); -    MITTransposeBase->resize(QSize(423, 50).expandedTo(MITTransposeBase->minimumSizeHint())); -    hboxLayout = new QHBoxLayout(MITTransposeBase); -    hboxLayout->setSpacing(6); -    hboxLayout->setMargin(11); -    hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); -    onCheckBox = new QCheckBox(MITTransposeBase); -    onCheckBox->setObjectName(QString::fromUtf8("onCheckBox")); - -    hboxLayout->addWidget(onCheckBox); - -    TextLabel1 = new QLabel(MITTransposeBase); -    TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); -    TextLabel1->setAlignment(Qt::AlignVCenter|Qt::AlignRight); -    TextLabel1->setIndent(5); - -    hboxLayout->addWidget(TextLabel1); - -    triggerKeySpinBox = new Awl::PitchEdit(MITTransposeBase); -    triggerKeySpinBox->setObjectName(QString::fromUtf8("triggerKeySpinBox")); - -    hboxLayout->addWidget(triggerKeySpinBox); - -    TextLabel2 = new QLabel(MITTransposeBase); -    TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); -    TextLabel2->setAlignment(Qt::AlignVCenter|Qt::AlignRight); -    TextLabel2->setIndent(5); - -    hboxLayout->addWidget(TextLabel2); - -    transposeLabel = new QLabel(MITTransposeBase); -    transposeLabel->setObjectName(QString::fromUtf8("transposeLabel")); -    QSizePolicy sizePolicy((QSizePolicy::Policy)5, (QSizePolicy::Policy)0); -    sizePolicy.setHorizontalStretch(0); -    sizePolicy.setVerticalStretch(0); -    sizePolicy.setHeightForWidth(transposeLabel->sizePolicy().hasHeightForWidth()); -    transposeLabel->setSizePolicy(sizePolicy); -    transposeLabel->setFrameShape(QFrame::Panel); -    transposeLabel->setLineWidth(2); -    transposeLabel->setMargin(2); -    transposeLabel->setMidLineWidth(2); -    transposeLabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight); -    transposeLabel->setIndent(5); - -    hboxLayout->addWidget(transposeLabel); - -    retranslateUi(MITTransposeBase); - -    QMetaObject::connectSlotsByName(MITTransposeBase); -    } // setupUi - -    void retranslateUi(QWidget *MITTransposeBase) -    { -    MITTransposeBase->setWindowTitle(QApplication::translate("MITTransposeBase", "MusE: Midi Input Plugin: Transpose", 0, QApplication::UnicodeUTF8)); -    onCheckBox->setText(QApplication::translate("MITTransposeBase", "On", 0, QApplication::UnicodeUTF8)); -    TextLabel1->setText(QApplication::translate("MITTransposeBase", "TriggerKey", 0, QApplication::UnicodeUTF8)); -    TextLabel2->setText(QApplication::translate("MITTransposeBase", "Transpose:", 0, QApplication::UnicodeUTF8)); -    transposeLabel->setText(QApplication::translate("MITTransposeBase", "+0", 0, QApplication::UnicodeUTF8)); -    Q_UNUSED(MITTransposeBase); -    } // retranslateUi - -}; - -namespace Ui { -    class MITTransposeBase: public Ui_MITTransposeBase {}; -} // namespace Ui - -class MITTransposeBase : public QWidget, public Ui::MITTransposeBase -{ -    Q_OBJECT - -public: -    MITTransposeBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); -    ~MITTransposeBase(); - -protected slots: -    virtual void languageChange(); - -}; - -#endif // MITTRANSPOSEBASE_H diff --git a/attic/muse_qt4_evolution/muse/widgets/mittransposebase.ui b/attic/muse_qt4_evolution/muse/widgets/mittransposebase.ui deleted file mode 100644 index c1aad75a..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/mittransposebase.ui +++ /dev/null @@ -1,112 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>MITTransposeBase</class> - <widget class="QWidget" name="MITTransposeBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>423</width> -    <height>50</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>MusE: Midi Input Plugin: Transpose</string> -  </property> -  <layout class="QHBoxLayout" > -   <property name="margin" > -    <number>11</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item> -    <widget class="QCheckBox" name="onCheckBox" > -     <property name="text" > -      <string>On</string> -     </property> -    </widget> -   </item> -   <item> -    <widget class="QLabel" name="TextLabel1" > -     <property name="text" > -      <string>TriggerKey</string> -     </property> -     <property name="alignment" > -      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> -     </property> -     <property name="indent" > -      <number>5</number> -     </property> -    </widget> -   </item> -   <item> -    <widget class="Awl::PitchEdit" name="triggerKeySpinBox" /> -   </item> -   <item> -    <widget class="QLabel" name="TextLabel2" > -     <property name="text" > -      <string>Transpose:</string> -     </property> -     <property name="alignment" > -      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> -     </property> -     <property name="indent" > -      <number>5</number> -     </property> -    </widget> -   </item> -   <item> -    <widget class="QLabel" name="transposeLabel" > -     <property name="sizePolicy" > -      <sizepolicy> -       <hsizetype>5</hsizetype> -       <vsizetype>0</vsizetype> -       <horstretch>0</horstretch> -       <verstretch>0</verstretch> -      </sizepolicy> -     </property> -     <property name="frameShape" > -      <enum>QFrame::Panel</enum> -     </property> -     <property name="lineWidth" > -      <number>2</number> -     </property> -     <property name="midLineWidth" > -      <number>2</number> -     </property> -     <property name="text" > -      <string>+0</string> -     </property> -     <property name="alignment" > -      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> -     </property> -     <property name="margin" > -      <number>2</number> -     </property> -     <property name="indent" > -      <number>5</number> -     </property> -    </widget> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> -  <customwidget> -   <class>Awl::PitchEdit</class> -   <extends>QWidget</extends> -   <header>awl::pitchedit.h</header> -   <container>1</container> -   <pixmap></pixmap> -  </customwidget> - </customwidgets> - <includes> -  <include location="local" >awl/pitchedit.h</include> - </includes> - <resources/> - <connections/> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.cpp b/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.cpp deleted file mode 100644 index ac517d30..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.cpp +++ /dev/null @@ -1,133 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "al/al.h" -#include "mixdowndialog.h" -#include "globals.h" -#include "wave.h" -#include "song.h" -#include "gconfig.h" - -//--------------------------------------------------------- -//   sndFileOpen -//    sf - old soundfile, used to preset file parameters -//--------------------------------------------------------- - -SndFile* getSndFile(SndFile* sf, QWidget* parent) -      { -      MixdownFileDialog* dialog = new MixdownFileDialog(sf, parent); -      dialog->exec(); -      SndFile* sndFile = dialog->sndFile(); -      delete dialog; -      return sndFile; -      } - -//--------------------------------------------------------- -//   MixdownFileDialog -//--------------------------------------------------------- - -MixdownFileDialog::MixdownFileDialog(SndFile* _sf, QWidget* parent) -   : QDialog(parent) -      { -      setupUi(this); -      sf   = 0; -      connect(buttonPath, SIGNAL(clicked()), SLOT(fdialog())); -      if (_sf) { -            int channels = _sf->channels(); -            int format   = _sf->format(); -            switch(channels) { -                  case 1:  channels = 1; break; -                  case 2:  channels = 0; break; -                  case 6:  channels = 2; break; -                  } -            editPath->setText(_sf->finfo()->filePath()); -            comboChannel->setCurrentIndex(channels); -            comboFormat->setCurrentIndex(format); -            } -      else { -            // create unique mixdown file path -            QString path = QDir::homePath() + "/" + config.projectPath + "/" + song->projectPath(); - -            QDir dir(path); -            for (int i = 1; i < 1000; ++i) { -                  QString fp = QString("md%2.wav").arg(i); -                  if (!dir.exists(fp)) { -                        path = dir.filePath(fp); -                        break; -                        } -                  } -            editPath->setText(path); -            } -      } - -//--------------------------------------------------------- -//   accept -//--------------------------------------------------------- - -void MixdownFileDialog::accept() -      { -      QString oldpath; -      unsigned channel = comboChannel->currentIndex(); -      unsigned format  = comboFormat->currentIndex(); -      switch (channel) { -            case 0: channel = 2; break; -            case 1: channel = 1; break; -            case 2: channel = 6; break;     // not implemented! -            } -      switch (format) { -            case 0:     // 16 bit wave -                  format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; -                  break; -            case 1:     // 24 bit wave -                  format = SF_FORMAT_WAV | SF_FORMAT_PCM_24; -                  break; -            case 2:     // 32 bit float wave -                  format = SF_FORMAT_WAV | SF_FORMAT_FLOAT; -                  break; -            } -      QString path = editPath->text(); -      if (path.isEmpty()) { -            sf = 0; -            reject(); -            return; -            } -      if (path.right(4) != ".wav") -            path += ".wav"; -      sf = new SndFile(path); -      sf->setFormat(format, channel, AL::sampleRate); -      done(1); -      } - -//--------------------------------------------------------- -//   fdialog -//--------------------------------------------------------- - -void MixdownFileDialog::fdialog() -      { -      QString path = QFileDialog::getSaveFileName( -         this, -         tr("MusE: set mixdown file name"), -         editPath->text(), -         tr("Wave Files (*.wav);;All Files (*)") -         ); -      if (!path.isEmpty()) -            editPath->setText(path); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.h b/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.h deleted file mode 100644 index 58d1b970..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.h +++ /dev/null @@ -1,48 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __MIXDOWNDIALOG_H__ -#define __MIXDOWNDIALOG_H__ - -#include "ui_mixdowndialog.h" - -class SndFile; - -extern SndFile* getSndFile(SndFile* sf, QWidget* parent); - -//--------------------------------------------------------- -//   MixdownFileDialog -//--------------------------------------------------------- - -class MixdownFileDialog : public QDialog, private Ui::MixdownFileDialogBase { -    Q_OBJECT -      SndFile* sf; - -   private slots: -      void fdialog(); -      virtual void accept(); - -   public: -      MixdownFileDialog(SndFile* f, QWidget* parent = 0); -      SndFile* sndFile() { return sf; } -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.ui b/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.ui deleted file mode 100644 index c1c3d4fa..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/mixdowndialog.ui +++ /dev/null @@ -1,212 +0,0 @@ -<ui version="4.0" > - <class>MixdownFileDialogBase</class> - <widget class="QDialog" name="MixdownFileDialogBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>381</width> -    <height>116</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>MusE: Set Mixdown Wavefile</string> -  </property> -  <property name="sizeGripEnabled" > -   <bool>true</bool> -  </property> -  <layout class="QGridLayout" > -   <property name="margin" > -    <number>11</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item row="2" column="0" colspan="5" > -    <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="sizeType" > -        <enum>QSizePolicy::Expanding</enum> -       </property> -       <property name="sizeHint" > -        <size> -         <width>20</width> -         <height>20</height> -        </size> -       </property> -      </spacer> -     </item> -     <item> -      <widget class="QPushButton" name="buttonOk" > -       <property name="text" > -        <string>&OK</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -       <property name="default" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="buttonCancel" > -       <property name="text" > -        <string>&Cancel</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item row="0" column="0" > -    <widget class="QLabel" name="TextLabel1" > -     <property name="text" > -      <string>File Path</string> -     </property> -    </widget> -   </item> -   <item row="1" column="0" > -    <widget class="QLabel" name="TextLabel2" > -     <property name="text" > -      <string>Channel</string> -     </property> -    </widget> -   </item> -   <item row="0" column="1" colspan="4" > -    <layout class="QHBoxLayout" > -     <property name="margin" > -      <number>0</number> -     </property> -     <property name="spacing" > -      <number>6</number> -     </property> -     <item> -      <widget class="QLineEdit" name="editPath" /> -     </item> -     <item> -      <widget class="QToolButton" name="buttonPath" > -       <property name="text" > -        <string/> -       </property> -       <property name="icon" > -        <iconset resource="../muse.qrc" >:/xpm/fileopen.png</iconset> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item row="1" column="1" > -    <widget class="QComboBox" name="comboChannel" > -     <item> -      <property name="text" > -       <string>Stereo</string> -      </property> -     </item> -     <item> -      <property name="text" > -       <string>Mono</string> -      </property> -     </item> -     <item> -      <property name="text" > -       <string>5.1</string> -      </property> -     </item> -    </widget> -   </item> -   <item row="1" column="4" > -    <widget class="QComboBox" name="comboFormat" > -     <item> -      <property name="text" > -       <string>wav,16 Bit</string> -      </property> -     </item> -     <item> -      <property name="text" > -       <string>wav, 24 Bit</string> -      </property> -     </item> -     <item> -      <property name="text" > -       <string>wav, 32 Bit (float)</string> -      </property> -     </item> -    </widget> -   </item> -   <item row="1" column="3" > -    <widget class="QLabel" name="TextLabel3" > -     <property name="text" > -      <string>Format</string> -     </property> -    </widget> -   </item> -   <item row="1" column="2" > -    <spacer> -     <property name="orientation" > -      <enum>Qt::Horizontal</enum> -     </property> -     <property name="sizeType" > -      <enum>QSizePolicy::Expanding</enum> -     </property> -     <property name="sizeHint" > -      <size> -       <width>20</width> -       <height>20</height> -      </size> -     </property> -    </spacer> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <resources> -  <include location="../muse.qrc" /> - </resources> - <connections> -  <connection> -   <sender>buttonOk</sender> -   <signal>clicked()</signal> -   <receiver>MixdownFileDialogBase</receiver> -   <slot>accept()</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>248</x> -     <y>93</y> -    </hint> -    <hint type="destinationlabel" > -     <x>99</x> -     <y>89</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>buttonCancel</sender> -   <signal>clicked()</signal> -   <receiver>MixdownFileDialogBase</receiver> -   <slot>reject()</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>318</x> -     <y>94</y> -    </hint> -    <hint type="destinationlabel" > -     <x>170</x> -     <y>105</y> -    </hint> -   </hints> -  </connection> - </connections> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/noteinfo.cpp b/attic/muse_qt4_evolution/muse/widgets/noteinfo.cpp deleted file mode 100644 index 9ae02ab0..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/noteinfo.cpp +++ /dev/null @@ -1,207 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "noteinfo.h" -#include "song.h" -#include "globals.h" -#include "awl/posedit.h" -#include "awl/pitchedit.h" - -//--------------------------------------------------- -//    NoteInfo -//    ToolBar -//    Start, Len, Note, Velo on, Velo off, Channel -//--------------------------------------------------- - -NoteInfo::NoteInfo(QMainWindow* parent) -   : QToolBar(tr("Note Info"), parent) -      { -      deltaMode = false; - -      QLabel* label = new QLabel(tr("Start")); -      label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); -      label->setIndent(3); -      addWidget(label); - -      selTime = new Awl::PosEdit; -      selTime->setFixedHeight(24); -      addWidget(selTime); - -      label = new QLabel(tr("Len"), this); -      label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); -      label->setIndent(3); -      addWidget(label); - -      selLen = new QSpinBox(this); -      selLen->setRange(0, 100000); -      selLen->setFixedHeight(24); -      addWidget(selLen); - -      label = new QLabel(tr("Pitch"), this); -      label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); -      label->setIndent(3); -      addWidget(label); -      selPitch = new Awl::PitchEdit(this); -      selPitch->setFixedHeight(24); -      addWidget(selPitch); - -      label = new QLabel(tr("Velo On"), this); -      label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); -      label->setIndent(3); -      addWidget(label); -      selVelOn = new QSpinBox(this); -      selVelOn->setRange(0, 127); -      selVelOn->setFixedHeight(24); -      addWidget(selVelOn); - -      label = new QLabel(tr("Velo Off"), this); -      label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); -      label->setIndent(3); -      addWidget(label); -      selVelOff = new QSpinBox(this); -      selVelOff->setRange(0, 127); -      selVelOff->setFixedHeight(24); -      addWidget(selVelOff); - -      connect(selLen,     SIGNAL(valueChanged(int)), SLOT(lenChanged(int))); -      connect(selPitch,   SIGNAL(valueChanged(int)), SLOT(pitchChanged(int))); -      connect(selVelOn,   SIGNAL(valueChanged(int)), SLOT(velOnChanged(int))); -      connect(selVelOff,  SIGNAL(valueChanged(int)), SLOT(velOffChanged(int))); -      connect(selTime,    SIGNAL(valueChanged(const Pos&)), SLOT(timeChanged(const Pos&))); -      } - -//--------------------------------------------------------- -//   setDeltaMode -//--------------------------------------------------------- - -void NoteInfo::setDeltaMode(bool val) -      { -      deltaMode = val; -      selPitch->setDeltaMode(val); -      if (val) { -            selLen->setRange(-100000, 100000); -            selVelOn->setRange(-127, 127); -            selVelOff->setRange(-127, 127); -            } -      else { -            selLen->setRange(0, 100000); -            selVelOn->setRange(0, 127); -            selVelOff->setRange(0, 127); -            } -      } - -//--------------------------------------------------------- -//   lenChanged -//--------------------------------------------------------- - -void NoteInfo::lenChanged(int val) -      { -      if (!signalsBlocked()) -            emit valueChanged(VAL_LEN, val); -      } - -//--------------------------------------------------------- -//   velOnChanged -//--------------------------------------------------------- - -void NoteInfo::velOnChanged(int val) -      { -      if (!signalsBlocked()) -            emit valueChanged(VAL_VELON, val); -      } - -//--------------------------------------------------------- -//   velOffChanged -//--------------------------------------------------------- - -void NoteInfo::velOffChanged(int val) -      { -      if (!signalsBlocked()) -            emit valueChanged(VAL_VELOFF, val); -      } - -//--------------------------------------------------------- -//   pitchChanged -//--------------------------------------------------------- - -void NoteInfo::pitchChanged(int val) -      { -      if (!signalsBlocked()) -            emit valueChanged(VAL_PITCH, val); -      } - -//--------------------------------------------------------- -//   setValue -//--------------------------------------------------------- - -void NoteInfo::setValue(ValType type, int val) -      { -      blockSignals(true); -      switch(type) { -            case VAL_TIME: -                  selTime->setValue(val); -                  break; -            case VAL_LEN: -                  selLen->setValue(val); -                  break; -            case VAL_VELON: -                  selVelOn->setValue(val); -                  break; -            case VAL_VELOFF: -                  selVelOff->setValue(val); -                  break; -            case VAL_PITCH: -                  selPitch->setValue(val); -                  break; -            } -      blockSignals(false); -      } - -//--------------------------------------------------------- -//   setValue -//--------------------------------------------------------- - -void NoteInfo::setValues(unsigned tick, int val2, int val3, int val4, -   int val5) -      { -      blockSignals(true); -      if (selTime->pos().tick() != tick) -            selTime->setValue(tick); -      if (selLen->value() != val2) -            selLen->setValue(val2); -      if (selPitch->value() != val3) -            selPitch->setValue(val3); -      if (selVelOn->value() != val4) -            selVelOn->setValue(val4); -      if (selVelOff->value() != val5) -            selVelOff->setValue(val5); -      blockSignals(false); -      } - -//--------------------------------------------------------- -//   timeChanged -//--------------------------------------------------------- - -void NoteInfo::timeChanged(const Pos& pos) -      { -      if (!signalsBlocked()) -            emit valueChanged(VAL_TIME, pos.tick()); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/noteinfo.h b/attic/muse_qt4_evolution/muse/widgets/noteinfo.h deleted file mode 100644 index afcb6d1f..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/noteinfo.h +++ /dev/null @@ -1,68 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __NOTE_INFO_H__ -#define __NOTE_INFO_H__ - -namespace Awl { -      class PosEdit; -      class PitchEdit; -      }; -namespace AL { -      class Pos; -      } - -using AL::Pos; - -//--------------------------------------------------------- -//   NoteInfo -//--------------------------------------------------------- - -class NoteInfo : public QToolBar { -      Awl::PosEdit* selTime; -      QSpinBox* selLen; -      Awl::PitchEdit* selPitch; -      QSpinBox* selVelOn; -      QSpinBox* selVelOff; -      bool deltaMode; - -      Q_OBJECT - -   public: -      enum ValType {VAL_TIME, VAL_LEN, VAL_VELON, VAL_VELOFF, VAL_PITCH }; -      NoteInfo(QMainWindow* parent); -      void setValues(unsigned, int, int, int, int); -      void setDeltaMode(bool); - -   private slots: -      void lenChanged(int); -      void velOnChanged(int); -      void velOffChanged(int); -      void pitchChanged(int); -      void timeChanged(const Pos&); - -   public slots: -      void setValue(ValType, int); - -   signals: -      void valueChanged(NoteInfo::ValType, int); -      }; -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/outportcombo.cpp b/attic/muse_qt4_evolution/muse/widgets/outportcombo.cpp deleted file mode 100644 index a3e55adc..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/outportcombo.cpp +++ /dev/null @@ -1,52 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "outportcombo.h" -#include "song.h" -#include "midioutport.h" - -//--------------------------------------------------------- -//   OutportCombo -//--------------------------------------------------------- - -OutportCombo::OutportCombo(QWidget* parent) -   : QComboBox(parent) -      { -      setToolTip(tr("Midi Output Port")); -      populate(); -      // midiPort names may change, when inserting/deleting syntis -      connect(song, SIGNAL(trackAdded(Track*,int)), SLOT(populate())); -      connect(song, SIGNAL(trackRemoved(Track*)), SLOT(populate())); -      } - -//--------------------------------------------------------- -//   populate -//--------------------------------------------------------- - -void OutportCombo::populate() -      { -      int cur = currentIndex(); -      clear(); -      MidiOutPortList* mpl = song->midiOutPorts(); -      for (iMidiOutPort i = mpl->begin(); i != mpl->end(); ++i) -            addItem((*i)->name()); -      setCurrentIndex(cur); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/outportcombo.h b/attic/muse_qt4_evolution/muse/widgets/outportcombo.h deleted file mode 100644 index 8a49fc53..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/outportcombo.h +++ /dev/null @@ -1,39 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __OUTPORTCOMBO_H__ -#define __OUTPORTCOMBO_H__ - -//--------------------------------------------------------- -//   OutportCombo -//--------------------------------------------------------- - -class OutportCombo : public QComboBox { -      Q_OBJECT - -   private slots: -      void populate(); - -   public: -      OutportCombo(QWidget* parent = 0); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/quantcombo.cpp b/attic/muse_qt4_evolution/muse/widgets/quantcombo.cpp deleted file mode 100644 index 89cd27fc..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/quantcombo.cpp +++ /dev/null @@ -1,80 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "quantcombo.h" - -static int quantTable[] = { -      1, 24, 48,  96, 192, 384,  768, 1536, -      16, 32,  64, 128, 256,  512, 1024, -      36, 72, 144, 288, 576, 1152, 2304 -      }; - -static const char* quantStrings[] = { -      QT_TR_NOOP("Off"), "64",  "32",  "16",  "8",  "4",  "2",  "1", -      "64T", "32T", "16T", "8T", "4T", "2T", "1T", -      "64.", "32.", "16.", "8.", "4.", "2.", "1." -      }; - -//--------------------------------------------------------- -//   QuantCombo -//--------------------------------------------------------- - -QuantCombo::QuantCombo(QWidget* parent) -   : QComboBox(parent) -      { -      for (unsigned i = 0; i < sizeof(quantStrings)/sizeof(*quantStrings); i++) -            addItem(tr(quantStrings[i]), i); -      connect(this,  SIGNAL(activated(int)), SLOT(_quantChanged(int))); -      } - -//--------------------------------------------------------- -//   _quantChanged -//--------------------------------------------------------- - -void QuantCombo::_quantChanged(int idx) -      { -      emit quantChanged(quantTable[idx]); -      } - -//--------------------------------------------------------- -//   quant -//--------------------------------------------------------- - -int QuantCombo::quant() const -      { -      return quantTable[currentIndex()]; -      } - -//--------------------------------------------------------- -//   setQuant -//--------------------------------------------------------- - -void QuantCombo::setQuant(int val) -      { -      for (unsigned i = 0; i < sizeof(quantTable)/sizeof(*quantTable); i++) { -            if (val == quantTable[i]) { -                  setCurrentIndex(i); -                  return; -                  } -            } -      printf("setQuant(%d) not defined\n", val); -abort(); -      setCurrentIndex(0); -      } diff --git a/attic/muse_qt4_evolution/muse/widgets/quantcombo.h b/attic/muse_qt4_evolution/muse/widgets/quantcombo.h deleted file mode 100644 index 6cdfb69d..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/quantcombo.h +++ /dev/null @@ -1,46 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __QUANTCOMBO_H__ -#define __QUANTCOMBO_H__ - -//--------------------------------------------------------- -//   QuantCombo -//--------------------------------------------------------- - -class QuantCombo : public QComboBox { -      Q_OBJECT - -   private slots: -      void _quantChanged(int); - -   public slots: -      void setQuant(int); - -   signals: -      void quantChanged(int); - -   public: -      QuantCombo(QWidget* parent = 0); -      int quant() const; -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/rastercombo.cpp b/attic/muse_qt4_evolution/muse/widgets/rastercombo.cpp deleted file mode 100644 index f5b3c7e6..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/rastercombo.cpp +++ /dev/null @@ -1,82 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "rastercombo.h" - -static int rasterTable[] = { -      //------                8    4     2 -      1, 6, 12, 24, 48,  96, 192, 384,  768, 1536, -      4,  8, 16, 32,  64, 128, 256,  512, 1024, -      9, 18, 36, 72, 144, 288, 576, 1152, 2304 -      }; - -static const char* rasterStrings[] = { -      QT_TR_NOOP("Off"), "3pp", "6pp", "64",  "32",  "16",  "8",  "4",  "2",  "1", -      "2pp", "5pp", "64T", "32T", "16T", "8T", "4T", "2T", "1T", -      "4pp", "7pp", "64.", "32.", "16.", "8.", "4.", "2.", "1." -      }; - -//--------------------------------------------------------- -//   RasterCombo -//--------------------------------------------------------- - -RasterCombo::RasterCombo(QWidget* parent) -   : QComboBox(parent) -      { -      for (unsigned i = 0; i < sizeof(rasterStrings)/sizeof(*rasterStrings); i++) -            addItem(tr(rasterStrings[i]), i); -      connect(this, SIGNAL(activated(int)), SLOT(_rasterChanged(int))); -      } - -//--------------------------------------------------------- -//   _rasterChanged -//--------------------------------------------------------- - -void RasterCombo::_rasterChanged(int idx) -      { -      emit rasterChanged(rasterTable[idx]); -      } - -//--------------------------------------------------------- -//   raster -//--------------------------------------------------------- - -int RasterCombo::raster() const -      { -      return rasterTable[currentIndex()]; -      } - -//--------------------------------------------------------- -//   setRaster -//--------------------------------------------------------- - -void RasterCombo::setRaster(int val) -      { -      for (unsigned i = 0; i < sizeof(rasterTable)/sizeof(*rasterTable); i++) { -            if (val == rasterTable[i]) { -                  setCurrentIndex(i); -                  return; -                  } -            } -      printf("setRaster(%d) not defined\n", val); -      setCurrentIndex(0); -      } - - diff --git a/attic/muse_qt4_evolution/muse/widgets/rastercombo.h b/attic/muse_qt4_evolution/muse/widgets/rastercombo.h deleted file mode 100644 index 9ae48ba6..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/rastercombo.h +++ /dev/null @@ -1,46 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __RASTERCOMBO_H__ -#define __RASTERCOMBO_H__ - -//--------------------------------------------------------- -//   RasterCombo -//--------------------------------------------------------- - -class RasterCombo : public QComboBox { -      Q_OBJECT - -   private slots: -      void _rasterChanged(int); - -   public slots: -      void setRaster(int); - -   signals: -      void rasterChanged(int); - -   public: -      RasterCombo(QWidget* parent = 0); -      int raster() const; -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/recordbutton.h b/attic/muse_qt4_evolution/muse/widgets/recordbutton.h deleted file mode 100644 index 9b30de01..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/recordbutton.h +++ /dev/null @@ -1,38 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __RECORDBUTTON_H__ -#define __RCORDBUTTON_H__ - -#include "simplebutton.h" - -//--------------------------------------------------------- -//   RecordButton -//--------------------------------------------------------- - -class RecordButton : public SimpleButton { -      Q_OBJECT - -   public: -      RecordButton(QWidget* parent = 0); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.cpp b/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.cpp deleted file mode 100644 index dab3330f..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.cpp +++ /dev/null @@ -1,97 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2003 Mathias Lundgren (lunar_shuttle@users.sourceforge.net) -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "shortcutcapturedialog.h" -#include "shortcuts.h" - -//--------------------------------------------------------- -//   ShortcutCaptureDialog -//--------------------------------------------------------- - -ShortcutCaptureDialog::ShortcutCaptureDialog(Shortcut* _s, QWidget* parent) -   : QDialog(parent) -      { -      setupUi(this); -      s = _s; - -      oshrtLabel->setText(s->key.toString(QKeySequence::NativeText)); -      connect(clearButton, SIGNAL(clicked()), SLOT(clearClicked())); -      clearClicked(); -      grabKeyboard(); -      } - -//--------------------------------------------------------- -//   ShortcutCaptureDialog -//--------------------------------------------------------- - -ShortcutCaptureDialog::~ShortcutCaptureDialog() -      { -      releaseKeyboard(); -      } - -//--------------------------------------------------------- -//   keyPressEvent -//--------------------------------------------------------- - -void ShortcutCaptureDialog::keyPressEvent(QKeyEvent* e) -      { -      if (key.count() >= 4) -            return; -      int k = e->key(); -      if (k == 0 || k == Qt::Key_Shift || k == Qt::Key_Control ||  -         k == Qt::Key_Meta || k == Qt::Key_Alt || k == Qt::Key_AltGr -         || k == Qt::Key_CapsLock || k == Qt::Key_NumLock  -         || k == Qt::Key_ScrollLock) -            return; - -      k += e->modifiers(); -      switch(key.count()) { -            case 0: key = QKeySequence(k); break; -            case 1: key = QKeySequence(key[0], k); break; -            case 2: key = QKeySequence(key[0], key[1], k); break; -            case 3: key = QKeySequence(key[0], key[1], key[2], k); break; -            } - -      // Check against conflicting shortcuts -      bool conflict = false; -      QString msgString; -      foreach (Shortcut* ss, shortcuts) { -            if ((s != ss) && (ss->key == key)  -               && (ss->type & (s->type | GLOBAL_SHRT | INVIS_SHRT))) { -                  msgString = tr("Shortcut conflicts with ") + ss->descr; -                  conflict = true; -                  break; -                  } -            } -      messageLabel->setText(msgString); -      okButton->setEnabled(conflict == false); -      nshrtLabel->setText(key.toString(QKeySequence::NativeText)); -      } - -//--------------------------------------------------------- -//   clearClicked -//--------------------------------------------------------- - -void ShortcutCaptureDialog::clearClicked() -      { -      nshrtLabel->setText(tr("Undefined")); -      key = 0; -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.h b/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.h deleted file mode 100644 index 4c2b5b6c..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.h +++ /dev/null @@ -1,52 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2003 Mathias Lundgren <lunar_shuttle@users.sourceforge.net> -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -// -// C++ Interface: shortcutcapturedialog -// -// Description: -// Dialog window for capturing keyboard shortcuts -// - -#include "shortcuts.h" -#include "filedialog.h" -#include "ui_shortcutcapturedialog.h" - -//--------------------------------------------------------- -//   ShortcutCaptureDialog -//--------------------------------------------------------- - -class ShortcutCaptureDialog : public QDialog, public Ui::ShortcutCaptureDialogBase -      { -      Q_OBJECT -      private: -      Shortcut* s; -      void keyPressEvent(QKeyEvent* e); -      QKeySequence key; - -    private slots: -      void clearClicked(); - -    public: -      ShortcutCaptureDialog(Shortcut* s = 0, QWidget* parent = 0); -      ~ShortcutCaptureDialog(); -      QKeySequence getKey() const { return key; } -      }; - diff --git a/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.ui b/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.ui deleted file mode 100644 index 0df2338f..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/shortcutcapturedialog.ui +++ /dev/null @@ -1,162 +0,0 @@ -<ui version="4.0" > - <class>ShortcutCaptureDialogBase</class> - <widget class="QDialog" name="ShortcutCaptureDialogBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>461</width> -    <height>214</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>Enter shortcut sequence</string> -  </property> -  <property name="modal" > -   <bool>true</bool> -  </property> -  <layout class="QGridLayout" > -   <property name="margin" > -    <number>9</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item row="0" column="0" colspan="2" > -    <widget class="QLabel" name="descrLabel" > -     <property name="text" > -      <string>Press up to 4 keys to enter shortcut sequence!</string> -     </property> -     <property name="alignment" > -      <set>Qt::AlignCenter</set> -     </property> -    </widget> -   </item> -   <item row="1" column="0" colspan="2" > -    <widget class="QLabel" name="messageLabel" > -     <property name="text" > -      <string/> -     </property> -    </widget> -   </item> -   <item row="2" column="0" > -    <widget class="QLabel" name="oshrtTextLabel" > -     <property name="text" > -      <string>Old shortcut:</string> -     </property> -    </widget> -   </item> -   <item row="2" column="1" > -    <widget class="QLineEdit" name="oshrtLabel" > -     <property name="readOnly" > -      <bool>true</bool> -     </property> -    </widget> -   </item> -   <item row="3" column="0" > -    <widget class="QLabel" name="nshrtTextLabel" > -     <property name="text" > -      <string>New shortcut:</string> -     </property> -    </widget> -   </item> -   <item row="3" column="1" > -    <widget class="QLineEdit" name="nshrtLabel" > -     <property name="readOnly" > -      <bool>true</bool> -     </property> -    </widget> -   </item> -   <item row="4" column="0" colspan="2" > -    <layout class="QHBoxLayout" > -     <property name="margin" > -      <number>0</number> -     </property> -     <property name="spacing" > -      <number>6</number> -     </property> -     <item> -      <widget class="QToolButton" name="clearButton" > -       <property name="text" > -        <string>Clear</string> -       </property> -      </widget> -     </item> -     <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="QPushButton" name="okButton" > -       <property name="enabled" > -        <bool>false</bool> -       </property> -       <property name="text" > -        <string>OK</string> -       </property> -       <property name="shortcut" > -        <string/> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="cancelButton" > -       <property name="text" > -        <string>Cancel</string> -       </property> -       <property name="shortcut" > -        <string/> -       </property> -      </widget> -     </item> -    </layout> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <resources/> - <connections> -  <connection> -   <sender>okButton</sender> -   <signal>clicked()</signal> -   <receiver>ShortcutCaptureDialogBase</receiver> -   <slot>accept()</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>337</x> -     <y>189</y> -    </hint> -    <hint type="destinationlabel" > -     <x>242</x> -     <y>194</y> -    </hint> -   </hints> -  </connection> -  <connection> -   <sender>cancelButton</sender> -   <signal>clicked()</signal> -   <receiver>ShortcutCaptureDialogBase</receiver> -   <slot>reject()</slot> -   <hints> -    <hint type="sourcelabel" > -     <x>425</x> -     <y>194</y> -    </hint> -    <hint type="destinationlabel" > -     <x>350</x> -     <y>153</y> -    </hint> -   </hints> -  </connection> - </connections> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.cpp b/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.cpp deleted file mode 100644 index 025f1494..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.cpp +++ /dev/null @@ -1,167 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2003 Mathias Lundgren (lunar_shuttle@users.sourceforge.net) -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "shortcutconfig.h" -#include "shortcutcapturedialog.h" -#include "shortcuts.h" - -//--------------------------------------------------------- -//   ShortcutConfig -//--------------------------------------------------------- - -ShortcutConfig::ShortcutConfig(QWidget* parent) -   : QDialog(parent) -      { -      setupUi(this); -      connect(cgListView, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), -            this, SLOT(categorySelChanged(QTreeWidgetItem*))); -      connect(scListView, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), -            this, SLOT(shortcutSelChanged(QTreeWidgetItem*))); -      connect(defineButton, SIGNAL(pressed()), this, SLOT(assignShortcut())); -      connect(clearButton,  SIGNAL(pressed()), this, SLOT(clearShortcut())); -      connect(applyButton,  SIGNAL(pressed()), this, SLOT(assignAll())); -      connect(scListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(assignShortcut())); - -      current_category = ALL_SHRT; -//TD   cgListView->setSorting(SHRT_CATEGORY_COL, -1); -      _config_changed = false; - -      //Fill up category listview: -      for (int i=0; i < SHRT_NUM_OF_CATEGORIES; i++) { -            QTreeWidgetItem* newItem = new QTreeWidgetItem; -            newItem->setText(SHRT_CATEGORY_COL, tr(shortcut_category[i].name)); -            newItem->setData(0, Qt::UserRole, i); -            cgListView->addTopLevelItem(newItem); -            } -      updateSCListView(); -      } - -//--------------------------------------------------------- -//   updateSCListView -//--------------------------------------------------------- - -void ShortcutConfig::updateSCListView(int category) -      { -      scListView->clear(); -      foreach (Shortcut* s, shortcuts) { -            if (s && (s->type & category)) { -                  QTreeWidgetItem* newItem; -                  newItem = new QTreeWidgetItem; -                  newItem->setText(SHRT_DESCR_COL, tr(s->descr)); -                  QKeySequence seq = s->key; -                  newItem->setText(SHRT_SHRTCUT_COL, s->key.toString(QKeySequence::NativeText)); -                  newItem->setData(0, Qt::UserRole, s->xml); -                  scListView->addTopLevelItem(newItem); -                  } -            } -      } - -//--------------------------------------------------------- -//   assignShortcut -//--------------------------------------------------------- - -void ShortcutConfig::assignShortcut() -      { -      QTreeWidgetItem* active = scListView->currentItem(); -      Shortcut* s = shortcuts[active->data(0, Qt::UserRole).toString()]; -      ShortcutCaptureDialog sc(s, this); -      if (sc.exec()) { -            s->key = sc.getKey(); -            active->setText(SHRT_SHRTCUT_COL, s->key.toString(QKeySequence::NativeText)); -            _config_changed = true; -            } -      clearButton->setEnabled(true); -      } - -//--------------------------------------------------------- -//   clearShortcut -//--------------------------------------------------------- - -void ShortcutConfig::clearShortcut() -      { -      QTreeWidgetItem* active = scListView->currentItem(); -      Shortcut* s = shortcuts[active->data(0, Qt::UserRole).toString()]; -      s->key = 0; -      active->setText(SHRT_SHRTCUT_COL, ""); -      clearButton->setEnabled(false); -      _config_changed = true; -      } - -//--------------------------------------------------------- -//   categorySelChanged -//--------------------------------------------------------- - -void ShortcutConfig::categorySelChanged(QTreeWidgetItem* i) -      { -      int idx = i->data(0, Qt::UserRole).toInt(); -      current_category = shortcut_category[idx].id_flag; -      updateSCListView(current_category); -      } - -//--------------------------------------------------------- -//   shortcutSelChanged -//--------------------------------------------------------- - -void ShortcutConfig::shortcutSelChanged(QTreeWidgetItem* active) -      { -      defineButton->setEnabled(active != 0); -      if (active == 0) { -            clearButton->setEnabled(false); -            return; -            } -      Shortcut* s = shortcuts[active->data(0, Qt::UserRole).toString()]; -      clearButton->setEnabled(s && !s->key.isEmpty()); -      } - -//--------------------------------------------------------- -//   closeEvent -//--------------------------------------------------------- - -void ShortcutConfig::closeEvent(QCloseEvent*) -      { -      done(_config_changed); -      } - -//--------------------------------------------------------- -//   assignAll -//--------------------------------------------------------- - -void ShortcutConfig::assignAll() -      { -      foreach(QWidget* w, QApplication::allWidgets()) { -            foreach(QAction* a, w->actions()) { -                  QVariant v(a->data()); -                  if (v.type() == QVariant::String) { -                        QString name = v.toString(); -                        foreach (Shortcut* s, shortcuts) { -                              if (s->xml == name) { -                                    if (a->shortcut() != s->key) { -                                          printf("shortcut <%s> changed\n", s->xml); -                                          a->setShortcuts(QList<QKeySequence>()); -                                          a->setShortcut(s->key); -                                          } -                                    } -                              } -                        } -                  } -            } -      done(_config_changed); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.h b/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.h deleted file mode 100644 index 0e9e24b2..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// C++ Interface: shortcutconfig -// -// Description: -// Dialog for configuring keyboard shortcuts -// -// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003 -// -// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003 -// -// -#ifndef __SHORTCUTCONFIG_H -#define __SHORTCUTCONFIG_H - -#include "ui_shortcutconfig.h" -#include "shortcuts.h" - -#define SHRT_CATEGORY_COL 0 -enum { -      SHRT_DESCR_COL = 0, -      SHRT_SHRTCUT_COL -      }; - -//--------------------------------------------------------- -//   ShortcutConfig -//--------------------------------------------------------- - -class ShortcutConfig : public QDialog, public Ui::ShortcutConfigBase { -      Q_OBJECT -      private: -      int current_category; -      void updateSCListView(int category); -      void updateSCListView() { updateSCListView(current_category); } -      void closeEvent(QCloseEvent *e); - -   private slots: -      void categorySelChanged(QTreeWidgetItem*); -      void shortcutSelChanged(QTreeWidgetItem*); -      void assignShortcut(); -      void clearShortcut(); -      void assignAll(); - -   public: -      ShortcutConfig(QWidget* parent = 0); -      bool _config_changed; -      static const shortcut_cg shortcut_category[]; -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.ui b/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.ui deleted file mode 100644 index 901e2cac..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/shortcutconfig.ui +++ /dev/null @@ -1,180 +0,0 @@ -<ui version="4.0" > - <class>ShortcutConfigBase</class> - <widget class="QDialog" name="ShortcutConfigBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>661</width> -    <height>403</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>Configure Keyboard Shortcuts</string> -  </property> -  <property name="sizeGripEnabled" > -   <bool>true</bool> -  </property> -  <layout class="QVBoxLayout" > -   <property name="margin" > -    <number>9</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item> -    <widget class="QSplitter" name="splitter" > -     <property name="orientation" > -      <enum>Qt::Horizontal</enum> -     </property> -     <widget class="QTreeWidget" name="cgListView" > -      <property name="sizePolicy" > -       <sizepolicy> -        <hsizetype>5</hsizetype> -        <vsizetype>7</vsizetype> -        <horstretch>1</horstretch> -        <verstretch>0</verstretch> -       </sizepolicy> -      </property> -      <property name="minimumSize" > -       <size> -        <width>105</width> -        <height>200</height> -       </size> -      </property> -      <property name="indentation" > -       <number>0</number> -      </property> -      <property name="rootIsDecorated" > -       <bool>false</bool> -      </property> -      <property name="sortingEnabled" > -       <bool>true</bool> -      </property> -      <property name="columnCount" > -       <number>1</number> -      </property> -      <column> -       <property name="text" > -        <string>Category</string> -       </property> -      </column> -     </widget> -     <widget class="QTreeWidget" name="scListView" > -      <property name="sizePolicy" > -       <sizepolicy> -        <hsizetype>7</hsizetype> -        <vsizetype>7</vsizetype> -        <horstretch>2</horstretch> -        <verstretch>0</verstretch> -       </sizepolicy> -      </property> -      <property name="minimumSize" > -       <size> -        <width>170</width> -        <height>230</height> -       </size> -      </property> -      <property name="alternatingRowColors" > -       <bool>true</bool> -      </property> -      <property name="indentation" > -       <number>0</number> -      </property> -      <property name="rootIsDecorated" > -       <bool>false</bool> -      </property> -      <property name="uniformRowHeights" > -       <bool>true</bool> -      </property> -      <property name="sortingEnabled" > -       <bool>true</bool> -      </property> -      <property name="allColumnsShowFocus" > -       <bool>true</bool> -      </property> -      <property name="columnCount" > -       <number>2</number> -      </property> -      <column> -       <property name="text" > -        <string>Description</string> -       </property> -      </column> -      <column> -       <property name="text" > -        <string>Shortcut</string> -       </property> -      </column> -     </widget> -    </widget> -   </item> -   <item> -    <layout class="QHBoxLayout" > -     <property name="margin" > -      <number>0</number> -     </property> -     <property name="spacing" > -      <number>6</number> -     </property> -     <item> -      <widget class="QPushButton" name="clearButton" > -       <property name="enabled" > -        <bool>false</bool> -       </property> -       <property name="text" > -        <string>&Clear</string> -       </property> -       <property name="shortcut" > -        <string>Alt+C</string> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="defineButton" > -       <property name="enabled" > -        <bool>false</bool> -       </property> -       <property name="text" > -        <string>&Define</string> -       </property> -       <property name="shortcut" > -        <string>Alt+D</string> -       </property> -      </widget> -     </item> -     <item> -      <spacer> -       <property name="orientation" > -        <enum>Qt::Horizontal</enum> -       </property> -       <property name="sizeType" > -        <enum>QSizePolicy::Expanding</enum> -       </property> -       <property name="sizeHint" > -        <size> -         <width>30</width> -         <height>21</height> -        </size> -       </property> -      </spacer> -     </item> -     <item> -      <widget class="QPushButton" name="applyButton" > -       <property name="text" > -        <string>Ok</string> -       </property> -       <property name="shortcut" > -        <string>Alt+A</string> -       </property> -      </widget> -     </item> -    </layout> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <resources/> - <connections/> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/siglabel.cpp b/attic/muse_qt4_evolution/muse/widgets/siglabel.cpp deleted file mode 100644 index 2f8d3e84..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/siglabel.cpp +++ /dev/null @@ -1,165 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "siglabel.h" - -#define TIMER1    400 -#define TIMER2    200 -#define TIMEC     7 -#define TIMER3    100 -#define TIMEC2    20 -#define TIMER4    50 - -#include "globals.h" - -//--------------------------------------------------------- -//   SigLabel -//    edit Signature Values  (4/4) -//--------------------------------------------------------- - -SigLabel::SigLabel(QWidget* parent)  -   : QLabel(parent) -      { -      z = n = 0; -      setFocusPolicy(Qt::NoFocus); -      setAlignment(Qt::AlignCenter); -      } - -//--------------------------------------------------------- -//   mousePressEvent -//--------------------------------------------------------- - -void SigLabel::mousePressEvent(QMouseEvent* event) -      { -      int button = event->button(); -      bool zaehler = event->x() < width() /2; - -      int zz = z, nn = n; -      switch (button) { -            case Qt::LeftButton: -                  return; -            case Qt::MidButton: -                  incValue(zaehler, false, zz, nn); -                  break; -            case Qt::RightButton: -                  incValue(zaehler, true, zz, nn); -                  break; -            default: -                  break; -            } -      if ((zz != z) || (nn != n)) { -            setValue(zz, nn); -            emit valueChanged(zz, nn); -            } -      } - -//--------------------------------------------------------- -//   incValue -//--------------------------------------------------------- - -void SigLabel::incValue(bool zaehler, bool up, int& zz, int& nn) -      { -      if (!up) { -            if (zaehler) { -                  --zz; -                  if (zz < 1) -                        zz = 1; -                  } -            else { -                  switch (nn) { -                        case 1:    break; -                        case 2:    nn = 1; break; -                        case 4:    nn = 2; break; -                        case 8:    nn = 4; break; -                        case 16:   nn = 8; break; -                        case 32:   nn = 16; break; -                        case 64:   nn = 32; break; -                        case 128:  nn = 64; break; -                        } -                  } -            } -      else { -            if (zaehler) { -                  ++zz; -                  if (zz > 16) -                        zz = 16; -                  } -            else { -                  switch (nn) { -                        case 1:     nn = 2; break; -                        case 2:     nn = 4; break; -                        case 4:     nn = 8; break; -                        case 8:     nn = 16; break; -                        case 16:    nn = 32; break; -                        case 32:    nn = 64; break; -                        case 64:    nn = 128; break; -                        case 128:   break; -                        } -                  } -            } -      } - -//--------------------------------------------------------- -//   wheelEvent -//--------------------------------------------------------- - -void SigLabel::wheelEvent(QWheelEvent* event) -      { -      bool zaehler = event->x() < width() /2; -      int delta = event->delta(); -      int zz = z, nn = n; - -      bool inc = delta >= 0; -      incValue(zaehler, inc, zz, nn); -      if ((zz != z) || (nn != n)) { -            setValue(zz, nn); -            emit valueChanged(zz, nn); -            } -      } - -//--------------------------------------------------------- -//   setValue -//--------------------------------------------------------- - -void SigLabel::setValue(int a, int b) -      { -      if (a == z && b == n) -            return; -      z = a; -      n = b; -      QString sa; -      sa.setNum(a); - -      QString sb; -      sb.setNum(b); - -      QString s = sa + QString("/") + sb; -      setText(s); -      } - -//--------------------------------------------------------- -//   setFrame -//--------------------------------------------------------- - -void SigLabel::setFrame(bool flag) -      { -      setFrameStyle(flag ? Panel | Sunken : NoFrame); -      setLineWidth(2); -      } diff --git a/attic/muse_qt4_evolution/muse/widgets/siglabel.h b/attic/muse_qt4_evolution/muse/widgets/siglabel.h deleted file mode 100644 index 8ffa317e..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/siglabel.h +++ /dev/null @@ -1,50 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __SIGLABEL_H__ -#define __SIGLABEL_H__ - -//--------------------------------------------------------- -//   SigLabel -//    show/edit time signature -//--------------------------------------------------------- - -class SigLabel : public QLabel { -      Q_OBJECT -      virtual void mousePressEvent(QMouseEvent*); -      virtual void wheelEvent(QWheelEvent*); -      void incValue(bool zaehler, bool inc, int&, int&); - -   protected: -      int z, n; - -   signals: -      void valueChanged(int, int); - -   public slots: -      virtual void setValue(int, int); - -   public: -      SigLabel(QWidget* parent = 0); -      void value(int& a, int& b) const { a = z; b = n; } -      void setFrame(bool); -      }; -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/simplebutton.cpp b/attic/muse_qt4_evolution/muse/widgets/simplebutton.cpp deleted file mode 100644 index 36ab7097..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/simplebutton.cpp +++ /dev/null @@ -1,65 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "simplebutton.h" -#include "gui.h" - -//--------------------------------------------------------- -//   SimpleButton -//--------------------------------------------------------- - -SimpleButton::SimpleButton(const QString& on, const QString& off, QWidget* parent) -   : QToolButton(parent) -      { -      setAutoRaise(true); -      QIcon icon; -      icon.addFile(on, ICON_SIZE, QIcon::Normal, QIcon::On); -      icon.addFile(off, ICON_SIZE, QIcon::Normal, QIcon::Off); -      QAction* a = new QAction(this); -      a->setIcon(icon); -      setDefaultAction(a); -      } - -//--------------------------------------------------------- -//   SimpleButton -//--------------------------------------------------------- - -SimpleButton::SimpleButton(QPixmap* on, QPixmap* off, QWidget* parent) -   : QToolButton(parent) -      { -      setAutoRaise(true); -      QIcon icon(*off); -      icon.addPixmap(*on, QIcon::Normal, QIcon::On); -      QAction* a = new QAction(this); -      a->setIcon(icon); -      setDefaultAction(a); -      } - -//--------------------------------------------------------- -//   SimpleButton -//--------------------------------------------------------- - -SimpleButton::SimpleButton(const QString& s, QWidget* parent) -   : QToolButton(parent) -      { -      setAutoRaise(false); -      setText(s); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/simplebutton.h b/attic/muse_qt4_evolution/muse/widgets/simplebutton.h deleted file mode 100644 index 469767ac..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/simplebutton.h +++ /dev/null @@ -1,41 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __SIMPLE_BUTTON_H__ -#define __SIMPLE_BUTTON_H__ - -//--------------------------------------------------------- -//   SimpleButton -//--------------------------------------------------------- - -class SimpleButton : public QToolButton { -      Q_OBJECT - -      int _id; -      virtual QSize minimumSizeHint() const { return QSize(0, 0); } - -   public: -      SimpleButton(QPixmap* on, QPixmap* off, QWidget* parent = 0); -      SimpleButton(const QString& on, const QString& off, QWidget* parent = 0); -      SimpleButton(const QString& s, QWidget* parent = 0); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/splitter.cpp b/attic/muse_qt4_evolution/muse/widgets/splitter.cpp deleted file mode 100644 index b95750ab..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/splitter.cpp +++ /dev/null @@ -1,107 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "splitter.h" -#include "utils.h" -#include "al/xml.h" - -//--------------------------------------------------------- -//   SplitterHandle -//--------------------------------------------------------- - -void SplitterHandle::paintEvent(QPaintEvent* ev) -      { -      QPainter p(this); -      QRect r(ev->rect()); -      if (orientation() == Qt::Horizontal) { -            int x = 0; -            int y1 = r.y(); -            int y2 = y1 + r.height(); -            if (y1 == 0) -                  y1 = 1; -            if (y2 == height()) -                  y2 = height() - 2; -            for (int i = 0; i < splitWidth; ++i) { -                  p.setPen(lineColor[i]); -                  p.drawLine(x, y1, x, y2); -                  ++x; -                  } -            p.setPen(lineColor[0]); -            p.drawLine(1, 0, splitWidth - 2, 0); -            p.drawLine(1, height()-1, splitWidth - 2, height()-1); -            } -      else { -            int y = 0; -            int x1 = r.x(); -            int x2 = x1 + r.width(); -            for (int i = 0; i < splitWidth; ++i) { -                  p.setPen(lineColor[i]); -                  p.drawLine(x1, y, x2, y); -                  ++y; -                  } -            } -      } - -//--------------------------------------------------------- -//   Splitter -//--------------------------------------------------------- - -Splitter::Splitter(Qt::Orientation o) -   : QSplitter(o) -      { -      setHandleWidth(splitWidth); -      } - -//--------------------------------------------------------- -//   writeStatus -//--------------------------------------------------------- - -void Splitter::writeStatus(const char* name, Xml& xml) -      { -      QList<int> sl = sizes(); -      xml.stag(name); -      int n = sl.size(); -      for (int i = 0; i < n; ++i) { -            int n = sl.at(i); -            xml.tag("size", n); -            } -      xml.etag(name); -      } - -//--------------------------------------------------------- -//   readStatus -//--------------------------------------------------------- - -void Splitter::readStatus(QDomNode node) -      { -      QList<int> sl; -      for (QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) { -            QDomElement e = n.toElement(); -            QString tag(e.tagName()); -            int i = e.text().toInt(); -            if (tag == "size") { -                  sl.push_back(i); -                  } -            else -                  printf("Splitter::unknown tag <%s>\n", tag.toLatin1().data()); -            } -      setSizes(sl); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/splitter.h b/attic/muse_qt4_evolution/muse/widgets/splitter.h deleted file mode 100644 index 238031c3..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/splitter.h +++ /dev/null @@ -1,62 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __SPLITTER_H__ -#define __SPLITTER_H__ - -namespace AL { -      class Xml; -      }; - -using AL::Xml; - -//--------------------------------------------------------- -//   SplitterHandle -//--------------------------------------------------------- - -class SplitterHandle : public QSplitterHandle { -      Q_OBJECT -      virtual void paintEvent(QPaintEvent*); - -   public: -      SplitterHandle(Qt::Orientation o, QSplitter* parent) -         : QSplitterHandle(o, parent) { -            } -      }; - -//--------------------------------------------------------- -//   Splitter -//--------------------------------------------------------- - -class Splitter : public QSplitter { -      Q_OBJECT - -   protected: -      virtual QSplitterHandle* createHandle() { -            return new SplitterHandle(orientation(), this); -            } -   public: -      Splitter(Qt::Orientation); -      void writeStatus(const char* name, Xml&); -      void readStatus(QDomNode node); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/synthwizardbase.h b/attic/muse_qt4_evolution/muse/widgets/synthwizardbase.h deleted file mode 100644 index 590ff789..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/synthwizardbase.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** Form interface generated from reading ui file 'synthwizardbase.ui' -** -** Created: Wed Nov 12 10:38:24 2003 -**      by: The User Interface Compiler ($Id: synthwizardbase.h,v 1.6 2005/09/22 20:13:39 wschweer Exp $) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ - -#ifndef SYNTHCONFIGBASE_H -#define SYNTHCONFIGBASE_H - -#include <qvariant.h> -#include <q3wizard.h> -//Added by qt3to4: -#include <QVBoxLayout> -#include <QHBoxLayout> -#include <QGridLayout> - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QWidget; -class Q3GroupBox; -class Q3ListView; -class Q3ListViewItem; -class QPushButton; - -class SynthConfigBase : public Q3Wizard -{ -    Q_OBJECT - -public: -    SynthConfigBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); -    ~SynthConfigBase(); - -    QWidget* WizardPage; -    Q3GroupBox* GroupBox2; -    Q3ListView* synthList; -    QPushButton* addInstance; -    Q3GroupBox* GroupBox3; -    Q3ListView* instanceList; -    QPushButton* removeInstance; -    QWidget* WizardPage_2; - -protected: -    QVBoxLayout* WizardPageLayout; -    QVBoxLayout* GroupBox2Layout; -    QHBoxLayout* Layout1; -    QVBoxLayout* GroupBox3Layout; -    QHBoxLayout* Layout3; - -protected slots: -    virtual void languageChange(); - -}; - -#endif // SYNTHCONFIGBASE_H diff --git a/attic/muse_qt4_evolution/muse/widgets/tb1.cpp b/attic/muse_qt4_evolution/muse/widgets/tb1.cpp deleted file mode 100644 index 33400420..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/tb1.cpp +++ /dev/null @@ -1,180 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "tb1.h" -#include "globals.h" -#include "awl/poslabel.h" -#include "awl/pitchlabel.h" -#include "rastercombo.h" -#include "quantcombo.h" - -//--------------------------------------------------------- -//   genToolbar -//    solo time pitch raster quant -//--------------------------------------------------------- - -Toolbar1::Toolbar1(int r, int q, bool showPitch) -      { -      solo = new QToolButton; -      solo->setText(tr("Solo")); -      solo->setCheckable(true); -      addWidget(solo); - -      //--------------------------------------------------- -      //  Cursor Position -      //--------------------------------------------------- - -      QLabel* label = new QLabel; -      label->setText(tr("Cursor")); -      label->setIndent(3); -      addWidget(label); -      pos = new Awl::PosLabel; -      pos->setFixedHeight(24); -      addWidget(pos); -      if (showPitch) { -            pitch = new Awl::PitchLabel; -            pitch->setEnabled(false); -            pitch->setFixedHeight(24); -            addWidget(pitch); -            } -      else -            pitch = 0; - -      //--------------------------------------------------- -      //  Raster, Quant. -      //--------------------------------------------------- - -      QLabel* l = new QLabel(tr("Snap")); -      l->setIndent(5); -      addWidget(l); -      raster = new RasterCombo; -      addWidget(raster); - -      l = new QLabel(tr("Quantize")); -      l->setIndent(5); -      addWidget(l); -      quant = new QuantCombo; -      addWidget(quant); - -      raster->setFixedHeight(24); -      quant->setFixedHeight(24); - -      setRaster(r); -      setQuant(q); - -      //--------------------------------------------------- -      //  To Menu -      //--------------------------------------------------- - -      addWidget(new QLabel(tr("To"))); -      toList = new QComboBox; -      toList->setFixedHeight(24); -      addWidget(toList); -      toList->addItem(tr("All Events"),   RANGE_ALL); -      toList->addItem(tr("Looped Ev."),   RANGE_LOOPED); -      toList->addItem(tr("Selected Ev."), RANGE_SELECTED); -      toList->addItem(tr("Looped+Sel."),  RANGE_LOOPED | RANGE_SELECTED); - -      connect(raster, SIGNAL(rasterChanged(int)), SIGNAL(rasterChanged(int))); -      connect(quant,  SIGNAL(quantChanged(int)), SIGNAL(quantChanged(int))); -      connect(toList, SIGNAL(activated(int)), SIGNAL(toChanged(int))); -      connect(solo,   SIGNAL(toggled(bool)), SIGNAL(soloChanged(bool))); -      pos->setEnabled(false); -      } - -//--------------------------------------------------------- -//   setApplyTo -//--------------------------------------------------------- - -void Toolbar1::setApplyTo(int val) -      { -	toList->setCurrentIndex(toList->findData(val)); -      } - -//--------------------------------------------------------- -//   setPitch -//--------------------------------------------------------- - -void Toolbar1::setPitch(int val) -      { -      if (pitch) { -            pitch->setEnabled(val != -1); -            pitch->setPitch(val); -            } -      } - -//--------------------------------------------------------- -//   setInt -//--------------------------------------------------------- - -void Toolbar1::setInt(int val) -      { -      if (pitch) { -            pitch->setEnabled(val != -1); -            pitch->setInt(val); -            } -      } - -//--------------------------------------------------------- -//   setTime -//--------------------------------------------------------- - -void Toolbar1::setTime(const AL::Pos& val, bool enable) -      { -      pos->setValue(val, enable); -      } - -//--------------------------------------------------------- -//   setRaster -//--------------------------------------------------------- - -void Toolbar1::setRaster(int val) -      { -      raster->setRaster(val); -      } - -//--------------------------------------------------------- -//   setQuant -//--------------------------------------------------------- - -void Toolbar1::setQuant(int val) -      { -      quant->setQuant(val); -      } - -//--------------------------------------------------------- -//   setSolo -//--------------------------------------------------------- - -void Toolbar1::setSolo(bool flag) -      { -      solo->setChecked(flag); -      } - -//--------------------------------------------------------- -//   setPitchMode -//--------------------------------------------------------- - -void Toolbar1::setPitchMode(bool flag) -      { -      if (pitch) -            pitch->setPitchMode(flag); -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/tb1.h b/attic/muse_qt4_evolution/muse/widgets/tb1.h deleted file mode 100644 index e10884d2..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/tb1.h +++ /dev/null @@ -1,71 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __TB1_H__ -#define __TB1_H__ - -namespace Awl { -      class PosLabel; -      class PitchLabel; -      }; -namespace AL { -      class Pos; -      }; - -class RasterCombo; -class QuantCombo; - -enum { RANGE_ALL, RANGE_SELECTED, RANGE_LOOPED }; - -//--------------------------------------------------------- -//   Toolbar1 -//--------------------------------------------------------- - -class Toolbar1 : public QToolBar { -      QToolButton* solo; -      Awl::PosLabel* pos; -      Awl::PitchLabel* pitch; -      QuantCombo* quant; -      QComboBox* toList; -      RasterCombo* raster; -      Q_OBJECT - -   public slots: -      void setTime(const AL::Pos&, bool); -      void setPitch(int); -      void setInt(int); -      void setRaster(int); -      void setQuant(int); - -   signals: -      void rasterChanged(int); -      void quantChanged(int); -      void soloChanged(bool); -      void toChanged(int); - -   public: -      Toolbar1(int r=96, int q=96, bool showPitch=true); -      void setSolo(bool val); -      void setPitchMode(bool flag); -      void setApplyTo(int); -      }; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/tools.cpp b/attic/muse_qt4_evolution/muse/widgets/tools.cpp deleted file mode 100644 index 39d7aa4d..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/tools.cpp +++ /dev/null @@ -1,100 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include "tools.h" -#include "icons.h" -#include "shortcuts.h" - -const char* toolList[TOOLS] = { -      "pointer", "pencil", "eraser", "scissor", "glue",  -      "quantize", "draw", "mute_parts" -      }; - -//--------------------------------------------------------- -//   EditToolBar -//--------------------------------------------------------- - -EditToolBar::EditToolBar(QMainWindow* parent, int tools) -   : QToolBar(tr("Edit Tools")) -      { -      actionGroup = new QActionGroup(parent); -      actionGroup->setExclusive(true); - -      bool first = true; -      for (unsigned i = 0; i < sizeof(toolList)/sizeof(*toolList); ++i) { -            if ((tools & (1 << i))==0) -                  continue; -            QAction* a = getAction(toolList[i], this); -            a->setData(1 << i); -            a->setCheckable(true); -            actionGroup->addAction(a); -            addAction(a); -            if (first) { -                  a->setChecked(true); -                  first = false; -                  } -            } -      connect(actionGroup, SIGNAL(triggered(QAction*)), SLOT(toolChanged(QAction*))); -      } - -//--------------------------------------------------------- -//   toolChanged -//--------------------------------------------------------- - -void EditToolBar::toolChanged(QAction* action) -      { -      emit toolChanged(action->data().toInt()); -      } - -//--------------------------------------------------------- -//   set -//--------------------------------------------------------- - -void EditToolBar::set(int id) -      { -      QList<QAction*> actions = actionGroup->actions(); -      int n = actions.size(); - -      for (int i = 0; i < n; ++i) { -            QAction* action = actions.at(i); -            if (action->data().toInt() == id) { -                  action->setChecked(true); -                  return; -                  } -            } -      } - -//--------------------------------------------------------- -//   curTool -//--------------------------------------------------------- - -int EditToolBar::curTool() -      { -      QList<QAction*> actions = actionGroup->actions(); -      int n = actions.size(); - -      for (int i = 0; i < n; ++i) { -            QAction* a = actions.at(i); -            if (a->isChecked()) -                  return a->data().toInt(); -            } -      return -1; -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/tools.h b/attic/muse_qt4_evolution/muse/widgets/tools.h deleted file mode 100644 index f05e1095..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/tools.h +++ /dev/null @@ -1,58 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __TOOLS_H__ -#define __TOOLS_H__ - -class Action; - -#include "awl/tcanvas.h" - -const int arrangerTools = PointerTool | PencilTool | RubberTool | DrawTool -	| CutTool | GlueTool | MuteTool; - -const int TOOLS = 8; - -//--------------------------------------------------------- -//   EditToolBar -//--------------------------------------------------------- - -class EditToolBar : public QToolBar { -      Q_OBJECT -      QActionGroup* actionGroup; - -   private slots: -      void toolChanged(QAction* action); - -   signals: -      void toolChanged(int); - -   public slots: -      void set(int id); - -   public: -      EditToolBar(QMainWindow*, int); -      int curTool(); -      }; - -extern const char* toolList[]; - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/transformbase.ui b/attic/muse_qt4_evolution/muse/widgets/transformbase.ui deleted file mode 100644 index 1365a0c9..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/transformbase.ui +++ /dev/null @@ -1,993 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>MidiTransformDialogBase</class> - <widget class="QDialog" name="MidiTransformDialogBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>843</width> -    <height>659</height> -   </rect> -  </property> -  <property name="windowTitle" > -   <string>MusE: Midi Transformator</string> -  </property> -  <property name="sizeGripEnabled" > -   <bool>true</bool> -  </property> -  <layout class="QGridLayout" > -   <property name="margin" > -    <number>11</number> -   </property> -   <property name="spacing" > -    <number>6</number> -   </property> -   <item row="3" column="0" colspan="2" > -    <layout class="QHBoxLayout" > -     <property name="margin" > -      <number>0</number> -     </property> -     <property name="spacing" > -      <number>6</number> -     </property> -     <item> -      <widget class="QPushButton" name="buttonNew" > -       <property name="text" > -        <string>&New</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="buttonDelete" > -       <property name="text" > -        <string>&Delete</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -     <item> -      <spacer> -       <property name="orientation" > -        <enum>Qt::Horizontal</enum> -       </property> -       <property name="sizeType" > -        <enum>QSizePolicy::Expanding</enum> -       </property> -       <property name="sizeHint" > -        <size> -         <width>20</width> -         <height>20</height> -        </size> -       </property> -      </spacer> -     </item> -     <item> -      <widget class="QPushButton" name="buttonApply" > -       <property name="text" > -        <string>&Apply</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="buttonOk" > -       <property name="text" > -        <string>&OK</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -       <property name="default" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -     <item> -      <widget class="QPushButton" name="buttonCancel" > -       <property name="text" > -        <string>&Cancel</string> -       </property> -       <property name="autoDefault" > -        <bool>true</bool> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item rowspan="3" row="0" column="0" > -    <layout class="QVBoxLayout" > -     <property name="margin" > -      <number>0</number> -     </property> -     <property name="spacing" > -      <number>6</number> -     </property> -     <item> -      <widget class="QLabel" name="TextLabel1_2" > -       <property name="text" > -        <string>PresetList</string> -       </property> -      </widget> -     </item> -     <item> -      <widget class="Q3ListBox" name="presetList" > -       <property name="sizePolicy" > -        <sizepolicy> -         <hsizetype>3</hsizetype> -         <vsizetype>3</vsizetype> -         <horstretch>0</horstretch> -         <verstretch>0</verstretch> -        </sizepolicy> -       </property> -      </widget> -     </item> -    </layout> -   </item> -   <item row="1" column="1" > -    <widget class="Q3GroupBox" name="GroupBox5" > -     <property name="title" > -      <string>Processing</string> -     </property> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <layout class="QGridLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item row="0" column="0" > -       <widget class="QLabel" name="TextLabel5" > -        <property name="text" > -         <string>Event Type</string> -        </property> -       </widget> -      </item> -      <item row="1" column="0" > -       <widget class="QComboBox" name="procEventOp" > -        <item> -         <property name="text" > -          <string>Keep</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Fix</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="2" column="0" > -       <widget class="QComboBox" name="procType" > -        <item> -         <property name="text" > -          <string>Note</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Poly Pressure</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Control Change</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Aftertouch</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Pitch Bend</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>NRPN</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>RPN</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="1" column="1" > -       <widget class="QComboBox" name="procVal1Op" > -        <item> -         <property name="text" > -          <string>Keep</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Plus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Minus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Multiply</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Divide</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Fix</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Value 2</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Invert</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>ScaleMap</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Flip</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Dyn</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Random</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="0" column="1" > -       <widget class="QLabel" name="TextLabel6" > -        <property name="text" > -         <string>Value 1</string> -        </property> -       </widget> -      </item> -      <item row="0" column="2" > -       <widget class="QLabel" name="TextLabel7" > -        <property name="text" > -         <string>Value 2</string> -        </property> -       </widget> -      </item> -      <item row="0" column="3" > -       <widget class="QLabel" name="TextLabel10_2" > -        <property name="text" > -         <string>Length</string> -        </property> -       </widget> -      </item> -      <item row="0" column="4" > -       <widget class="QLabel" name="TextLabel12" > -        <property name="text" > -         <string>Position</string> -        </property> -       </widget> -      </item> -      <item row="1" column="2" > -       <widget class="QComboBox" name="procVal2Op" > -        <item> -         <property name="text" > -          <string>Keep</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Plus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Minus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Multiply</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Divide</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Fix</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Value 1</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Invert</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Dyn</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Random</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="1" column="3" > -       <widget class="QComboBox" name="procLenOp" > -        <item> -         <property name="text" > -          <string>Keep</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Plus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Minus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Multiply</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Divide</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Fix</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="3" column="1" > -       <widget class="QSpinBox" name="procVal1b" > -        <property name="maximum" > -         <number>9999</number> -        </property> -       </widget> -      </item> -      <item row="3" column="2" > -       <widget class="QSpinBox" name="procVal2b" > -        <property name="maximum" > -         <number>9999</number> -        </property> -       </widget> -      </item> -      <item row="2" column="1" > -       <widget class="QDoubleSpinBox" name="procVal1a" /> -      </item> -      <item row="1" column="4" > -       <widget class="QComboBox" name="procPosOp" > -        <item> -         <property name="text" > -          <string>Keep</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Plus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Minus</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Multiply</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Divide</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="2" column="2" > -       <widget class="QDoubleSpinBox" name="procVal2a" /> -      </item> -      <item row="2" column="3" > -       <widget class="QDoubleSpinBox" name="procLenA" /> -      </item> -      <item row="2" column="4" > -       <widget class="QDoubleSpinBox" name="procPosA" /> -      </item> -     </layout> -    </widget> -   </item> -   <item row="0" column="1" > -    <widget class="Q3GroupBox" name="GroupBox3" > -     <property name="title" > -      <string>Filter</string> -     </property> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <layout class="QGridLayout" > -      <property name="margin" > -       <number>11</number> -      </property> -      <property name="spacing" > -       <number>6</number> -      </property> -      <item row="1" column="0" > -       <widget class="QComboBox" name="selEventOp" > -        <item> -         <property name="text" > -          <string>All</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Equal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Unequal</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="2" column="0" > -       <widget class="QComboBox" name="selType" > -        <item> -         <property name="text" > -          <string>Note</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Control Change</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Sysex</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Poly Pressure</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Aftertouch</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Meta</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="0" column="2" > -       <widget class="QLabel" name="TextLabel3" > -        <property name="text" > -         <string>Value 2</string> -        </property> -       </widget> -      </item> -      <item row="0" column="1" > -       <widget class="QLabel" name="TextLabel2" > -        <property name="text" > -         <string>Value 1</string> -        </property> -       </widget> -      </item> -      <item row="0" column="0" > -       <widget class="QLabel" name="TextLabel1" > -        <property name="text" > -         <string>Event Type</string> -        </property> -       </widget> -      </item> -      <item row="1" column="1" > -       <widget class="QComboBox" name="selVal1Op" > -        <item> -         <property name="text" > -          <string>Ignore</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Equal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Unequal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Higher</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Lower</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Inside</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Outside</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="0" column="3" > -       <widget class="QLabel" name="TextLabel10" > -        <property name="text" > -         <string>Length</string> -        </property> -       </widget> -      </item> -      <item row="0" column="4" > -       <widget class="QLabel" name="TextLabel11" > -        <property name="text" > -         <string>Bar Range</string> -        </property> -       </widget> -      </item> -      <item row="1" column="2" > -       <widget class="QComboBox" name="selVal2Op" > -        <item> -         <property name="text" > -          <string>Ignore</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Equal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Unequal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Higher</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Lower</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Inside</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Outside</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="1" column="3" > -       <widget class="QComboBox" name="selLenOp" > -        <item> -         <property name="text" > -          <string>Ignore</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Equal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Unequal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Higher</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Lower</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Inside</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Outside</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="1" column="4" > -       <widget class="QComboBox" name="selRangeOp" > -        <item> -         <property name="text" > -          <string>Ignore</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Equal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Unequal</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Higher</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Lower</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Inside</string> -         </property> -        </item> -        <item> -         <property name="text" > -          <string>Outside</string> -         </property> -        </item> -       </widget> -      </item> -      <item row="3" column="1" > -       <widget class="QSpinBox" name="selVal1b" > -        <property name="maximum" > -         <number>127</number> -        </property> -       </widget> -      </item> -      <item row="2" column="3" > -       <widget class="QSpinBox" name="selLenA" > -        <property name="maximum" > -         <number>127</number> -        </property> -       </widget> -      </item> -      <item row="3" column="3" > -       <widget class="QSpinBox" name="selLenB" > -        <property name="maximum" > -         <number>127</number> -        </property> -       </widget> -      </item> -      <item row="2" column="2" > -       <widget class="QSpinBox" name="selVal2a" > -        <property name="maximum" > -         <number>127</number> -        </property> -       </widget> -      </item> -      <item row="3" column="2" > -       <widget class="QSpinBox" name="selVal2b" > -        <property name="maximum" > -         <number>127</number> -        </property> -       </widget> -      </item> -      <item row="2" column="1" > -       <widget class="QSpinBox" name="selVal1a" > -        <property name="maximum" > -         <number>127</number> -        </property> -       </widget> -      </item> -      <item row="3" column="4" > -       <widget class="QDoubleSpinBox" name="selBarB" /> -      </item> -      <item row="2" column="4" > -       <widget class="QDoubleSpinBox" name="selBarA" /> -      </item> -     </layout> -    </widget> -   </item> -   <item row="2" column="1" > -    <layout class="QHBoxLayout" > -     <property name="margin" > -      <number>0</number> -     </property> -     <property name="spacing" > -      <number>6</number> -     </property> -     <item> -      <widget class="Q3GroupBox" name="GroupBox6_2" > -       <property name="title" > -        <string>Preset</string> -       </property> -       <property name="orientation" > -        <enum>Qt::Vertical</enum> -       </property> -       <layout class="QVBoxLayout" > -        <property name="margin" > -         <number>11</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="QLabel" name="TextLabel13_2" > -            <property name="text" > -             <string>Name:</string> -            </property> -           </widget> -          </item> -          <item> -           <widget class="QLineEdit" name="nameEntry" /> -          </item> -         </layout> -        </item> -        <item> -         <widget class="QLabel" name="TextLabel14_2" > -          <property name="text" > -           <string>Comment:</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="Q3MultiLineEdit" name="commentEntry" /> -        </item> -       </layout> -      </widget> -     </item> -     <item> -      <widget class="Q3GroupBox" name="GroupBox5_2" > -       <property name="title" > -        <string>Range</string> -       </property> -       <property name="orientation" > -        <enum>Qt::Vertical</enum> -       </property> -       <layout class="QVBoxLayout" > -        <property name="margin" > -         <number>11</number> -        </property> -        <property name="spacing" > -         <number>6</number> -        </property> -        <item> -         <widget class="QCheckBox" name="processAll" > -          <property name="text" > -           <string>process all events</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QCheckBox" name="selectedTracks" > -          <property name="text" > -           <string>selected tracks</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="QCheckBox" name="insideLoop" > -          <property name="text" > -           <string>inside loop</string> -          </property> -         </widget> -        </item> -       </layout> -      </widget> -     </item> -     <item> -      <widget class="Q3GroupBox" name="GroupBox7_2" > -       <property name="title" > -        <string>Function</string> -       </property> -       <property name="orientation" > -        <enum>Qt::Vertical</enum> -       </property> -       <layout class="QVBoxLayout" > -        <property name="margin" > -         <number>11</number> -        </property> -        <property name="spacing" > -         <number>6</number> -        </property> -        <item> -         <widget class="QComboBox" name="funcOp" > -          <item> -           <property name="text" > -            <string>Select</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>Quantize</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>Delete</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>Transform</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>Insert</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>Copy</string> -           </property> -          </item> -          <item> -           <property name="text" > -            <string>Extract</string> -           </property> -          </item> -         </widget> -        </item> -        <item> -         <widget class="QLabel" name="TextLabel9_2" > -          <property name="text" > -           <string>Quantize Value</string> -          </property> -         </widget> -        </item> -        <item> -         <widget class="ComboQuant" name="funcQuantVal" /> -        </item> -       </layout> -      </widget> -     </item> -    </layout> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction></pixmapfunction> - <customwidgets> -  <customwidget> -   <class>Q3GroupBox</class> -   <extends></extends> -   <header>Qt3Support/Q3GroupBox</header> -   <container>1</container> -   <pixmap></pixmap> -  </customwidget> -  <customwidget> -   <class>Q3MultiLineEdit</class> -   <extends>QWidget</extends> -   <header>q3multilineedit.h</header> -   <container>1</container> -   <pixmap></pixmap> -  </customwidget> -  <customwidget> -   <class>ComboQuant</class> -   <extends></extends> -   <header>comboQuant.h</header> -   <container>0</container> -   <pixmap></pixmap> -  </customwidget> -  <customwidget> -   <class>Q3ListBox</class> -   <extends></extends> -   <header>q3listbox.h</header> -   <container>0</container> -   <pixmap></pixmap> -  </customwidget> - </customwidgets> - <tabstops> -  <tabstop>selEventOp</tabstop> -  <tabstop>selType</tabstop> -  <tabstop>selVal1Op</tabstop> -  <tabstop>selVal1a</tabstop> -  <tabstop>selVal1b</tabstop> -  <tabstop>selVal2Op</tabstop> -  <tabstop>selVal2a</tabstop> -  <tabstop>selVal2b</tabstop> -  <tabstop>selLenOp</tabstop> -  <tabstop>selLenA</tabstop> -  <tabstop>selLenB</tabstop> -  <tabstop>selRangeOp</tabstop> -  <tabstop>procEventOp</tabstop> -  <tabstop>procType</tabstop> -  <tabstop>procVal1Op</tabstop> -  <tabstop>procVal1b</tabstop> -  <tabstop>procVal2Op</tabstop> -  <tabstop>procVal2b</tabstop> -  <tabstop>procLenOp</tabstop> -  <tabstop>procPosOp</tabstop> -  <tabstop>nameEntry</tabstop> -  <tabstop>commentEntry</tabstop> -  <tabstop>processAll</tabstop> -  <tabstop>selectedTracks</tabstop> -  <tabstop>insideLoop</tabstop> -  <tabstop>funcOp</tabstop> -  <tabstop>presetList</tabstop> -  <tabstop>buttonNew</tabstop> -  <tabstop>buttonDelete</tabstop> -  <tabstop>buttonApply</tabstop> -  <tabstop>buttonOk</tabstop> -  <tabstop>buttonCancel</tabstop> - </tabstops> - <resources/> - <connections/> -</ui> diff --git a/attic/muse_qt4_evolution/muse/widgets/utils.cpp b/attic/muse_qt4_evolution/muse/widgets/utils.cpp deleted file mode 100644 index b7fd9cee..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/utils.cpp +++ /dev/null @@ -1,451 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#include <sys/time.h> -#include "utils.h" -#include "icons.h" -#include "gconfig.h" -#include "greendotbutton.h" -#include "recordbutton.h" - -static const int BFONT = 4;   // simple button font - -//--------------------------------------------------------- -//   RecordButton -//--------------------------------------------------------- - -RecordButton::RecordButton(QWidget* parent) -   : SimpleButton(":/xpm/recordOn.svg", ":/xpm/recordOff.svg", parent) -      { -      setCheckable(true); -      setToolTip(tr("record")); -      } - -//--------------------------------------------------------- -//   GreendotButton -//--------------------------------------------------------- - -GreendotButton::GreendotButton(QWidget* parent) -   : SimpleButton(":/xpm/greendot.svg", ":/xpm/darkgreendot.svg", parent) -      { -      setCheckable(true); -      setToolTip(tr("record")); -      } - -//--------------------------------------------------------- -//   curTime -//--------------------------------------------------------- - -double curTime() -      { -      struct timeval t; -      gettimeofday(&t, 0); -      return (double)((double)t.tv_sec + (t.tv_usec / 1000000.0)); -      } - -//--------------------------------------------------------- -//   dump -//    simple debug output -//--------------------------------------------------------- - -void dump(const unsigned char* p, int n) -      { -      printf("dump %d\n", n); -      for (int i = 0; i < n; ++i) { -            printf("%02x ", *p++); -            if ((i > 0) && (i % 16 == 0) && (i+1 < n)) -                  printf("\n"); -            } -      printf("\n"); -      } - -//--------------------------------------------------------- -//   num2cols -//--------------------------------------------------------- - -int num2cols(int min, int max) -      { -      int amin = abs(min); -      int amax = abs(max); -      int l = amin > amax ? amin : amax; -      return int(log10(l)) + 1; -      } - -//--------------------------------------------------------- -//   hLine -//--------------------------------------------------------- - -QFrame* hLine(QWidget* w) -      { -      QFrame* delim = new QFrame(w); -      delim->setFrameStyle(QFrame::HLine | QFrame::Sunken); -      return delim; -      } - -//--------------------------------------------------------- -//   vLine -//--------------------------------------------------------- - -QFrame* vLine(QWidget* w) -      { -      QFrame* delim = new QFrame(w); -      delim->setFrameStyle(QFrame::VLine | QFrame::Sunken); -      return delim; -      } - -//--------------------------------------------------------- -//   bitmap2String -//    5c -> 1-4 1-6 -// -//    01011100 -// -//--------------------------------------------------------- - -QString bitmap2String(int bm) -      { -      QString s; -//printf("bitmap2string: bm %04x", bm); -      if (bm == 0xffff) -            s = "all"; -      else if (bm == 0) -            s = "none"; -      else { -            bool range = false; -            int first = 0; -            bool needSpace = false; -            bm &= 0xffff; -            for (int i = 0; i < 17; ++i) { -                  if ((1 << i) & bm) { -                        if (!range) { -                              range = true; -                              first = i; -                              } -                        } -                  else { -                        if (range) { -                              if (needSpace) -                                    s += " "; -                              QString ns; -                              if (first == i-1) -                                    ns.sprintf("%d", first+1); -                              else -                                    ns.sprintf("%d-%d", first+1, i); -                              s += ns; -                              needSpace = true; -                              } -                        range = false; -                        } -                  } -            } -//printf(" -> <%s>\n", s.toLatin1().data()); -      return s; -      } - -//--------------------------------------------------------- -//   string2bitmap -//--------------------------------------------------------- - -int string2bitmap(const QString& str) -      { -      int val = 0; -      QString ss(str.simplified()); -      const char* s = ss.toLatin1().data(); -//printf("string2bitmap <%s>\n", s); - -      if (s == 0) -            return 0; -      if (strcmp(s, "all") == 0) -            return 0xffff; -      if (strcmp(s, "none") == 0) -            return 0; -// printf("str2bitmap: <%s> ", str.toLatin1().data()); -      int tval   = 0; -      bool range = false; -      int sval   = 0; -      while (*s == ' ') -            ++s; -      while (*s) { -            if (*s >= '0'  && *s <= '9') { -                  tval *= 10; -                  tval += *s - '0'; -                  } -            else if (*s == ' ' || *s == ',') { -                  if (range) { -                        for (int i = sval-1; i < tval; ++i) -                              val |= (1 << i); -                        range = false; -                        } -                  else { -                        val |= (1 << (tval-1)); -                        } -                  tval = 0; -                  } -            else if (*s == '-') { -                  range = true; -                  sval  = tval; -                  tval  = 0; -                  } -            ++s; -            } -      if (range && tval) { -            for (int i = sval-1; i < tval; ++i) -                  val |= (1 << i); -            } -      else if (tval) { -            val |= (1 << (tval-1)); -            } -      return val & 0xffff; -      } - -//--------------------------------------------------------- -//   muteButton -//--------------------------------------------------------- - -SimpleButton* newMuteButton() -      { -      // SimpleButton* mute  = new SimpleButton(parent, muteIconOff, muteIconOn); -      SimpleButton* mute = new SimpleButton(QT_TR_NOOP("m")); -      mute->setCheckable(true); -      mute->setToolTip(QT_TR_NOOP("mute")); -      mute->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); -      return mute; -      } - -//--------------------------------------------------------- -//   soloButton -//--------------------------------------------------------- - -SimpleButton* newSoloButton() -      { -//      SimpleButton* solo  = new SimpleButton(parent, soloIconOn, soloIconOff); -      SimpleButton* solo = new SimpleButton(QT_TR_NOOP("s")); -      solo->setCheckable(true); -      solo->setToolTip(QT_TR_NOOP("solo")); -      solo->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); -      return solo; -      } - -//--------------------------------------------------------- -//   monitorButton -//--------------------------------------------------------- - -SimpleButton* newMonitorButton() -      { -      SimpleButton* monitor = new SimpleButton(QT_TR_NOOP("Mo")); -      monitor->setCheckable(true); -      monitor->setToolTip(QT_TR_NOOP("monitor")); -      monitor->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); -      return monitor; -      } - -//--------------------------------------------------------- -//   drumMapButton -//--------------------------------------------------------- - -SimpleButton* newDrumMapButton() -      { -      SimpleButton* dm = new SimpleButton(QT_TR_NOOP("Dr")); -      dm->setCheckable(true); -      dm->setToolTip(QT_TR_NOOP("use drum map")); -      return dm; -      } - -//--------------------------------------------------------- -//   newOffButton -//--------------------------------------------------------- - -SimpleButton* newOffButton() -      { -      SimpleButton* off  = new SimpleButton(":/xpm/off.svg", ":/xpm/on.svg"); -      off->setCheckable(true); -      off->setToolTip(QT_TR_NOOP("off")); -      return off; -      } - -//--------------------------------------------------------- -//   newRecordButton -//--------------------------------------------------------- - -SimpleButton* newRecordButton() -      { -      SimpleButton* record = new RecordButton(); -      record->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); -      return record; -      } - -//--------------------------------------------------------- -//   newAutoReadButton -//--------------------------------------------------------- - -SimpleButton* newAutoReadButton() -      { -      SimpleButton* ar = new SimpleButton(QT_TR_NOOP("aR")); -      ar->setCheckable(true); -      ar->setToolTip(QT_TR_NOOP("automation read")); -      return ar; -      } - -//--------------------------------------------------------- -//   newAutoWriteButton -//--------------------------------------------------------- - -SimpleButton* newAutoWriteButton() -      { -      SimpleButton* aw = new SimpleButton(QT_TR_NOOP("aW")); -      aw->setCheckable(true); -      aw->setToolTip(QT_TR_NOOP("automation write")); -      return aw; -      } - -//--------------------------------------------------------- -//   syncButton -//--------------------------------------------------------- - -SimpleButton* newSyncButton() -      { -      SimpleButton* sync = new SimpleButton(QT_TR_NOOP("sync")); -      sync->setCheckable(true); -      sync->setToolTip(QT_TR_NOOP("send sync events")); -      return sync; -      } - -//--------------------------------------------------------- -//   newMinusButton -//--------------------------------------------------------- - -SimpleButton* newMinusButton() -      { -      return new SimpleButton(minusIcon, minusIcon); -      } - -//--------------------------------------------------------- -//   newPlusButton -//--------------------------------------------------------- - -SimpleButton* newPlusButton() -      { -      SimpleButton* sync = new SimpleButton(plusIcon, plusIcon); -      return sync; -      } - -//--------------------------------------------------------- -//   newStereoButton -//--------------------------------------------------------- - -SimpleButton* newStereoButton() -      { -      SimpleButton* stereo  = new SimpleButton(":/xpm/stereo.svg", ":/xpm/mono.svg"); -      stereo->setCheckable(true); -      stereo->setToolTip(QT_TR_NOOP("1/2 channel")); -      return stereo; -      } - -//--------------------------------------------------------- -//   newOutRouteButton -//--------------------------------------------------------- - -QToolButton* newOutRouteButton() -      { -      QToolButton* oR = new QToolButton; -      oR->setObjectName("routeButton"); -      oR->setFixedHeight(BUTTON_HEIGHT); -      oR->setText(QT_TR_NOOP("oR")); -      oR->setCheckable(false); -      oR->setToolTip(QT_TR_NOOP("output routing")); -      oR->setMenu(new QMenu); -      oR->setPopupMode(QToolButton::InstantPopup); -      oR->menu()->setSeparatorsCollapsible(false); -      oR->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); -      return oR; -      } - -//--------------------------------------------------------- -//   newInRouteButton -//--------------------------------------------------------- - -QToolButton* newInRouteButton() -      { -      QToolButton* iR = new QToolButton; -      iR->setObjectName("routeButton"); -      iR->setFixedHeight(BUTTON_HEIGHT); -      iR->setText(QT_TR_NOOP("iR")); -      iR->setCheckable(false); -      iR->setToolTip(QT_TR_NOOP("input routing")); -      iR->setMenu(new QMenu); -      iR->setPopupMode(QToolButton::InstantPopup); -      iR->menu()->setSeparatorsCollapsible(false); -      iR->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); -      return iR; -      } - -//--------------------------------------------------------- -//   fatalError -//--------------------------------------------------------- - -void fatalError(const char* s) -      { -      fprintf(stderr, "%s\n", s); -      exit(-1); -      } - -//--------------------------------------------------------- -//   lineColor -//--------------------------------------------------------- - -QColor lineColor[splitWidth] = { -      QColor(0x55, 0x55, 0x52), -      QColor(0xc6, 0xc6, 0xbf), -      QColor(0xee, 0xee, 0xe6), -      QColor(0xff, 0xff, 0xfc), -      QColor(0xff, 0xff, 0xff), -      QColor(0x55, 0x55, 0x52), -      }; - -//--------------------------------------------------------- -//   paintHLine -//--------------------------------------------------------- - -void paintHLine(QPainter& p, int x1, int x2, int y) -      { -      for (int i = 0; i < splitWidth; ++i) { -            p.setPen(lineColor[i]); -            p.drawLine(x1, y, x2, y); -            ++y; -            } -      } - -//--------------------------------------------------------- -//   paintVLine -//--------------------------------------------------------- - -void paintVLine(QPainter& p, int y1, int y2, int x) -      { -      static QColor color[splitWidth] = { -            QColor(0x55, 0x55, 0x52), -            QColor(0xff, 0xff, 0xff), -            }; -      x -= 2; -      for (int i = 0; i < 2; ++i) { -            p.setPen(color[i]); -            p.drawLine(x, y1, x, y2); -            ++x; -            } -      } - diff --git a/attic/muse_qt4_evolution/muse/widgets/utils.h b/attic/muse_qt4_evolution/muse/widgets/utils.h deleted file mode 100644 index 360dd28e..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/utils.h +++ /dev/null @@ -1,58 +0,0 @@ -//============================================================================= -//  MusE -//  Linux Music Editor -//  $Id:$ -// -//  Copyright (C) 2002-2006 by Werner Schweer and others -// -//  This program is free software; you can redistribute it and/or modify -//  it under the terms of the GNU General Public License version 2. -// -//  This program is distributed in the hope that it will be useful, -//  but WITHOUT ANY WARRANTY; without even the implied warranty of -//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -//  GNU General Public License for more details. -// -//  You should have received a copy of the GNU General Public License -//  along with this program; if not, write to the Free Software -//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -//============================================================================= - -#ifndef __UTILS_H__ -#define __UTILS_H__ - -#include "gui.h" - -class SimpleButton; - -extern QString bitmap2String(int bm); -extern int string2bitmap(const QString& str); - -extern int num2cols(int min, int max); -extern QFrame* hLine(QWidget* parent); -extern QFrame* vLine(QWidget* parent); -extern void dump(const unsigned char* p, int n); -extern double curTime(); -extern SimpleButton* newMuteButton(); -extern SimpleButton* newSoloButton(); -extern SimpleButton* newMonitorButton(); -extern SimpleButton* newDrumMapButton(); -extern SimpleButton* newOffButton(); -extern SimpleButton* newRecordButton(); -extern SimpleButton* newAutoWriteButton(); -extern SimpleButton* newAutoReadButton(); -extern SimpleButton* newSyncButton(); -extern SimpleButton* newPlusButton(); -extern SimpleButton* newMinusButton(); -extern SimpleButton* newStereoButton(); -QToolButton* newOutRouteButton(); -QToolButton* newInRouteButton(); - -extern void fatalError(const char*); - -extern QColor lineColor[splitWidth]; -extern void paintHLine(QPainter& p, int x1, int x2, int y); -extern void paintVLine(QPainter& p, int y1, int y2, int x); - -#endif - diff --git a/attic/muse_qt4_evolution/muse/widgets/wtrackinfobase.ui b/attic/muse_qt4_evolution/muse/widgets/wtrackinfobase.ui deleted file mode 100644 index da341c74..00000000 --- a/attic/muse_qt4_evolution/muse/widgets/wtrackinfobase.ui +++ /dev/null @@ -1,166 +0,0 @@ -<ui version="4.0" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>WaveTrackInfoBase</class> - <widget class="QWidget" name="WaveTrackInfoBase" > -  <property name="geometry" > -   <rect> -    <x>0</x> -    <y>0</y> -    <width>129</width> -    <height>548</height> -   </rect> -  </property> -  <property name="sizePolicy" > -   <sizepolicy> -    <hsizetype>3</hsizetype> -    <vsizetype>3</vsizetype> -    <horstretch>0</horstretch> -    <verstretch>0</verstretch> -   </sizepolicy> -  </property> -  <property name="minimumSize" > -   <size> -    <width>0</width> -    <height>0</height> -   </size> -  </property> -  <property name="maximumSize" > -   <size> -    <width>32767</width> -    <height>32767</height> -   </size> -  </property> -  <property name="windowTitle" > -   <string>MusE: TrackInfo</string> -  </property> -  <property name="toolTip" > -   <string/> -  </property> -  <property name="whatsThis" > -   <string/> -  </property> -  <layout class="QGridLayout" > -   <property name="margin" > -    <number>1</number> -   </property> -   <property name="spacing" > -    <number>1</number> -   </property> -   <item row="0" column="0" colspan="2" > -    <widget class="QLabel" name="TextLabel1" > -     <property name="sizePolicy" > -      <sizepolicy> -       <hsizetype>7</hsizetype> -       <vsizetype>0</vsizetype> -       <horstretch>0</horstretch> -       <verstretch>0</verstretch> -      </sizepolicy> -     </property> -     <property name="frameShape" > -      <enum>QFrame::WinPanel</enum> -     </property> -     <property name="frameShadow" > -      <enum>QFrame::Raised</enum> -     </property> -     <property name="lineWidth" > -      <number>1</number> -     </property> -     <property name="midLineWidth" > -      <number>0</number> -     </property> -     <property name="text" > -      <string>Track Info</string> -     </property> -     <property name="alignment" > -      <set>Qt::AlignCenter</set> -     </property> -    </widget> -   </item> -   <item row="1" column="0" colspan="2" > -    <widget class="QLineEdit" name="iName" > -     <property name="sizePolicy" > -      <sizepolicy> -       <hsizetype>7</hsizetype> -       <vsizetype>0</vsizetype> -       <horstretch>0</horstretch> -       <verstretch>0</verstretch> -      </sizepolicy> -     </property> -     <property name="toolTip" > -      <string>Track Name</string> -     </property> -     <property name="whatsThis" > -      <string>Track Name</string> -     </property> -    </widget> -   </item> -   <item row="3" column="1" > -    <spacer> -     <property name="orientation" > -      <enum>Qt::Vertical</enum> -     </property> -     <property name="sizeType" > -      <enum>QSizePolicy::Expanding</enum> -     </property> -     <property name="sizeHint" > -      <size> -       <width>20</width> -       <height>30</height> -      </size> -     </property> -    </spacer> -   </item> -   <item row="2" column="0" > -    <widget class="QSpinBox" name="delay" > -     <property name="sizePolicy" > -      <sizepolicy> -       <hsizetype>5</hsizetype> -       <vsizetype>0</vsizetype> -       <horstretch>0</horstretch> -       <verstretch>0</verstretch> -      </sizepolicy> -     </property> -     <property name="toolTip" > -      <string>Track Delay (ticks)</string> -     </property> -     <property name="specialValueText" > -      <string>off</string> -     </property> -     <property name="maximum" > -      <number>1000</number> -     </property> -     <property name="minimum" > -      <number>-1000</number> -     </property> -    </widget> -   </item> -   <item row="2" column="1" > -    <widget class="QLabel" name="TextLabel10" > -     <property name="sizePolicy" > -      <sizepolicy> -       <hsizetype>5</hsizetype> -       <vsizetype>0</vsizetype> -       <horstretch>0</horstretch> -       <verstretch>0</verstretch> -      </sizepolicy> -     </property> -     <property name="toolTip" > -      <string>Delay (Frames)</string> -     </property> -     <property name="text" > -      <string>Delay</string> -     </property> -    </widget> -   </item> -  </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <tabstops> -  <tabstop>iName</tabstop> - </tabstops> - <resources/> - <connections/> -</ui>  | 
