KVIrc 5.2.6
Developer APIs
ChannelsJoinDialog.h
Go to the documentation of this file.
1#ifndef _CHANNELSJOIN_H_
2#define _CHANNELSJOIN_H_
3//=============================================================================
4//
5// File : ChannelsJoinDialog.h
6// Creation date : Thu Nov 06 2001 12:30:25 CEST by Juan Alvarez
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2001-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
32
33#include "KviWindow.h"
34
35#include <QDialog>
36#include <QMenu>
37#include <QTreeWidget>
38
40class QCheckBox;
41class QGroupBox;
42class QLineEdit;
43class QPushButton;
44class QString;
45
50class ChannelsJoinDialogTreeWidget : public QTreeWidget
51{
52 Q_OBJECT
53public:
55 : QTreeWidget(par){};
56
62
63protected:
64 QMenu * m_pJoinPopup = nullptr;
70 void mousePressEvent(QMouseEvent * e) override;
71 void mouseDoubleClickEvent(QMouseEvent * e) override;
72};
73
78class ChannelsJoinDialog : public QDialog
79{
80 Q_OBJECT
82
83public:
89 ChannelsJoinDialog(const char * name);
90
95
96protected:
103 QLineEdit * m_pChannelEdit = nullptr;
105 QGroupBox * m_pGroupBox = nullptr;
106 QLineEdit * m_pPass = nullptr;
107 QCheckBox * m_pShowAtStartupCheck = nullptr;
108 QCheckBox * m_pCloseAfterJoinCheck = nullptr;
109 QPushButton * m_pJoinButton = nullptr;
110 QPushButton * m_pRegButton = nullptr;
111 QPushButton * m_pClearButton = nullptr;
113
114public:
115 void closeEvent(QCloseEvent * e) override;
116
121 void fillListView();
122
127 void enableJoin();
128
134 void setConsole(KviConsoleWindow * pConsole);
135
140 void itemSelected();
141protected slots:
146 void editTextChanged(const QString &);
147
154 void editReturnPressed();
155
162 void cancelClicked();
163
170 void joinClicked();
171
178 void deleteClicked();
179
186 void regClicked();
187
194 void clearClicked();
195
196 //void whoClicked();
197 //void namesClicked();
198};
199
200#endif //_CHANNELSJOINSWINDOW_H_
Contains the KviWindow class.
void mousePressEvent(QMouseEvent *e) override
Called when the user clicks on the list.
Definition ChannelsJoinDialog.cpp:240
void mouseDoubleClickEvent(QMouseEvent *e) override
Definition ChannelsJoinDialog.cpp:277
QMenu * m_pJoinPopup
Definition ChannelsJoinDialog.h:64
ChannelsJoinDialogTreeWidget(QWidget *par)
Definition ChannelsJoinDialog.h:54
~ChannelsJoinDialogTreeWidget()
Definition ChannelsJoinDialog.h:57
QPushButton * m_pJoinButton
Definition ChannelsJoinDialog.h:109
void setConsole(KviConsoleWindow *pConsole)
Sets the console and fills in the servers' list.
Definition ChannelsJoinDialog.cpp:148
ChannelsJoinDialog(const char *name)
Constructs the channels join window.
Definition ChannelsJoinDialog.cpp:57
QCheckBox * m_pCloseAfterJoinCheck
Definition ChannelsJoinDialog.h:108
friend class ChannelsJoinDialogTreeWidget
Definition ChannelsJoinDialog.h:81
QCheckBox * m_pShowAtStartupCheck
Definition ChannelsJoinDialog.h:107
ChannelsJoinDialogTreeWidget * m_pTreeWidget
Definition ChannelsJoinDialog.h:104
void fillListView()
Fills in the servers' list.
Definition ChannelsJoinDialog.cpp:154
void itemSelected()
Called when the user choose an item from the list.
Definition ChannelsJoinDialog.cpp:292
void clearClicked()
Called when the clear button is pressed.
Definition ChannelsJoinDialog.cpp:444
QPushButton * m_pRegButton
Definition ChannelsJoinDialog.h:110
void editTextChanged(const QString &)
Called when the text changes.
Definition ChannelsJoinDialog.cpp:305
ItemTypes
Definition ChannelsJoinDialog.h:98
@ RecentChannelItem
Definition ChannelsJoinDialog.h:100
@ RegisteredChannelItem
Definition ChannelsJoinDialog.h:101
@ HeaderItem
Definition ChannelsJoinDialog.h:99
QLineEdit * m_pChannelEdit
Definition ChannelsJoinDialog.h:103
QGroupBox * m_pGroupBox
Definition ChannelsJoinDialog.h:105
KviConsoleWindow * m_pConsole
Definition ChannelsJoinDialog.h:112
void cancelClicked()
Called when the cancel button is pressed.
Definition ChannelsJoinDialog.cpp:335
void deleteClicked()
Called when the delete button is pressed.
Definition ChannelsJoinDialog.cpp:340
~ChannelsJoinDialog()
Destroys the channels join window.
Definition ChannelsJoinDialog.cpp:140
void editReturnPressed()
Called when the return is pressed.
Definition ChannelsJoinDialog.cpp:460
void enableJoin()
Enables join and register button if channel is found.
Definition ChannelsJoinDialog.cpp:310
QLineEdit * m_pPass
Definition ChannelsJoinDialog.h:106
QPushButton * m_pClearButton
Definition ChannelsJoinDialog.h:111
void closeEvent(QCloseEvent *e) override
Definition ChannelsJoinDialog.cpp:465
void joinClicked()
Called when the join button is pressed.
Definition ChannelsJoinDialog.cpp:383
void regClicked()
Called when the register button is pressed.
Definition ChannelsJoinDialog.cpp:413
Definition KviConsoleWindow.h:74
#define e
Definition detector.cpp:70