diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/templatemanagementdialog.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/templatemanagementdialog.cpp')
-rw-r--r-- | korganizer/templatemanagementdialog.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/korganizer/templatemanagementdialog.cpp b/korganizer/templatemanagementdialog.cpp index 5d31f7fb1..18c82214d 100644 --- a/korganizer/templatemanagementdialog.cpp +++ b/korganizer/templatemanagementdialog.cpp @@ -37,30 +37,30 @@ *******************************************************************************/ #include "templatemanagementdialog.h" -#include <qstringlist.h> -#include <qtimer.h> +#include <tqstringlist.h> +#include <tqtimer.h> #include <kpushbutton.h> #include <kinputdialog.h> #include <klocale.h> #include <kmessagebox.h> -TemplateManagementDialog::TemplateManagementDialog(QWidget *parent, const QStringList &templates ) +TemplateManagementDialog::TemplateManagementDialog(TQWidget *parent, const TQStringList &templates ) :KDialogBase( parent, "template_management_dialog", true, i18n("Manage Templates"), Ok|Cancel, Ok, true , i18n("Apply Template")), - m_templates( templates ), m_newTemplate( QString::null ), m_changed( false ) + m_templates( templates ), m_newTemplate( TQString::null ), m_changed( false ) { m_base = new TemplateManagementDialog_base( this, "template_management_dialog_base" ); setMainWidget( m_base ); - connect( m_base->m_buttonAdd, SIGNAL( clicked() ), - SLOT( slotAddTemplate() ) ); - connect( m_base->m_buttonDelete, SIGNAL( clicked() ), - SLOT( slotDeleteTemplate() ) ); + connect( m_base->m_buttonAdd, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotAddTemplate() ) ); + connect( m_base->m_buttonDelete, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotDeleteTemplate() ) ); m_base->m_listBox->insertStringList( m_templates ); - connect( m_base->m_listBox, SIGNAL( selectionChanged( QListBoxItem * ) ), - SLOT( slotUpdateDeleteButton( QListBoxItem * ) ) ); - connect( m_base->m_buttonApply, SIGNAL( clicked() ), - SLOT( slotApplyTemplate() ) ); + connect( m_base->m_listBox, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), + TQT_SLOT( slotUpdateDeleteButton( TQListBoxItem * ) ) ); + connect( m_base->m_buttonApply, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotApplyTemplate() ) ); } @@ -68,14 +68,14 @@ void TemplateManagementDialog::slotAddTemplate() { bool ok; bool duplicate = false; - const QString newTemplate = KInputDialog::getText( i18n("Template Name"), + const TQString newTemplate = KInputDialog::getText( i18n("Template Name"), i18n("Please enter a name for the new template:"), i18n("New Template"), &ok ); if ( newTemplate.isEmpty() || !ok ) return; if ( m_templates.find( newTemplate) != m_templates.end() ) { int rc = KMessageBox::warningContinueCancel( this, i18n("A template with that name already exists, do you want to overwrite it?."), i18n("Duplicate Template Name"), i18n("Overwrite")); if ( rc == KMessageBox::Cancel ) { - QTimer::singleShot(0, this, SLOT( slotAddTemplate() ) ); + TQTimer::singleShot(0, this, TQT_SLOT( slotAddTemplate() ) ); return; } duplicate = true; @@ -96,7 +96,7 @@ void TemplateManagementDialog::slotAddTemplate() void TemplateManagementDialog::slotDeleteTemplate() { - QListBoxItem *const item = m_base->m_listBox->selectedItem(); + TQListBoxItem *const item = m_base->m_listBox->selectedItem(); if ( !item ) return; // can't happen (TM) unsigned int current = m_base->m_listBox->index(item); m_templates.remove( item->text() ); @@ -105,7 +105,7 @@ void TemplateManagementDialog::slotDeleteTemplate() m_base->m_listBox->setSelected(QMAX(current -1, 0), true); } -void TemplateManagementDialog::slotUpdateDeleteButton( QListBoxItem *item ) +void TemplateManagementDialog::slotUpdateDeleteButton( TQListBoxItem *item ) { m_base->m_buttonDelete->setEnabled( item != 0 ); } @@ -114,7 +114,7 @@ void TemplateManagementDialog::slotApplyTemplate() { // Once the user has applied the current template to the event, it makes no sense to add it again m_base->m_buttonAdd->setEnabled( false ); - const QString &cur = m_base->m_listBox->currentText(); + const TQString &cur = m_base->m_listBox->currentText(); if ( !cur.isEmpty() && cur != m_newTemplate ) emit loadTemplate( cur ); } |