diff options
| author | 2016-04-29 23:57:30 +0100 | |
|---|---|---|
| committer | 2016-04-29 23:57:48 +0100 | |
| commit | 690dd7a33ddc90678367d73adf313533536e10f2 (patch) | |
| tree | 2276fe7c384ebbc222b40a19c536d5c3c5606ce8 /src/modules/list/ListWindow.h | |
| parent | Add config for clang-format. (diff) | |
| download | KVIrc-690dd7a33ddc90678367d73adf313533536e10f2.tar.gz KVIrc-690dd7a33ddc90678367d73adf313533536e10f2.tar.bz2 KVIrc-690dd7a33ddc90678367d73adf313533536e10f2.zip | |
Apply clang-format
Diffstat (limited to 'src/modules/list/ListWindow.h')
| -rw-r--r-- | src/modules/list/ListWindow.h | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/src/modules/list/ListWindow.h b/src/modules/list/ListWindow.h index 963adb285..08c8811b0 100644 --- a/src/modules/list/ListWindow.h +++ b/src/modules/list/ListWindow.h @@ -46,8 +46,8 @@ class ChannelTreeWidgetItemDelegate : public QItemDelegate public: ChannelTreeWidgetItemDelegate(QTreeWidget * pWidget = 0); ~ChannelTreeWidgetItemDelegate(); - void paint(QPainter * pPainter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; - QSize sizeHint(const QStyleOptionViewItem &option,const QModelIndex &index) const; + void paint(QPainter * pPainter, const QStyleOptionViewItem & option, const QModelIndex & index) const; + QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; }; class ChannelTreeWidgetItemData @@ -55,9 +55,11 @@ class ChannelTreeWidgetItemData friend class ChannelTreeWidgetItem; friend class ListWindow; friend class ChannelTreeWidgetItemDelegate; + public: ChannelTreeWidgetItemData(const QString & szChan, const QString & szUsers, const QString & szTopic); ~ChannelTreeWidgetItemData(); + protected: QString m_szChan; QString m_szUsers; @@ -68,25 +70,28 @@ protected: class ChannelTreeWidgetItem : public QTreeWidgetItem { friend class ListWindow; + public: ChannelTreeWidgetItem(ChannelTreeWidgetItemData * pData); ~ChannelTreeWidgetItem(); + private: ChannelTreeWidgetItemData * m_pData; + public: bool operator<(const QTreeWidgetItem & other) const; inline ChannelTreeWidgetItemData * itemData() { return m_pData; }; }; -class ChannelTreeWidget: public KviThemedTreeWidget +class ChannelTreeWidget : public KviThemedTreeWidget { friend class ChannelTreeWidgetItem; friend class ChannelTreeWidgetItemData; Q_OBJECT public: - ChannelTreeWidget(QWidget * par, KviWindow * pWindow, const char * name) : KviThemedTreeWidget(par, pWindow, name) {}; - ~ChannelTreeWidget() {}; - ChannelTreeWidgetItem* itemFromIndex(const QModelIndex & index) const { return (ChannelTreeWidgetItem*) KviThemedTreeWidget::itemFromIndex(index); }; + ChannelTreeWidget(QWidget * par, KviWindow * pWindow, const char * name) : KviThemedTreeWidget(par, pWindow, name){}; + ~ChannelTreeWidget(){}; + ChannelTreeWidgetItem * itemFromIndex(const QModelIndex & index) const { return (ChannelTreeWidgetItem *)KviThemedTreeWidget::itemFromIndex(index); }; }; class ListWindow : public KviWindow, public KviExternalServerDataParser @@ -95,23 +100,26 @@ class ListWindow : public KviWindow, public KviExternalServerDataParser public: ListWindow(KviConsoleWindow * lpConsole); ~ListWindow(); + protected: - QSplitter * m_pVertSplitter; - QSplitter * m_pTopSplitter; - ChannelTreeWidget * m_pTreeWidget; - KviThemedLineEdit * m_pParamsEdit; - QToolButton * m_pRequestButton; - QToolButton * m_pStopListDownloadButton; - QToolButton * m_pOpenButton; - QToolButton * m_pSaveButton; - KviThemedLabel * m_pInfoLabel; - QTimer * m_pFlushTimer; + QSplitter * m_pVertSplitter; + QSplitter * m_pTopSplitter; + ChannelTreeWidget * m_pTreeWidget; + KviThemedLineEdit * m_pParamsEdit; + QToolButton * m_pRequestButton; + QToolButton * m_pStopListDownloadButton; + QToolButton * m_pOpenButton; + QToolButton * m_pSaveButton; + KviThemedLabel * m_pInfoLabel; + QTimer * m_pFlushTimer; KviPointerList<ChannelTreeWidgetItemData> * m_pItemList; + public: // Methods virtual void control(int iMsg); virtual void processData(KviIrcMessage * pMsg); virtual void die(); virtual QSize sizeHint() const; + protected: virtual QPixmap * myIconPtr(); virtual void fillCaptionBuffers(); @@ -127,6 +135,7 @@ protected slots: void exportList(); void importList(); void liveSearch(const QString & szText); + private: void reset(); void endOfList(); |
