diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /ksig/ksig.cpp | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksig/ksig.cpp')
-rw-r--r-- | ksig/ksig.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/ksig/ksig.cpp b/ksig/ksig.cpp index 4ac8e9c..422e985 100644 --- a/ksig/ksig.cpp +++ b/ksig/ksig.cpp @@ -36,7 +36,7 @@ // public methods //////////////////////////////////////////////////////////////////////////////// -KSig::KSig(TQWidget *parent, const char *name) : KMainWindow(parent, name), +KSig::KSig(TQWidget *tqparent, const char *name) : KMainWindow(tqparent, name), changed(false) { setupActions(); @@ -63,18 +63,18 @@ KSig::~KSig() void KSig::setupActions() { - KStdAction::openNew(this, TQT_SLOT(add()), actionCollection()); - new KAction(i18n("Remove"), "editdelete", 0, this, TQT_SLOT(remove()), actionCollection(), "remove"); - KStdAction::save(this, TQT_SLOT(save()), actionCollection()); - KStdAction::quit(this, TQT_SLOT(quit()), actionCollection()); - - KStdAction::cut(kapp, TQT_SLOT(cut()), actionCollection()); - KStdAction::copy(kapp, TQT_SLOT(copy()), actionCollection()); - KStdAction::paste(kapp, TQT_SLOT(paste()), actionCollection()); - new KAction(i18n("C&lear"), "editclear", 0, kapp, TQT_SLOT(clear()), actionCollection(), "clear"); - - new KAction(i18n("Edit Standard Header"), 0, 0, this, TQT_SLOT(editHeader()), actionCollection(), "editHeader"); - new KAction(i18n("Edit Standard Footer"), 0, 0, this, TQT_SLOT(editFooter()), actionCollection(), "editFooter"); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(add()), actionCollection()); + new KAction(i18n("Remove"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(remove()), actionCollection(), "remove"); + KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quit()), actionCollection()); + + KStdAction::cut(TQT_TQOBJECT(kapp), TQT_SLOT(cut()), actionCollection()); + KStdAction::copy(TQT_TQOBJECT(kapp), TQT_SLOT(copy()), actionCollection()); + KStdAction::paste(TQT_TQOBJECT(kapp), TQT_SLOT(paste()), actionCollection()); + new KAction(i18n("C&lear"), "editclear", 0, TQT_TQOBJECT(kapp), TQT_SLOT(clear()), actionCollection(), "clear"); + + new KAction(i18n("Edit Standard Header"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(editHeader()), actionCollection(), "editHeader"); + new KAction(i18n("Edit Standard Footer"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(editFooter()), actionCollection(), "editFooter"); } void KSig::setupLayout() @@ -86,19 +86,19 @@ void KSig::setupLayout() sigList = SigListView::instance(splitter, "sigList"); sigEdit = new KTextEdit(splitter, "sigEdit"); - sigEdit->setTextFormat(Qt::PlainText); + sigEdit->setTextFormat(TQt::PlainText); sigEdit->setFont(KGlobalSettings::fixedFont()); sigEdit->setEnabled(false); sigEdit->setCheckSpellingEnabled(true); - statusBar()->insertItem(i18n(" Line: %1 ").arg(0), LineNumber, 0, true); - statusBar()->insertItem(i18n(" Col: %1 ").arg(0), ColumnNumber, 0, true); + statusBar()->insertItem(i18n(" Line: %1 ").tqarg(0), LineNumber, 0, true); + statusBar()->insertItem(i18n(" Col: %1 ").tqarg(0), ColumnNumber, 0, true); statusBar()->show(); updateListLock = false; - connect(sigEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(updateList())); - connect(sigList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateEdit())); - connect(sigEdit, TQT_SIGNAL(cursorPositionChanged(int,int)), this, TQT_SLOT(updateStatus(int,int))); + connect(sigEdit, TQT_SIGNAL(textChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateList())); + connect(sigList, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateEdit())); + connect(sigEdit, TQT_SIGNAL(cursorPositionChanged(int,int)), TQT_TQOBJECT(this), TQT_SLOT(updatetqStatus(int,int))); } void KSig::setupSearchLine() @@ -167,7 +167,7 @@ void KSig::writeConfig() bool KSig::queryClose() { if(changed) { - int saveChanges = KMessageBox::questionYesNoCancel(this, i18n("Do you want to save your changes before exiting?"),TQString::null,KStdGuiItem::save(),KStdGuiItem::discard()); + int saveChanges = KMessageBox::questionYesNoCancel(this, i18n("Do you want to save your changes before exiting?"),TQString(),KStdGuiItem::save(),KStdGuiItem::discard()); if(saveChanges == KMessageBox::Cancel) return(false); else if(saveChanges == KMessageBox::Yes) @@ -211,9 +211,9 @@ void KSig::setDataChanged(bool value) changed = value; if(changed) - setCaption(kapp->makeStdCaption(TQString::null, true, true)); + setCaption(kapp->makeStdCaption(TQString(), true, true)); else - setCaption(kapp->makeStdCaption(TQString::null, true, false)); + setCaption(kapp->makeStdCaption(TQString(), true, false)); } void KSig::editHeader() @@ -222,7 +222,7 @@ void KSig::editHeader() t->setLabel(i18n("Standard signature header:")); t->setText(header); - connect(t, TQT_SIGNAL(textUpdated(const TQString &)), this, TQT_SLOT(setHeader(const TQString &))); + connect(t, TQT_SIGNAL(textUpdated(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(setHeader(const TQString &))); t->exec(); } @@ -233,7 +233,7 @@ void KSig::editFooter() t->setLabel(i18n("Standard signature footer:")); t->setText(footer); - connect(t, TQT_SIGNAL(textUpdated(const TQString &)), this, TQT_SLOT(setFooter(const TQString &))); + connect(t, TQT_SIGNAL(textUpdated(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(setFooter(const TQString &))); t->exec(); } @@ -259,10 +259,10 @@ void KSig::updateEdit() updateListLock = false; } -void KSig::updateStatus(int line, int column) +void KSig::updatetqStatus(int line, int column) { - statusBar()->changeItem(i18n(" Line: %1 ").arg(line + 1), LineNumber); - statusBar()->changeItem(i18n(" Col: %1 ").arg(column + 1), ColumnNumber); + statusBar()->changeItem(i18n(" Line: %1 ").tqarg(line + 1), LineNumber); + statusBar()->changeItem(i18n(" Col: %1 ").tqarg(column + 1), ColumnNumber); } void KSig::quit() |