diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/chanButtons.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/chanButtons.h')
-rw-r--r-- | ksirc/chanButtons.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/ksirc/chanButtons.h b/ksirc/chanButtons.h new file mode 100644 index 00000000..2b7edc3a --- /dev/null +++ b/ksirc/chanButtons.h @@ -0,0 +1,85 @@ +/* mode buttons for ksirc - Robbie Ward <[email protected]>*/ + +#ifndef CHANBUTTONS_H +#define CHANBUTTONS_H + +#include <qwidget.h> +#include <qpushbutton.h> +#include <kdialog.h> + +class QHBoxLayout; +class QVBoxLayout; +class KPopupMenu; +class chanbuttonsDialog; +class KIntSpinBox; +class QLineEdit; +class KSircProcess; +class KPushButton; + +class chanButtons : public QWidget +{ + Q_OBJECT + friend class KSircTopLevel; + public: + chanButtons(KSircProcess *proc, QWidget* parent=0, const char* name=0); + ~chanButtons() {}; + + void setProtectMode(bool value) { protectButton->setOn(value); } + void setModerateMode(bool value) { moderateButton->setOn(value); } + void setNooutsideMode(bool value) { outsideButton->setOn(value); } + void setButtonsEnabled(bool); + void setMenuItemMode(int, bool); + + signals: + void mode(QString, int, QString nick = QString::null); /// int == 0 channel mode, int == 1 user nick mode + + private slots: + void protectMode(); + void outsideMode(); + void moderateMode(); + void invite(); + void limited(); + void key(); + void secret(); + void invisible(); + void wallops(); + void serverNotices(); + + private: + int toggleMenu[7]; + QHBoxLayout *layout; + QPushButton *protectButton; + QPushButton *moderateButton; + QPushButton *outsideButton; + QPushButton *menuButton; + KPopupMenu *Popupmenu; + chanbuttonsDialog *chanDialog; + KSircProcess *m_proc; +}; + +class chanbuttonsDialog : public KDialog +{ + Q_OBJECT + friend class chanButtons; + public: + enum type { limited, key }; + chanbuttonsDialog(const type &modeType, QWidget *parent=0, const char *name=0, bool modal=true); + ~chanbuttonsDialog() {}; + + private slots: + void keyString(); + void limitedUsers(); + QString sendKey() { return m_sendKey; } + int sendLimitedUsers() { return m_sendLimitedUsers; }; + + private: + QString m_sendKey; + int m_sendLimitedUsers; + QVBoxLayout *LimitedLayout; + QHBoxLayout *Layout; + KIntSpinBox *SpinBox; + QLineEdit *EditBox; + KPushButton *okButton; + KPushButton *cancelButton; +}; +#endif |