summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/eventlist/EventView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editors/eventlist/EventView.cpp')
-rw-r--r--src/gui/editors/eventlist/EventView.cpp316
1 files changed, 158 insertions, 158 deletions
diff --git a/src/gui/editors/eventlist/EventView.cpp b/src/gui/editors/eventlist/EventView.cpp
index 13bd294..cdf73cc 100644
--- a/src/gui/editors/eventlist/EventView.cpp
+++ b/src/gui/editors/eventlist/EventView.cpp
@@ -68,23 +68,23 @@
#include <klineeditdlg.h>
#include <klistview.h>
#include <kxmlguiclient.h>
-#include <qbuttongroup.h>
-#include <qcanvas.h>
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qiconset.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqbuttongroup.h>
+#include <tqcanvas.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqiconset.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <algorithm>
@@ -97,7 +97,7 @@ EventView::m_lastSetEventFilter = -1;
EventView::EventView(RosegardenGUIDoc *doc,
std::vector<Segment *> segments,
- QWidget *parent):
+ TQWidget *parent):
EditViewBase(doc, segments, 2, parent, "eventview"),
m_eventFilter(Note | Text | SystemExclusive | Controller |
ProgramChange | PitchBend | Indication | Other),
@@ -126,25 +126,25 @@ EventView::EventView(RosegardenGUIDoc *doc,
// define some note filtering buttons in a group
//
m_filterGroup =
- new QButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget());
-
- m_noteCheckBox = new QCheckBox(i18n("Note"), m_filterGroup);
- m_programCheckBox = new QCheckBox(i18n("Program Change"), m_filterGroup);
- m_controllerCheckBox = new QCheckBox(i18n("Controller"), m_filterGroup);
- m_pitchBendCheckBox = new QCheckBox(i18n("Pitch Bend"), m_filterGroup);
- m_sysExCheckBox = new QCheckBox(i18n("System Exclusive"), m_filterGroup);
- m_keyPressureCheckBox = new QCheckBox(i18n("Key Pressure"), m_filterGroup);
- m_channelPressureCheckBox = new QCheckBox(i18n("Channel Pressure"), m_filterGroup);
- m_restCheckBox = new QCheckBox(i18n("Rest"), m_filterGroup);
- m_indicationCheckBox = new QCheckBox(i18n("Indication"), m_filterGroup);
- m_textCheckBox = new QCheckBox(i18n("Text"), m_filterGroup);
- m_otherCheckBox = new QCheckBox(i18n("Other"), m_filterGroup);
+ new TQButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget());
+
+ m_noteCheckBox = new TQCheckBox(i18n("Note"), m_filterGroup);
+ m_programCheckBox = new TQCheckBox(i18n("Program Change"), m_filterGroup);
+ m_controllerCheckBox = new TQCheckBox(i18n("Controller"), m_filterGroup);
+ m_pitchBendCheckBox = new TQCheckBox(i18n("Pitch Bend"), m_filterGroup);
+ m_sysExCheckBox = new TQCheckBox(i18n("System Exclusive"), m_filterGroup);
+ m_keyPressureCheckBox = new TQCheckBox(i18n("Key Pressure"), m_filterGroup);
+ m_channelPressureCheckBox = new TQCheckBox(i18n("Channel Pressure"), m_filterGroup);
+ m_restCheckBox = new TQCheckBox(i18n("Rest"), m_filterGroup);
+ m_indicationCheckBox = new TQCheckBox(i18n("Indication"), m_filterGroup);
+ m_textCheckBox = new TQCheckBox(i18n("Text"), m_filterGroup);
+ m_otherCheckBox = new TQCheckBox(i18n("Other"), 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_eventList = new KListView(getCentralWidget());
m_eventList->setItemsRenameable(true);
@@ -157,41 +157,41 @@ EventView::EventView(RosegardenGUIDoc *doc,
TriggerSegmentRec *rec =
segments[0]->getComposition()->getTriggerSegmentRec(id);
- QGroupBox *groupBox = new QGroupBox
+ TQGroupBox *groupBox = new QGroupBox
(1, Horizontal, i18n("Triggered Segment Properties"), getCentralWidget());
- QFrame *frame = new QFrame(groupBox);
- QGridLayout *layout = new QGridLayout(frame, 5, 3, 5, 5);
+ TQFrame *frame = new TQFrame(groupBox);
+ TQGridLayout *layout = new TQGridLayout(frame, 5, 3, 5, 5);
- layout->addWidget(new QLabel(i18n("Label: "), frame), 0, 0);
- QString label = strtoqstr(segments[0]->getLabel());
+ layout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0);
+ TQString label = strtoqstr(segments[0]->getLabel());
if (label == "")
label = i18n("<no label>");
- m_triggerName = new QLabel(label, frame);
+ m_triggerName = new TQLabel(label, frame);
layout->addWidget(m_triggerName, 0, 1);
- QPushButton *editButton = new QPushButton(i18n("edit"), frame);
+ TQPushButton *editButton = new TQPushButton(i18n("edit"), frame);
layout->addWidget(editButton, 0, 2);
- connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerName()));
+ connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerName()));
- layout->addWidget(new QLabel(i18n("Base pitch: "), frame), 1, 0);
- m_triggerPitch = new QLabel(QString("%1").arg(rec->getBasePitch()), frame);
+ layout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0);
+ m_triggerPitch = new TQLabel(TQString("%1").arg(rec->getBasePitch()), frame);
layout->addWidget(m_triggerPitch, 1, 1);
- editButton = new QPushButton(i18n("edit"), frame);
+ editButton = new TQPushButton(i18n("edit"), frame);
layout->addWidget(editButton, 1, 2);
- connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerPitch()));
+ connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerPitch()));
- layout->addWidget(new QLabel(i18n("Base velocity: "), frame), 2, 0);
- m_triggerVelocity = new QLabel(QString("%1").arg(rec->getBaseVelocity()), frame);
+ layout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0);
+ m_triggerVelocity = new TQLabel(TQString("%1").arg(rec->getBaseVelocity()), frame);
layout->addWidget(m_triggerVelocity, 2, 1);
- editButton = new QPushButton(i18n("edit"), frame);
+ editButton = new TQPushButton(i18n("edit"), frame);
layout->addWidget(editButton, 2, 2);
- connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerVelocity()));
+ connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerVelocity()));
/*!!! Comment out these two options, which are not yet used
anywhere else -- intended for use with library ornaments, not
yet implemented
- layout->addWidget(new QLabel(i18n("Default timing: "), frame), 3, 0);
+ layout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0);
KComboBox *adjust = new KComboBox(frame);
layout->addMultiCellWidget(adjust, 3, 3, 1, 2);
@@ -211,11 +211,11 @@ EventView::EventView(RosegardenGUIDoc *doc,
adjust->setCurrentItem(2);
}
- connect(adjust, SIGNAL(activated(int)), this, SLOT(slotTriggerTimeAdjustChanged(int)));
+ connect(adjust, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTriggerTimeAdjustChanged(int)));
- QCheckBox *retune = new QCheckBox(i18n("Adjust pitch to trigger note by default"), frame);
+ TQCheckBox *retune = new TQCheckBox(i18n("Adjust pitch to trigger note by default"), frame);
retune->setChecked(rec->getDefaultRetune());
- connect(retune, SIGNAL(clicked()), this, SLOT(slotTriggerRetuneChanged()));
+ connect(retune, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTriggerRetuneChanged()));
layout->addMultiCellWidget(retune, 4, 4, 1, 2);
*/
@@ -232,15 +232,15 @@ EventView::EventView(RosegardenGUIDoc *doc,
// Connect double clicker
//
- connect(m_eventList, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(slotPopupEventEditor(QListViewItem*)));
+ connect(m_eventList, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(slotPopupEventEditor(TQListViewItem*)));
connect(m_eventList,
- SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)),
- SLOT(slotPopupMenu(QListViewItem*, const QPoint&, int)));
+ TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotPopupMenu(TQListViewItem*, const TQPoint&, int)));
m_eventList->setAllColumnsShowFocus(true);
- m_eventList->setSelectionMode(QListView::Extended);
+ m_eventList->setSelectionMode(TQListView::Extended);
m_eventList->addColumn(i18n("Time "));
m_eventList->addColumn(i18n("Duration "));
@@ -299,11 +299,11 @@ EventView::applyLayout(int /*staffNo*/)
// of the view.
//
if (m_listSelection.size() == 0) {
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->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_eventList->itemIndex(*it));
@@ -327,11 +327,11 @@ EventView::applyLayout(int /*staffNo*/)
timeT eventTime =
helper.getSoundingAbsoluteTime(it);
- QString velyStr;
- QString pitchStr;
- QString data1Str = "";
- QString data2Str = "";
- QString durationStr;
+ TQString velyStr;
+ TQString pitchStr;
+ TQString data1Str = "";
+ TQString data2Str = "";
+ TQString durationStr;
// Event filters
//
@@ -386,14 +386,14 @@ EventView::applyLayout(int /*staffNo*/)
if ((*it)->has(BaseProperties::PITCH)) {
int p = (*it)->get
<Int>(BaseProperties::PITCH);
- pitchStr = QString("%1 %2 ")
+ pitchStr = TQString("%1 %2 ")
.arg(p).arg(MidiPitchLabel(p).getQString());
} else if ((*it)->isa(Note::EventType)) {
pitchStr = "<not set>";
}
if ((*it)->has(BaseProperties::VELOCITY)) {
- velyStr = QString("%1 ").
+ velyStr = TQString("%1 ").
arg((*it)->get
<Int>(BaseProperties::VELOCITY));
} else if ((*it)->isa(Note::EventType)) {
@@ -401,60 +401,60 @@ EventView::applyLayout(int /*staffNo*/)
}
if ((*it)->has(Controller::NUMBER)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg((*it)->get
<Int>(Controller::NUMBER));
} else if ((*it)->has(Text::TextTypePropertyName)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg(strtoqstr((*it)->get
<String>
(Text::TextTypePropertyName)));
} else if ((*it)->has(Indication::
IndicationTypePropertyName)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg(strtoqstr((*it)->get
<String>
(Indication::
IndicationTypePropertyName)));
} else if ((*it)->has(::Rosegarden::Key::KeyPropertyName)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg(strtoqstr((*it)->get
<String>
(::Rosegarden::Key::KeyPropertyName)));
} else if ((*it)->has(Clef::ClefPropertyName)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg(strtoqstr((*it)->get
<String>
(Clef::ClefPropertyName)));
} else if ((*it)->has(PitchBend::MSB)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg((*it)->get
<Int>(PitchBend::MSB));
} else if ((*it)->has(BaseProperties::BEAMED_GROUP_TYPE)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg(strtoqstr((*it)->get
<String>
(BaseProperties::BEAMED_GROUP_TYPE)));
}
if ((*it)->has(Controller::VALUE)) {
- data2Str = QString("%1 ").
+ data2Str = TQString("%1 ").
arg((*it)->get
<Int>(Controller::VALUE));
} else if ((*it)->has(Text::TextPropertyName)) {
- data2Str = QString("%1 ").
+ data2Str = TQString("%1 ").
arg(strtoqstr((*it)->get
<String>
(Text::TextPropertyName)));
/*!!!
} else if ((*it)->has(Indication::
IndicationTypePropertyName)) {
- data2Str = QString("%1 ").
+ data2Str = TQString("%1 ").
arg((*it)->get<Int>(Indication::
IndicationDurationPropertyName));
*/
} else if ((*it)->has(PitchBend::LSB)) {
- data2Str = QString("%1 ").
+ data2Str = TQString("%1 ").
arg((*it)->get
<Int>(PitchBend::LSB));
} else if ((*it)->has(BaseProperties::BEAMED_GROUP_ID)) {
@@ -464,26 +464,26 @@ EventView::applyLayout(int /*staffNo*/)
}
if ((*it)->has(ProgramChange::PROGRAM)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg((*it)->get
<Int>(ProgramChange::PROGRAM) + 1);
}
if ((*it)->has(ChannelPressure::PRESSURE)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg((*it)->get
<Int>(ChannelPressure::PRESSURE));
}
if ((*it)->isa(KeyPressure::EventType) &&
(*it)->has(KeyPressure::PITCH)) {
- data1Str = QString("%1 ").
+ data1Str = TQString("%1 ").
arg((*it)->get
<Int>(KeyPressure::PITCH));
}
if ((*it)->has(KeyPressure::PRESSURE)) {
- data2Str = QString("%1 ").
+ data2Str = TQString("%1 ").
arg((*it)->get
<Int>(KeyPressure::PRESSURE));
}
@@ -497,7 +497,7 @@ EventView::applyLayout(int /*staffNo*/)
timeMode);
}
- QString timeStr = makeTimeString(eventTime, timeMode);
+ TQString timeStr = makeTimeString(eventTime, timeMode);
new EventViewItem(m_segments[i],
*it,
@@ -515,15 +515,15 @@ EventView::applyLayout(int /*staffNo*/)
if (m_eventList->childCount() == 0) {
if (m_segments.size())
- new QListViewItem(m_eventList,
+ new TQListViewItem(m_eventList,
i18n("<no events at this filter level>"));
else
- new QListViewItem(m_eventList, i18n("<no events>"));
+ new TQListViewItem(m_eventList, i18n("<no events>"));
- m_eventList->setSelectionMode(QListView::NoSelection);
+ m_eventList->setSelectionMode(TQListView::NoSelection);
stateChanged("have_selection", KXMLGUIClient::StateReverse);
} else {
- m_eventList->setSelectionMode(QListView::Extended);
+ m_eventList->setSelectionMode(TQListView::Extended);
// If no selection then select the first event
if (m_listSelection.size() == 0)
@@ -566,7 +566,7 @@ EventView::makeInitialSelection(timeT time)
int i = 0;
- for (QListViewItem *child = m_eventList->firstChild();
+ for (TQListViewItem *child = m_eventList->firstChild();
child;
child = child->nextSibling()) {
@@ -612,7 +612,7 @@ EventView::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)
@@ -628,12 +628,12 @@ EventView::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);
}
}
@@ -648,7 +648,7 @@ EventView::makeDurationString(timeT time,
int bar, beat, fraction, remainder;
getDocument()->getComposition().getMusicalTimeForDuration
(time, duration, bar, beat, fraction, remainder);
- 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)
@@ -665,12 +665,12 @@ EventView::makeDurationString(timeT time,
RealTime rt =
getDocument()->getComposition().getRealTimeDifference
(time, time + duration);
- // 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(duration);
+ return TQString("%1 ").arg(duration);
}
}
@@ -693,7 +693,7 @@ void
EventView::slotEditTriggerName()
{
bool ok = false;
- QString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"),
+ TQString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"),
strtoqstr(m_segments[0]->getLabel()),
&ok, this);
@@ -716,10 +716,10 @@ EventView::slotEditTriggerPitch()
PitchDialog *dlg = new PitchDialog(this, i18n("Base pitch"), rec->getBasePitch());
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
addCommandToHistory(new SetTriggerSegmentBasePitchCommand
(&getDocument()->getComposition(), id, dlg->getPitch()));
- m_triggerPitch->setText(QString("%1").arg(dlg->getPitch()));
+ m_triggerPitch->setText(TQString("%1").arg(dlg->getPitch()));
}
}
@@ -734,10 +734,10 @@ EventView::slotEditTriggerVelocity()
TrivialVelocityDialog *dlg = new TrivialVelocityDialog
(this, i18n("Base velocity"), rec->getBaseVelocity());
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
addCommandToHistory(new SetTriggerSegmentBaseVelocityCommand
(&getDocument()->getComposition(), id, dlg->getVelocity()));
- m_triggerVelocity->setText(QString("%1").arg(dlg->getVelocity()));
+ m_triggerVelocity->setText(TQString("%1").arg(dlg->getVelocity()));
}
}
@@ -789,7 +789,7 @@ EventView::slotTriggerRetuneChanged()
void
EventView::slotEditCut()
{
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() == 0)
return ;
@@ -797,8 +797,8 @@ EventView::slotEditCut()
RG_DEBUG << "EventView::slotEditCut - cutting "
<< selection.count() << " items" << endl;
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
EventViewItem *item;
EventSelection *cutSelection = 0;
int itemIndex = -1;
@@ -833,7 +833,7 @@ EventView::slotEditCut()
void
EventView::slotEditCopy()
{
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() == 0)
return ;
@@ -841,8 +841,8 @@ EventView::slotEditCopy()
RG_DEBUG << "EventView::slotEditCopy - copying "
<< selection.count() << " items" << endl;
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
EventViewItem *item;
EventSelection *copySelection = 0;
@@ -883,7 +883,7 @@ EventView::slotEditPaste()
timeT insertionTime = 0;
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count()) {
EventViewItem *item = dynamic_cast<EventViewItem*>(selection.at(0));
@@ -894,8 +894,8 @@ EventView::slotEditPaste()
//
m_listSelection.clear();
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
while ((listItem = it.current()) != 0) {
m_listSelection.push_back(m_eventList->itemIndex(*it));
@@ -920,15 +920,15 @@ EventView::slotEditPaste()
void
EventView::slotEditDelete()
{
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() == 0)
return ;
RG_DEBUG << "EventView::slotEditDelete - deleting "
<< selection.count() << " items" << endl;
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
EventViewItem *item;
EventSelection *deleteSelection = 0;
int itemIndex = -1;
@@ -974,7 +974,7 @@ EventView::slotEditInsert()
timeT insertTime = m_segments[0]->getStartTime();
timeT insertDuration = 960;
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() > 0) {
EventViewItem *item =
@@ -999,7 +999,7 @@ EventView::slotEditInsert()
SimpleEventEditDialog dialog(this, getDocument(), *event, true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
EventInsertionCommand *command =
new EventInsertionCommand(*m_segments[0],
new Event(dialog.getEvent()));
@@ -1012,7 +1012,7 @@ EventView::slotEditEvent()
{
RG_DEBUG << "EventView::slotEditEvent" << endl;
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() > 0) {
EventViewItem *item =
@@ -1022,7 +1022,7 @@ EventView::slotEditEvent()
Event *event = item->getEvent();
SimpleEventEditDialog dialog(this, getDocument(), *event, false);
- if (dialog.exec() == QDialog::Accepted && dialog.isModified()) {
+ if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) {
EventEditCommand *command =
new EventEditCommand(*(item->getSegment()),
event,
@@ -1039,7 +1039,7 @@ EventView::slotEditEventAdvanced()
{
RG_DEBUG << "EventView::slotEditEventAdvanced" << endl;
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() > 0) {
EventViewItem *item =
@@ -1049,7 +1049,7 @@ EventView::slotEditEventAdvanced()
Event *event = item->getEvent();
EventEditDialog dialog(this, *event);
- if (dialog.exec() == QDialog::Accepted && dialog.isModified()) {
+ if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) {
EventEditCommand *command =
new EventEditCommand(*(item->getSegment()),
event,
@@ -1084,15 +1084,15 @@ void
EventView::slotFilterSelection()
{
m_listSelection.clear();
- QPtrList<QListViewItem> selection = m_eventList->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_eventList->selectedItems();
if (selection.count() == 0)
return ;
EventFilterDialog dialog(this);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
while ((listItem = it.current()) != 0) {
@@ -1117,45 +1117,45 @@ EventView::setupActions()
{
EditViewBase::setupActions("eventlist.rc");
- QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
- QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert.png"));
+ TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
+ TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert.png"));
new KAction(i18n("&Insert Event"), icon, Key_I, this,
- SLOT(slotEditInsert()), actionCollection(),
+ TQT_SLOT(slotEditInsert()), actionCollection(),
"insert");
- QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png");
- icon = QIconSet(pixmap);
+ TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png");
+ icon = TQIconSet(pixmap);
new KAction(i18n("&Delete Event"), 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 Event"), icon, Key_E, this,
- SLOT(slotEditEvent()), actionCollection(),
+ TQT_SLOT(slotEditEvent()), actionCollection(),
"edit_simple");
pixmap.load(pixmapDir + "/toolbar/event-edit-advanced.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
new KAction(i18n("&Advanced Event Editor"), icon, Key_A, this,
- SLOT(slotEditEventAdvanced()), actionCollection(),
+ TQT_SLOT(slotEditEventAdvanced()), actionCollection(),
"edit_advanced");
- // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm"));
+ // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm"));
new KAction(i18n("&Filter Selection"), "filter", Key_F, this,
- SLOT(slotFilterSelection()), actionCollection(),
+ TQT_SLOT(slotFilterSelection()), actionCollection(),
"filter_selection");
new KAction(i18n("Select &All"), Key_A + CTRL, 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(EventViewConfigGroup);
@@ -1164,30 +1164,30 @@ EventView::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)
@@ -1211,8 +1211,8 @@ EventView::initStatusBar()
KStatusBar* sb = statusBar();
/*
- m_hoveredOverNoteName = new QLabel(sb);
- m_hoveredOverAbsoluteTime = new QLabel(sb);
+ m_hoveredOverNoteName = new TQLabel(sb);
+ m_hoveredOverAbsoluteTime = new TQLabel(sb);
m_hoveredOverNoteName->setMinimumWidth(32);
m_hoveredOverAbsoluteTime->setMinimumWidth(160);
@@ -1226,7 +1226,7 @@ EventView::initStatusBar()
sb->setItemAlignment(KTmpStatusMsg::getDefaultId(),
AlignLeft | AlignVCenter);
- //m_selectionCounter = new QLabel(sb);
+ //m_selectionCounter = new TQLabel(sb);
//sb->addWidget(m_selectionCounter);
}
@@ -1237,7 +1237,7 @@ EventView::getViewSize()
}
void
-EventView::setViewSize(QSize s)
+EventView::setViewSize(TQSize s)
{
m_eventList->setFixedSize(s);
}
@@ -1271,7 +1271,7 @@ EventView::getCurrentSegment()
void
EventView::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 ;
@@ -1468,7 +1468,7 @@ EventView::slotRawTime()
}
void
-EventView::slotPopupEventEditor(QListViewItem *item)
+EventView::slotPopupEventEditor(TQListViewItem *item)
{
EventViewItem *eItem = dynamic_cast<EventViewItem*>(item);
@@ -1479,7 +1479,7 @@ EventView::slotPopupEventEditor(QListViewItem *item)
SimpleEventEditDialog *dialog =
new SimpleEventEditDialog(this, getDocument(), *event, false);
- if (dialog->exec() == QDialog::Accepted && dialog->isModified()) {
+ if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) {
EventEditCommand *command =
new EventEditCommand(*(eItem->getSegment()),
event,
@@ -1492,7 +1492,7 @@ EventView::slotPopupEventEditor(QListViewItem *item)
}
void
-EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int)
+EventView::slotPopupMenu(TQListViewItem *item, const TQPoint &pos, int)
{
if (!item)
return ;
@@ -1505,7 +1505,7 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int)
createMenu();
if (m_menu)
- //m_menu->exec(QCursor::pos());
+ //m_menu->exec(TQCursor::pos());
m_menu->exec(pos);
else
RG_DEBUG << "EventView::showMenu() : no menu to show\n";
@@ -1514,12 +1514,12 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int)
void
EventView::createMenu()
{
- m_menu = new QPopupMenu(this);
+ m_menu = new TQPopupMenu(this);
m_menu->insertItem(i18n("Open in Event Editor"), 0);
m_menu->insertItem(i18n("Open in Expert Event Editor"), 1);
- connect(m_menu, SIGNAL(activated(int)),
- SLOT(slotMenuActivated(int)));
+ connect(m_menu, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotMenuActivated(int)));
}
void
@@ -1536,7 +1536,7 @@ EventView::slotMenuActivated(int value)
SimpleEventEditDialog *dialog =
new SimpleEventEditDialog(this, getDocument(), *event, false);
- if (dialog->exec() == QDialog::Accepted && dialog->isModified()) {
+ if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) {
EventEditCommand *command =
new EventEditCommand(*(eItem->getSegment()),
event,
@@ -1554,7 +1554,7 @@ EventView::slotMenuActivated(int value)
Event *event = eItem->getEvent();
EventEditDialog *dialog = new EventEditDialog(this, *event);
- if (dialog->exec() == QDialog::Accepted && dialog->isModified()) {
+ if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) {
EventEditCommand *command =
new EventEditCommand(*(eItem->getSegment()),
event,