diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /ksirc/chanButtons.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/chanButtons.cpp')
-rw-r--r-- | ksirc/chanButtons.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ksirc/chanButtons.cpp b/ksirc/chanButtons.cpp index 5aafba1c..fecfc068 100644 --- a/ksirc/chanButtons.cpp +++ b/ksirc/chanButtons.cpp @@ -17,13 +17,13 @@ static void makeSquare(TQWidget *w) { - TQSize sh = w->sizeHint(); + TQSize sh = w->tqsizeHint(); int s = sh.height(); w->setFixedSize(s,s); } -chanButtons::chanButtons(KSircProcess *proc, TQWidget *parent, const char *name) -: TQWidget(parent, name), +chanButtons::chanButtons(KSircProcess *proc, TQWidget *tqparent, const char *name) +: TQWidget(tqparent, name), m_proc(proc) { Popupmenu = new KPopupMenu( this ); @@ -38,37 +38,37 @@ chanButtons::chanButtons(KSircProcess *proc, TQWidget *parent, const char *name) toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, TQT_SLOT(wallops())); toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, TQT_SLOT(serverNotices())); - layout = new TQHBoxLayout(this); - layout->setSpacing(0); - layout->setMargin(0); + tqlayout = new TQHBoxLayout(this); + tqlayout->setSpacing(0); + tqlayout->setMargin(0); protectButton = new TQPushButton(i18n("T"), this); protectButton->setToggleButton(true); makeSquare(protectButton); TQToolTip::add(protectButton, i18n("Only op'ed users can change the topic")); connect(protectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(protectMode())); - layout->addWidget(protectButton); + tqlayout->addWidget(protectButton); outsideButton = new TQPushButton(i18n("N"), this); outsideButton->setToggleButton(true); makeSquare(outsideButton); TQToolTip::add(outsideButton, i18n("No outside messages")); connect(outsideButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(outsideMode())); - layout->addWidget(outsideButton); + tqlayout->addWidget(outsideButton); moderateButton = new TQPushButton(i18n("M"), this); moderateButton->setToggleButton(true); makeSquare(moderateButton); TQToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak")); connect(moderateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(moderateMode())); - layout->addWidget(moderateButton); + tqlayout->addWidget(moderateButton); menuButton = new TQPushButton(i18n("..."), this); makeSquare(menuButton); menuButton->setFixedWidth(menuButton->width()*2); menuButton->setPopup(Popupmenu); TQToolTip::add(menuButton, i18n("More mode commands")); - layout->addWidget(menuButton); + tqlayout->addWidget(menuButton); } void chanButtons::invite() @@ -93,7 +93,7 @@ void chanButtons::limited() } else { Popupmenu->setItemChecked(toggleMenu[1], true); - emit mode(TQString("+l %1").arg(chanDialog->sendLimitedUsers()), 0); + emit mode(TQString("+l %1").tqarg(chanDialog->sendLimitedUsers()), 0); } delete chanDialog; } @@ -104,12 +104,12 @@ void chanButtons::key() if (Popupmenu->isItemChecked(toggleMenu[2])) { chanDialog->exec(); Popupmenu->setItemChecked(toggleMenu[2], false); - emit mode(TQString("-k %1").arg(chanDialog->sendKey()), 0); + emit mode(TQString("-k %1").tqarg(chanDialog->sendKey()), 0); } else { chanDialog->exec(); Popupmenu->setItemChecked(toggleMenu[2], true); - emit mode(TQString("+k %1").arg(chanDialog->sendKey()), 0); + emit mode(TQString("+k %1").tqarg(chanDialog->sendKey()), 0); } delete chanDialog; } @@ -203,8 +203,8 @@ void chanButtons::setMenuItemMode(int id, bool value) Popupmenu->setItemChecked(toggleMenu[id], value); } -chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent, - const char *name, bool modal) : KDialog(parent, name, modal) +chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *tqparent, + const char *name, bool modal) : KDialog(tqparent, name, modal) { m_sendKey = ""; m_sendLimitedUsers = 0; @@ -230,7 +230,7 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent, Layout->setMargin(0); okButton = new KPushButton(KStdGuiItem::ok(), this); - okButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, + okButton->tqsetSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, okButton->sizePolicy().hasHeightForWidth())); Layout->addWidget(okButton); switch (modeType) { @@ -245,7 +245,7 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent, Layout->addWidget(okButton); cancelButton = new KPushButton(KStdGuiItem::cancel(), this); - cancelButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, + cancelButton->tqsetSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, cancelButton->sizePolicy().hasHeightForWidth())); Layout->addWidget(cancelButton); connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); |