summaryrefslogtreecommitdiffstats
path: root/konversation/src/channeloptionsdialog.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-19 18:29:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-19 18:29:46 +0000
commitee0d2e6e1967294f4a62da1840b0ffdaa3124a2d (patch)
tree5c150db3c91a190b4911f19aeec9b1b2163c0c53 /konversation/src/channeloptionsdialog.h
downloadkonversation-ee0d2e6e1967294f4a62da1840b0ffdaa3124a2d.tar.gz
konversation-ee0d2e6e1967294f4a62da1840b0ffdaa3124a2d.zip
Added old abandoned KDE3 version of Konversation
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/konversation@1092922 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konversation/src/channeloptionsdialog.h')
-rw-r--r--konversation/src/channeloptionsdialog.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/konversation/src/channeloptionsdialog.h b/konversation/src/channeloptionsdialog.h
new file mode 100644
index 0000000..b947fee
--- /dev/null
+++ b/konversation/src/channeloptionsdialog.h
@@ -0,0 +1,102 @@
+/*
+ This program is free software; you can redistribute it and/or modifydvancedModes
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+*/
+
+/*
+ copyright: (C) 2004 by Peter Simonsson
+ email: psn@linux.se
+*/
+#ifndef KONVERSATIONCHANNELOPTIONSDIALOG_H
+#define KONVERSATIONCHANNELOPTIONSDIALOG_H
+
+#include "channel.h"
+
+#include <qstringlist.h>
+
+#include <kdialogbase.h>
+#include <klistview.h>
+
+
+namespace Konversation
+{
+ class ChannelOptionsUI;
+
+ class ChannelOptionsDialog : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ explicit ChannelOptionsDialog(Channel *channel);
+ ~ChannelOptionsDialog();
+
+ QString topic();
+ QStringList modes();
+
+
+ public slots:
+ void refreshTopicHistory();
+ void refreshAllowedChannelModes();
+ void refreshModes();
+ void refreshEnableModes();
+ void toggleAdvancedModes();
+
+ void refreshBanList();
+ void addBan(const QString& newban);
+ void addBanClicked();
+ void removeBan(const QString& ban);
+ void removeBanClicked();
+ void banEdited(QListViewItem *edited);
+
+ void changeOptions();
+
+
+ protected slots:
+ void topicHistoryItemClicked(QListViewItem* item);
+ void topicBeingEdited(bool state);
+
+ void cancelClicked();
+ void okClicked();
+
+
+ protected:
+ bool m_editingTopic;
+ QListViewItem *m_NewBan;
+
+
+ private:
+ ChannelOptionsUI* m_widget;
+ Channel *m_channel;
+ };
+
+
+ // This is needed to overcome two deficiencies in KListViewItem
+ // First there is no signal emitted when a rename is canceled
+ // Second there is no way to get the old value of an item after a rename
+ class BanListViewItem : public KListViewItem
+ {
+ public:
+ explicit BanListViewItem( QListView *parent );
+ BanListViewItem(QListView *parent, bool isNew);
+ BanListViewItem(QListView *parent, const QString& label1, const QString& label2 = QString(), uint timestamp = 0);
+ BanListViewItem (QListView *parent, bool isNew, const QString& label1, const QString& label2 = QString(), uint timestamp = 0);
+
+ QString getOldValue() { return m_oldValue; }
+ QDateTime timestamp() { return m_timestamp; }
+
+ virtual QString text(int column) const;
+ virtual int compare(QListViewItem *i, int col, bool ascending) const;
+ virtual void startRename(int col);
+
+
+ protected:
+ virtual void cancelRename(int col);
+
+ QString m_oldValue;
+ bool m_isNewBan;
+ QDateTime m_timestamp;
+ };
+
+}
+#endif