KVIrc  4.9.2
DeveloperAPIs
LinksWindow.h
Go to the documentation of this file.
1 #ifndef _LINKSWINDOW_H_
2 #define _LINKSWINDOW_H_
3 //=============================================================================
4 //
5 // File : LinksWindow.h
6 // Creation date : Thu Dec 21 2000 12:42:55 CEST by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "KviWindow.h"
28 #include "KviCString.h"
29 #include "KviIrcSocket.h"
30 #include "KviIrcServerParser.h"
31 #include "KviConsoleWindow.h"
32 #include "KviIrcContext.h"
33 #include "KviThemedTreeWidget.h"
34 
35 #include <QToolButton>
36 #include <QMenu>
37 
38 class KviThemedLabel;
39 
40 typedef struct _KviLink
41 {
44  int hops;
46 } KviLink;
47 
49 {
50  Q_OBJECT
51 public:
52  LinksListView(QWidget * par, KviWindow * wnd, const char * txt);
54 
55 protected:
56  void mousePressEvent(QMouseEvent * e);
57 signals:
58  void rightButtonPressed(QTreeWidgetItem *, QPoint);
59 };
60 
62 {
63  Q_OBJECT
64 public:
65  LinksWindow(KviConsoleWindow * lpConsole);
66  ~LinksWindow();
67 
68 protected:
69  QSplitter * m_pVertSplitter;
70  QSplitter * m_pTopSplitter;
73  QMenu * m_pHostPopup;
74  QString m_szRootServer;
75  QToolButton * m_pRequestButton;
77 
78 public: // Methods
79  virtual void control(int msg);
80  virtual void processData(KviIrcMessage * msg);
81  virtual void die();
82 
83 protected:
84  virtual QPixmap * myIconPtr();
85  virtual void fillCaptionBuffers();
86  virtual void applyOptions();
87  virtual void resizeEvent(QResizeEvent * e);
88  virtual void getBaseLogFileName(QString & buffer);
89 protected slots:
90  void showHostPopup(QTreeWidgetItem * i, const QPoint & p);
91  void hostPopupClicked(QAction * pAction);
92  void requestLinks();
93  void connectionStateChange();
94 
95 public:
96  virtual QSize sizeHint() const;
97 
98 private:
99  void reset();
100  void endOfLinks();
101  QTreeWidgetItem * insertLink(KviLink * l);
102  QTreeWidgetItem * getItemByHost(const char * host, QTreeWidgetItem * par);
103 };
104 
105 #endif //_KVI_LINKSWINDOW_H_
void requestLinks()
Definition: LinksWindow.cpp:113
Definition: KviCString.h:105
Definition: KviConsoleWindow.h:75
KviPointerList< KviLink > * m_pLinkList
Definition: LinksWindow.h:72
virtual void die()
Definition: LinksWindow.cpp:166
void reset()
Definition: LinksWindow.cpp:456
Definition: KviIrcMessage.h:50
QSplitter * m_pVertSplitter
Definition: LinksWindow.h:69
#define l
Definition: detector.cpp:76
virtual void resizeEvent(QResizeEvent *e)
Definition: LinksWindow.cpp:147
QMenu * m_pHostPopup
Definition: LinksWindow.h:73
void endOfLinks()
Definition: LinksWindow.cpp:184
void showHostPopup(QTreeWidgetItem *i, const QPoint &p)
Definition: LinksWindow.cpp:392
LinksListView(QWidget *par, KviWindow *wnd, const char *txt)
Definition: LinksWindow.cpp:510
virtual QSize sizeHint() const
Definition: LinksWindow.cpp:154
QToolButton * m_pRequestButton
Definition: LinksWindow.h:75
#define e
Definition: detector.cpp:69
#define i
Definition: detector.cpp:73
void rightButtonPressed(QTreeWidgetItem *, QPoint)
void connectionStateChange()
Definition: LinksWindow.cpp:127
QTreeWidgetItem * getItemByHost(const char *host, QTreeWidgetItem *par)
Definition: LinksWindow.cpp:362
virtual void control(int msg)
Definition: LinksWindow.cpp:171
QSplitter * m_pTopSplitter
Definition: LinksWindow.h:70
LinksWindow(KviConsoleWindow *lpConsole)
Definition: LinksWindow.cpp:46
~LinksListView()
Definition: LinksWindow.h:53
virtual void fillCaptionBuffers()
Definition: LinksWindow.cpp:161
Definition: LinksWindow.h:48
Definition: KviThemedTreeWidget.h:34
QString m_szRootServer
Definition: LinksWindow.h:74
void mousePressEvent(QMouseEvent *e)
Definition: LinksWindow.cpp:522
Definition: KviIrcServerParser.h:103
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
Lower stack protocol for IRC connection.
A template double linked list of pointers.
Definition: KviPointerList.h:55
void hostPopupClicked(QAction *pAction)
Definition: LinksWindow.cpp:445
virtual void applyOptions()
Definition: LinksWindow.cpp:502
virtual QPixmap * myIconPtr()
Definition: LinksWindow.cpp:142
LinksListView * m_pListView
Definition: LinksWindow.h:71
Definition: KviThemedLabel.h:33
virtual void processData(KviIrcMessage *msg)
Definition: LinksWindow.cpp:463
virtual void getBaseLogFileName(QString &buffer)
Definition: LinksWindow.cpp:108
Contains the KviWindow class.
Definition: LinksWindow.h:61
#define p
Definition: detector.cpp:80
QTreeWidgetItem * insertLink(KviLink *l)
Definition: LinksWindow.cpp:341
KviThemedLabel * m_pInfoLabel
Definition: LinksWindow.h:76
struct _KviLink KviLink
~LinksWindow()
Definition: LinksWindow.cpp:100