summaryrefslogtreecommitdiffstats
path: root/ksirc/chanButtons.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/chanButtons.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/chanButtons.cpp')
-rw-r--r--ksirc/chanButtons.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/ksirc/chanButtons.cpp b/ksirc/chanButtons.cpp
index f40c7176..b6974fd5 100644
--- a/ksirc/chanButtons.cpp
+++ b/ksirc/chanButtons.cpp
@@ -9,65 +9,65 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
#include "ksircprocess.h"
-static void makeSquare(QWidget *w)
+static void makeSquare(TQWidget *w)
{
- QSize sh = w->sizeHint();
+ TQSize sh = w->sizeHint();
int s = sh.height();
w->setFixedSize(s,s);
}
-chanButtons::chanButtons(KSircProcess *proc, QWidget *parent, const char *name)
-: QWidget(parent, name),
+chanButtons::chanButtons(KSircProcess *proc, TQWidget *parent, const char *name)
+: TQWidget(parent, name),
m_proc(proc)
{
Popupmenu = new KPopupMenu( this );
Popupmenu->insertTitle(i18n("Channel Modes"));
- toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, SLOT(invite()));
- toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, SLOT(limited()));
- toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, SLOT(key()));
- toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, SLOT(secret()));
+ toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, TQT_SLOT(invite()));
+ toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, TQT_SLOT(limited()));
+ toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, TQT_SLOT(key()));
+ toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, TQT_SLOT(secret()));
Popupmenu->insertSeparator();
Popupmenu->insertTitle(i18n("User Modes"));
- toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, SLOT(invisible()));
- toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, SLOT(wallops()));
- toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, SLOT(serverNotices()));
+ toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, TQT_SLOT(invisible()));
+ 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 QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
- protectButton = new QPushButton(i18n("T"), this);
+ protectButton = new TQPushButton(i18n("T"), this);
protectButton->setToggleButton(true);
makeSquare(protectButton);
- QToolTip::add(protectButton, i18n("Only op'ed users can change the topic"));
- connect(protectButton, SIGNAL(clicked()), this, SLOT(protectMode()));
+ TQToolTip::add(protectButton, i18n("Only op'ed users can change the topic"));
+ connect(protectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(protectMode()));
layout->addWidget(protectButton);
- outsideButton = new QPushButton(i18n("N"), this);
+ outsideButton = new TQPushButton(i18n("N"), this);
outsideButton->setToggleButton(true);
makeSquare(outsideButton);
- QToolTip::add(outsideButton, i18n("No outside messages"));
- connect(outsideButton, SIGNAL(clicked()), this, SLOT(outsideMode()));
+ TQToolTip::add(outsideButton, i18n("No outside messages"));
+ connect(outsideButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(outsideMode()));
layout->addWidget(outsideButton);
- moderateButton = new QPushButton(i18n("M"), this);
+ moderateButton = new TQPushButton(i18n("M"), this);
moderateButton->setToggleButton(true);
makeSquare(moderateButton);
- QToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak"));
- connect(moderateButton, SIGNAL(clicked()), this, SLOT(moderateMode()));
+ 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);
- menuButton = new QPushButton(i18n("..."), this);
+ menuButton = new TQPushButton(i18n("..."), this);
makeSquare(menuButton);
menuButton->setFixedWidth(menuButton->width()*2);
menuButton->setPopup(Popupmenu);
- QToolTip::add(menuButton, i18n("More mode commands"));
+ TQToolTip::add(menuButton, i18n("More mode commands"));
layout->addWidget(menuButton);
}
@@ -75,11 +75,11 @@ void chanButtons::invite()
{
if (Popupmenu->isItemChecked(toggleMenu[0])) {
Popupmenu->setItemChecked(toggleMenu[0], false);
- emit mode(QString("-i"), 0);
+ emit mode(TQString("-i"), 0);
}
else {
Popupmenu->setItemChecked(toggleMenu[0], true);
- emit mode(QString("+i"), 0);
+ emit mode(TQString("+i"), 0);
}
}
@@ -89,11 +89,11 @@ void chanButtons::limited()
chanDialog->exec();
if (chanDialog->sendLimitedUsers() == 0) {
Popupmenu->setItemChecked(toggleMenu[1], false);
- emit mode(QString("-l"), 0);
+ emit mode(TQString("-l"), 0);
}
else {
Popupmenu->setItemChecked(toggleMenu[1], true);
- emit mode(QString("+l %1").arg(chanDialog->sendLimitedUsers()), 0);
+ emit mode(TQString("+l %1").arg(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(QString("-k %1").arg(chanDialog->sendKey()), 0);
+ emit mode(TQString("-k %1").arg(chanDialog->sendKey()), 0);
}
else {
chanDialog->exec();
Popupmenu->setItemChecked(toggleMenu[2], true);
- emit mode(QString("+k %1").arg(chanDialog->sendKey()), 0);
+ emit mode(TQString("+k %1").arg(chanDialog->sendKey()), 0);
}
delete chanDialog;
}
@@ -118,11 +118,11 @@ void chanButtons::secret()
{
if (Popupmenu->isItemChecked(toggleMenu[3])) {
Popupmenu->setItemChecked(toggleMenu[3], false);
- emit mode(QString("-s"), 0);
+ emit mode(TQString("-s"), 0);
}
else {
Popupmenu->setItemChecked(toggleMenu[3], true);
- emit mode(QString("+s"), 0);
+ emit mode(TQString("+s"), 0);
}
}
@@ -130,11 +130,11 @@ void chanButtons::invisible()
{
if (Popupmenu->isItemChecked(toggleMenu[4])) {
Popupmenu->setItemChecked(toggleMenu[4], false);
- emit mode(QString("-i"), 1, m_proc->getNick());
+ emit mode(TQString("-i"), 1, m_proc->getNick());
}
else {
Popupmenu->setItemChecked(toggleMenu[4], true);
- emit mode(QString("+i"), 1, m_proc->getNick());
+ emit mode(TQString("+i"), 1, m_proc->getNick());
}
}
@@ -142,11 +142,11 @@ void chanButtons::wallops()
{
if (Popupmenu->isItemChecked(toggleMenu[5])) {
Popupmenu->setItemChecked(toggleMenu[5], false);
- emit mode(QString("-w"), 1, m_proc->getNick());
+ emit mode(TQString("-w"), 1, m_proc->getNick());
}
else {
Popupmenu->setItemChecked(toggleMenu[5], true);
- emit mode(QString("+w"), 1, m_proc->getNick());
+ emit mode(TQString("+w"), 1, m_proc->getNick());
}
}
@@ -154,36 +154,36 @@ void chanButtons::serverNotices()
{
if (Popupmenu->isItemChecked(toggleMenu[6])) {
Popupmenu->setItemChecked(toggleMenu[6], false);
- emit mode(QString("-s"), 1, m_proc->getNick());
+ emit mode(TQString("-s"), 1, m_proc->getNick());
}
else {
Popupmenu->setItemChecked(toggleMenu[6], true);
- emit mode(QString("+s"), 1, m_proc->getNick());
+ emit mode(TQString("+s"), 1, m_proc->getNick());
}
}
void chanButtons::protectMode()
{
if (protectButton->isOn())
- emit mode(QString("+t"), 0);
+ emit mode(TQString("+t"), 0);
else
- emit mode(QString("-t"), 0);
+ emit mode(TQString("-t"), 0);
}
void chanButtons::outsideMode()
{
if (outsideButton->isOn())
- emit mode(QString("+n"), 0);
+ emit mode(TQString("+n"), 0);
else
- emit mode(QString("-n"), 0);
+ emit mode(TQString("-n"), 0);
}
void chanButtons::moderateMode()
{
if (moderateButton->isOn())
- emit mode(QString("+m"), 0);
+ emit mode(TQString("+m"), 0);
else
- emit mode(QString("-m"), 0);
+ emit mode(TQString("-m"), 0);
}
void chanButtons::setButtonsEnabled(bool enabled)
@@ -203,14 +203,14 @@ void chanButtons::setMenuItemMode(int id, bool value)
Popupmenu->setItemChecked(toggleMenu[id], value);
}
-chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent,
+chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent,
const char *name, bool modal) : KDialog(parent, name, modal)
{
m_sendKey = "";
m_sendLimitedUsers = 0;
resize(190, 82);
setCaption(i18n("Limit Number of Users"));
- LimitedLayout = new QVBoxLayout(this);
+ LimitedLayout = new TQVBoxLayout(this);
LimitedLayout->setSpacing(9);
LimitedLayout->setMargin(11);
@@ -220,7 +220,7 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent,
LimitedLayout->addWidget(SpinBox);
break;
case key:
- EditBox = new QLineEdit(this);
+ EditBox = new TQLineEdit(this);
LimitedLayout->addWidget(EditBox);
break;
}
@@ -230,28 +230,28 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent,
Layout->setMargin(0);
okButton = new KPushButton(KStdGuiItem::ok(), this);
- okButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1,
+ okButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1,
okButton->sizePolicy().hasHeightForWidth()));
Layout->addWidget(okButton);
switch (modeType) {
case limited:
- connect(okButton, SIGNAL(clicked()), SLOT(limitedUsers()));
+ connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(limitedUsers()));
break;
case key:
- connect(okButton, SIGNAL(clicked()), SLOT(keyString()));
+ connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(keyString()));
break;
}
Layout->addWidget(okButton);
cancelButton = new KPushButton(KStdGuiItem::cancel(), this);
- cancelButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1,
+ cancelButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1,
cancelButton->sizePolicy().hasHeightForWidth()));
Layout->addWidget(cancelButton);
- connect(cancelButton, SIGNAL(clicked()), SLOT(reject()));
+ connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
LimitedLayout->addLayout(Layout);
- QSpacerItem *spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
LimitedLayout->addItem(spacer);
}