diff options
Diffstat (limited to 'kalarm/templatedlg.cpp')
-rw-r--r-- | kalarm/templatedlg.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/kalarm/templatedlg.cpp b/kalarm/templatedlg.cpp index 917c1ea9f..f586f2e7b 100644 --- a/kalarm/templatedlg.cpp +++ b/kalarm/templatedlg.cpp @@ -20,9 +20,9 @@ #include "kalarm.h" -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kguiitem.h> @@ -43,51 +43,51 @@ static const char TMPL_DIALOG_NAME[] = "TemplateDialog"; TemplateDlg* TemplateDlg::mInstance = 0; -TemplateDlg::TemplateDlg(QWidget* parent, const char* name) +TemplateDlg::TemplateDlg(TQWidget* parent, const char* name) : KDialogBase(KDialogBase::Plain, i18n("Alarm Templates"), Close, Ok, parent, name, false, true) { - QWidget* topWidget = plainPage(); - QBoxLayout* topLayout = new QHBoxLayout(topWidget); + TQWidget* topWidget = plainPage(); + TQBoxLayout* topLayout = new TQHBoxLayout(topWidget); topLayout->setSpacing(spacingHint()); - QBoxLayout* layout = new QVBoxLayout(topLayout); + TQBoxLayout* layout = new TQVBoxLayout(topLayout); mTemplateList = new TemplateListView(true, i18n("The list of alarm templates"), topWidget); - mTemplateList->setSelectionMode(QListView::Extended); - mTemplateList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); - connect(mTemplateList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); + mTemplateList->setSelectionMode(TQListView::Extended); + mTemplateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + connect(mTemplateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged())); layout->addWidget(mTemplateList); - layout = new QVBoxLayout(topLayout); - QPushButton* button = new QPushButton(i18n("&New..."), topWidget); - connect(button, SIGNAL(clicked()), SLOT(slotNew())); - QWhatsThis::add(button, i18n("Create a new alarm template")); + layout = new TQVBoxLayout(topLayout); + TQPushButton* button = new TQPushButton(i18n("&New..."), topWidget); + connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotNew())); + TQWhatsThis::add(button, i18n("Create a new alarm template")); layout->addWidget(button); - mEditButton = new QPushButton(i18n("&Edit..."), topWidget); - connect(mEditButton, SIGNAL(clicked()), SLOT(slotEdit())); - QWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template")); + mEditButton = new TQPushButton(i18n("&Edit..."), topWidget); + connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit())); + TQWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template")); layout->addWidget(mEditButton); - mCopyButton = new QPushButton(i18n("Co&py"), topWidget); - connect(mCopyButton, SIGNAL(clicked()), SLOT(slotCopy())); - QWhatsThis::add(mCopyButton, + mCopyButton = new TQPushButton(i18n("Co&py"), topWidget); + connect(mCopyButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotCopy())); + TQWhatsThis::add(mCopyButton, i18n("Create a new alarm template based on a copy of the currently highlighted template")); layout->addWidget(mCopyButton); - mDeleteButton = new QPushButton(i18n("&Delete"), topWidget); - connect(mDeleteButton, SIGNAL(clicked()), SLOT(slotDelete())); - QWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template")); + mDeleteButton = new TQPushButton(i18n("&Delete"), topWidget); + connect(mDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelete())); + TQWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template")); layout->addWidget(mDeleteButton); KAccel* accel = new KAccel(this); - accel->insert(KStdAccel::SelectAll, mTemplateList, SLOT(slotSelectAll())); - accel->insert(KStdAccel::Deselect, mTemplateList, SLOT(slotDeselect())); + accel->insert(KStdAccel::SelectAll, mTemplateList, TQT_SLOT(slotSelectAll())); + accel->insert(KStdAccel::Deselect, mTemplateList, TQT_SLOT(slotDeselect())); accel->readSettings(); mTemplateList->refresh(); slotSelectionChanged(); // enable/disable buttons as appropriate - QSize s; + TQSize s; if (KAlarm::readConfigWindowSize(TMPL_DIALOG_NAME, s)) resize(s); } @@ -103,7 +103,7 @@ TemplateDlg::~TemplateDlg() /****************************************************************************** * Create an instance, if none already exists. */ -TemplateDlg* TemplateDlg::create(QWidget* parent, const char* name) +TemplateDlg* TemplateDlg::create(TQWidget* parent, const char* name) { if (mInstance) return 0; @@ -138,10 +138,10 @@ void TemplateDlg::slotCopy() * Create a new template. * If 'event' is non-zero, base the new template on an existing event or template. */ -void TemplateDlg::createTemplate(const KAEvent* event, QWidget* parent, TemplateListView* view) +void TemplateDlg::createTemplate(const KAEvent* event, TQWidget* parent, TemplateListView* view) { EditAlarmDlg editDlg(true, i18n("New Alarm Template"), parent, 0, event); - if (editDlg.exec() == QDialog::Accepted) + if (editDlg.exec() == TQDialog::Accepted) { KAEvent event; editDlg.getEvent(event); @@ -163,11 +163,11 @@ void TemplateDlg::slotEdit() { KAEvent event = item->event(); EditAlarmDlg editDlg(true, i18n("Edit Alarm Template"), this, 0, &event); - if (editDlg.exec() == QDialog::Accepted) + if (editDlg.exec() == TQDialog::Accepted) { KAEvent newEvent; editDlg.getEvent(newEvent); - QString id = event.id(); + TQString id = event.id(); newEvent.setEventID(id); // Update the event in the displays and in the calendar file @@ -183,7 +183,7 @@ void TemplateDlg::slotEdit() */ void TemplateDlg::slotDelete() { - QValueList<EventListViewItemBase*> items = mTemplateList->selectedItems(); + TQValueList<EventListViewItemBase*> items = mTemplateList->selectedItems(); int n = items.count(); if (KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete the selected alarm template?", "Do you really want to delete the %n selected alarm templates?", n), @@ -193,9 +193,9 @@ void TemplateDlg::slotDelete() int warnErr = 0; KAlarm::UpdateStatus status = KAlarm::UPDATE_OK; - QValueList<KAEvent> events; + TQValueList<KAEvent> events; AlarmCalendar::templateCalendar()->startUpdate(); // prevent multiple saves of the calendar until we're finished - for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) + for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) { TemplateListViewItem* item = (TemplateListViewItem*)(*it); events.append(item->event()); @@ -233,7 +233,7 @@ void TemplateDlg::slotSelectionChanged() * Called when the dialog's size has changed. * Records the new size in the config file. */ -void TemplateDlg::resizeEvent(QResizeEvent* re) +void TemplateDlg::resizeEvent(TQResizeEvent* re) { if (isVisible()) KAlarm::writeConfigWindowSize(TMPL_DIALOG_NAME, re->size()); |