summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/tempo
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/tempo
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz
rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/tempo')
-rw-r--r--src/gui/editors/tempo/TempoListItem.cpp4
-rw-r--r--src/gui/editors/tempo/TempoListItem.h10
-rw-r--r--src/gui/editors/tempo/TempoView.cpp138
-rw-r--r--src/gui/editors/tempo/TempoView.h32
4 files changed, 92 insertions, 92 deletions
diff --git a/src/gui/editors/tempo/TempoListItem.cpp b/src/gui/editors/tempo/TempoListItem.cpp
index d088b5b..821c329 100644
--- a/src/gui/editors/tempo/TempoListItem.cpp
+++ b/src/gui/editors/tempo/TempoListItem.cpp
@@ -27,10 +27,10 @@
namespace Rosegarden {
int
-TempoListItem::compare(QListViewItem *i, int col, bool ascending) const
+TempoListItem::compare(TQListViewItem *i, int col, bool ascending) const
{
TempoListItem *ti = dynamic_cast<TempoListItem *>(i);
- if (!ti) return QListViewItem::compare(i, col, ascending);
+ if (!ti) return TQListViewItem::compare(i, col, ascending);
if (col == 0) { // time
if (m_time == ti->m_time) {
diff --git a/src/gui/editors/tempo/TempoListItem.h b/src/gui/editors/tempo/TempoListItem.h
index 143edde..640b7b1 100644
--- a/src/gui/editors/tempo/TempoListItem.h
+++ b/src/gui/editors/tempo/TempoListItem.h
@@ -43,10 +43,10 @@ public:
timeT time,
int index,
KListView *parent,
- QString label1,
- QString label2,
- QString label3,
- QString label4 = QString::null) :
+ TQString label1,
+ TQString label2,
+ TQString label3,
+ TQString label4 = TQString::null) :
KListViewItem(parent, label1, label2, label3, label4),
m_composition(composition),
m_type(type),
@@ -58,7 +58,7 @@ public:
Rosegarden::timeT getTime() const { return m_time; }
int getIndex() const { return m_index; }
- virtual int compare(QListViewItem *i, int col, bool ascending) const;
+ virtual int compare(TQListViewItem *i, int col, bool ascending) const;
protected:
Rosegarden::Composition *m_composition;
diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp
index 6ff6c1d..c3bc23e 100644
--- a/src/gui/editors/tempo/TempoView.cpp
+++ b/src/gui/editors/tempo/TempoView.cpp
@@ -49,17 +49,17 @@
#include <kconfig.h>
#include <klistview.h>
#include <kxmlguiclient.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qiconset.h>
-#include <qlistview.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qcanvas.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqiconset.h>
+#include <tqlistview.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqcanvas.h>
#include <kstatusbar.h>
@@ -70,7 +70,7 @@ int
TempoView::m_lastSetFilter = -1;
-TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime):
+TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime):
EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"),
m_filter(Tempo | TimeSignature),
m_ignoreUpdates(true)
@@ -86,16 +86,16 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime):
// define some note filtering buttons in a group
//
m_filterGroup =
- new QButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget());
+ new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget());
- m_tempoCheckBox = new QCheckBox(i18n("Tempo"), m_filterGroup);
- m_timeSigCheckBox = new QCheckBox(i18n("Time Signature"), m_filterGroup);
+ m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup);
+ m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), m_filterGroup);
m_grid->addWidget(m_filterGroup, 2, 0);
// Connect up
//
- connect(m_filterGroup, SIGNAL(released(int)),
- SLOT(slotModifyFilter(int)));
+ connect(m_filterGroup, TQT_SIGNAL(released(int)),
+ TQT_SLOT(slotModifyFilter(int)));
m_list = new KListView(getCentralWidget());
m_list->setItemsRenameable(true);
@@ -108,11 +108,11 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime):
// Connect double clicker
//
- connect(m_list, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(slotPopupEditor(QListViewItem*)));
+ connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(slotPopupEditor(TQListViewItem*)));
m_list->setAllColumnsShowFocus(true);
- m_list->setSelectionMode(QListView::Extended);
+ m_list->setSelectionMode(TQListView::Extended);
m_list->addColumn(i18n("Time "));
m_list->addColumn(i18n("Type "));
@@ -140,7 +140,7 @@ TempoView::~TempoView()
}
void
-TempoView::closeEvent(QCloseEvent *e)
+TempoView::closeEvent(TQCloseEvent *e)
{
emit closing();
EditViewBase::closeEvent(e);
@@ -174,11 +174,11 @@ TempoView::applyLayout(int /*staffNo*/)
// of the view. This code borrowed from EventView.
//
if (m_listSelection.size() == 0) {
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count()) {
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
while ((listItem = it.current()) != 0) {
m_listSelection.push_back(m_list->itemIndex(*it));
@@ -202,7 +202,7 @@ TempoView::applyLayout(int /*staffNo*/)
std::pair<timeT, Rosegarden::TimeSignature> sig =
comp->getTimeSignatureChange(i);
- QString properties;
+ TQString properties;
if (sig.second.isHidden()) {
if (sig.second.isCommon())
properties = i18n("Common, hidden");
@@ -213,12 +213,12 @@ TempoView::applyLayout(int /*staffNo*/)
properties = i18n("Common");
}
- QString timeString = makeTimeString(sig.first, timeMode);
+ TQString timeString = makeTimeString(sig.first, timeMode);
new TempoListItem(comp, TempoListItem::TimeSignature,
sig.first, i, m_list, timeString,
i18n("Time Signature "),
- QString("%1/%2 ").arg(sig.second.getNumerator()).
+ TQString("%1/%2 ").arg(sig.second.getNumerator()).
arg(sig.second.getDenominator()),
properties);
}
@@ -230,7 +230,7 @@ TempoView::applyLayout(int /*staffNo*/)
std::pair<timeT, tempoT> tempo =
comp->getTempoChange(i);
- QString desc;
+ TQString desc;
//!!! imprecise -- better to work from tempoT directly
@@ -257,7 +257,7 @@ TempoView::applyLayout(int /*staffNo*/)
arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths);
}
- QString timeString = makeTimeString(tempo.first, timeMode);
+ TQString timeString = makeTimeString(tempo.first, timeMode);
new TempoListItem(comp, TempoListItem::Tempo,
tempo.first, i, m_list, timeString,
@@ -267,12 +267,12 @@ TempoView::applyLayout(int /*staffNo*/)
}
if (m_list->childCount() == 0) {
- new QListViewItem(m_list,
+ new TQListViewItem(m_list,
i18n("<nothing at this filter level>"));
- m_list->setSelectionMode(QListView::NoSelection);
+ m_list->setSelectionMode(TQListView::NoSelection);
stateChanged("have_selection", KXMLGUIClient::StateReverse);
} else {
- m_list->setSelectionMode(QListView::Extended);
+ m_list->setSelectionMode(TQListView::Extended);
// If no selection then select the first event
if (m_listSelection.size() == 0)
@@ -353,7 +353,7 @@ TempoView::makeTimeString(timeT time, int timeMode)
getDocument()->getComposition().getMusicalTimeForAbsoluteTime
(time, bar, beat, fraction, remainder);
++bar;
- return QString("%1%2%3-%4%5-%6%7-%8%9 ")
+ return TQString("%1%2%3-%4%5-%6%7-%8%9 ")
.arg(bar / 100)
.arg((bar % 100) / 10)
.arg(bar % 10)
@@ -369,12 +369,12 @@ TempoView::makeTimeString(timeT time, int timeMode)
{
RealTime rt =
getDocument()->getComposition().getElapsedRealTime(time);
- // return QString("%1 ").arg(rt.toString().c_str());
- return QString("%1 ").arg(rt.toText().c_str());
+ // return TQString("%1 ").arg(rt.toString().c_str());
+ return TQString("%1 ").arg(rt.toText().c_str());
}
default:
- return QString("%1 ").arg(time);
+ return TQString("%1 ").arg(time);
}
}
@@ -415,15 +415,15 @@ TempoView::slotEditPaste()
void
TempoView::slotEditDelete()
{
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() == 0)
return ;
RG_DEBUG << "TempoView::slotEditDelete - deleting "
<< selection.count() << " items" << endl;
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
TempoListItem *item;
int itemIndex = -1;
@@ -476,7 +476,7 @@ void
TempoView::slotEditInsertTempo()
{
timeT insertTime = 0;
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() > 0) {
TempoListItem *item =
@@ -489,12 +489,12 @@ TempoView::slotEditInsertTempo()
dialog.setTempoPosition(insertTime);
connect(&dialog,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)),
this,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)));
@@ -506,7 +506,7 @@ void
TempoView::slotEditInsertTimeSignature()
{
timeT insertTime = 0;
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() > 0) {
TempoListItem *item =
@@ -520,7 +520,7 @@ TempoView::slotEditInsertTimeSignature()
TimeSignatureDialog dialog(this, &composition, insertTime, sig, true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
insertTime = dialog.getTime();
@@ -541,7 +541,7 @@ TempoView::slotEdit()
{
RG_DEBUG << "TempoView::slotEdit" << endl;
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() > 0) {
TempoListItem *item =
@@ -575,40 +575,40 @@ TempoView::setupActions()
{
EditViewBase::setupActions("tempoview.rc", false);
- QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
- QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert-tempo.png"));
+ TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
+ TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png"));
new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this,
- SLOT(slotEditInsertTempo()), actionCollection(),
+ TQT_SLOT(slotEditInsertTempo()), actionCollection(),
"insert_tempo");
- QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png");
- icon = QIconSet(pixmap);
+ TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png");
+ icon = TQIconSet(pixmap);
new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this,
- SLOT(slotEditInsertTimeSignature()), actionCollection(),
+ TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(),
"insert_timesig");
pixmap.load(pixmapDir + "/toolbar/event-delete.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
new KAction(i18n("&Delete"), icon, Key_Delete, this,
- SLOT(slotEditDelete()), actionCollection(),
+ TQT_SLOT(slotEditDelete()), actionCollection(),
"delete");
pixmap.load(pixmapDir + "/toolbar/event-edit.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
new KAction(i18n("&Edit Item"), icon, Key_E, this,
- SLOT(slotEdit()), actionCollection(),
+ TQT_SLOT(slotEdit()), actionCollection(),
"edit");
new KAction(i18n("Select &All"), 0, this,
- SLOT(slotSelectAll()), actionCollection(),
+ TQT_SLOT(slotSelectAll()), actionCollection(),
"select_all");
new KAction(i18n("Clear Selection"), Key_Escape, this,
- SLOT(slotClearSelection()), actionCollection(),
+ TQT_SLOT(slotClearSelection()), actionCollection(),
"clear_selection");
m_config->setGroup(TempoViewConfigGroup);
@@ -617,30 +617,30 @@ TempoView::setupActions()
KRadioAction *action;
pixmap.load(pixmapDir + "/toolbar/time-musical.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
action = new KRadioAction(i18n("&Musical Times"), icon, 0, this,
- SLOT(slotMusicalTime()),
+ TQT_SLOT(slotMusicalTime()),
actionCollection(), "time_musical");
action->setExclusiveGroup("timeMode");
if (timeMode == 0)
action->setChecked(true);
pixmap.load(pixmapDir + "/toolbar/time-real.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
action = new KRadioAction(i18n("&Real Times"), icon, 0, this,
- SLOT(slotRealTime()),
+ TQT_SLOT(slotRealTime()),
actionCollection(), "time_real");
action->setExclusiveGroup("timeMode");
if (timeMode == 1)
action->setChecked(true);
pixmap.load(pixmapDir + "/toolbar/time-raw.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this,
- SLOT(slotRawTime()),
+ TQT_SLOT(slotRawTime()),
actionCollection(), "time_raw");
action->setExclusiveGroup("timeMode");
if (timeMode == 2)
@@ -667,7 +667,7 @@ TempoView::getViewSize()
}
void
-TempoView::setViewSize(QSize s)
+TempoView::setViewSize(TQSize s)
{
m_list->setFixedSize(s);
}
@@ -692,7 +692,7 @@ TempoView::slotSaveOptions()
void
TempoView::slotModifyFilter(int button)
{
- QCheckBox *checkBox = dynamic_cast<QCheckBox*>(m_filterGroup->find(button));
+ TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button));
if (checkBox == 0)
return ;
@@ -770,7 +770,7 @@ TempoView::slotRawTime()
}
void
-TempoView::slotPopupEditor(QListViewItem *qitem)
+TempoView::slotPopupEditor(TQListViewItem *qitem)
{
TempoListItem *item = dynamic_cast<TempoListItem *>(qitem);
if (!item)
@@ -786,12 +786,12 @@ TempoView::slotPopupEditor(QListViewItem *qitem)
dialog.setTempoPosition(time);
connect(&dialog,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)),
this,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)));
@@ -807,7 +807,7 @@ TempoView::slotPopupEditor(QListViewItem *qitem)
TimeSignatureDialog dialog(this, &composition, time, sig, true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
time = dialog.getTime();
diff --git a/src/gui/editors/tempo/TempoView.h b/src/gui/editors/tempo/TempoView.h
index 9a78e1b..fcf3efb 100644
--- a/src/gui/editors/tempo/TempoView.h
+++ b/src/gui/editors/tempo/TempoView.h
@@ -30,17 +30,17 @@
#include "base/NotationTypes.h"
#include "gui/dialogs/TempoDialog.h"
#include "gui/general/EditViewBase.h"
-#include <qsize.h>
-#include <qstring.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include <vector>
#include "base/Event.h"
-class QWidget;
-class QListViewItem;
-class QCloseEvent;
-class QCheckBox;
-class QButtonGroup;
+class TQWidget;
+class TQListViewItem;
+class TQCloseEvent;
+class TQCheckBox;
+class TQButtonGroup;
class KListView;
@@ -71,7 +71,7 @@ class TempoView : public EditViewBase, public CompositionObserver
};
public:
- TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT);
+ TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT);
virtual ~TempoView();
virtual bool applyLayout(int staffNo = -1);
@@ -84,8 +84,8 @@ public:
virtual void setupActions();
virtual void initStatusBar();
- virtual QSize getViewSize();
- virtual void setViewSize(QSize);
+ virtual TQSize getViewSize();
+ virtual void setViewSize(TQSize);
// Set the button states to the current filter positions
//
@@ -130,7 +130,7 @@ public slots:
// on double click on the event list
//
- void slotPopupEditor(QListViewItem*);
+ void slotPopupEditor(TQListViewItem*);
// Change filter parameters
//
@@ -144,11 +144,11 @@ protected:
virtual void readOptions();
void makeInitialSelection(timeT);
- QString makeTimeString(timeT time, int timeMode);
+ TQString makeTimeString(timeT time, int timeMode);
virtual Segment *getCurrentSegment();
virtual void updateViewCaption();
- virtual void closeEvent(QCloseEvent *);
+ virtual void closeEvent(TQCloseEvent *);
//--------------- Data members ---------------------------------
KListView *m_list;
@@ -156,9 +156,9 @@ protected:
static int m_lastSetFilter;
- QButtonGroup *m_filterGroup;
- QCheckBox *m_tempoCheckBox;
- QCheckBox *m_timeSigCheckBox;
+ TQButtonGroup *m_filterGroup;
+ TQCheckBox *m_tempoCheckBox;
+ TQCheckBox *m_timeSigCheckBox;
std::vector<int> m_listSelection;