1
#ifndef _CHANNELSJOIN_H_
2
#define _CHANNELSJOIN_H_
3
//=============================================================================
5
// File : ChannelsJoinDialog.h
6
// Creation date : Thu Nov 06 2001 12:30:25 CEST by Juan Alvarez
8
// This file is part of the KVIrc irc client distribution
9
// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net)
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 opinion) any later version.
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.
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.
25
//=============================================================================
28
* \file ChannelsJoinDialog.h
29
* \author Juan Alvarez
30
* \brief Channels join window
33
#include "KviWindow.h"
34
#include "KviCString.h"
35
#include "KviTalPopupMenu.h"
37
#include <QTreeWidget>
43
class KviConsoleWindow;
47
* \class ChannelsJoinDialogTreeWidget
48
* \brief Channels join window tree widget
50
class ChannelsJoinDialogTreeWidget : public QTreeWidget
54
ChannelsJoinDialogTreeWidget(QWidget * par)
55
:QTreeWidget(par), m_pJoinPopup(0)
59
~ChannelsJoinDialogTreeWidget()
65
KviTalPopupMenu * m_pJoinPopup;
67
* \brief Called when the user clicks on the list
68
* \param e mouse event descriptor
71
virtual void mousePressEvent(QMouseEvent * e);
72
virtual void mouseDoubleClickEvent(QMouseEvent * e);
76
* \class ChannelsJoinDialog
77
* \brief Channels join window class
79
class ChannelsJoinDialog : public QDialog
82
friend class ChannelsJoinDialogTreeWidget;
85
* \brief Constructs the channels join window
86
* \param par The parent widget
87
* \param name The name of the window
88
* \return ChannelsJoinDialog
90
ChannelsJoinDialog(QWidget * par, const char * name);
93
* \brief Destroys the channels join window
95
~ChannelsJoinDialog();
98
enum ItemTypes { HeaderItem, RecentChannelItem, RegisteredChannelItem };
99
QLineEdit * m_pChannelEdit;
100
ChannelsJoinDialogTreeWidget * m_pTreeWidget;
101
KviTalGroupBox * m_pGroupBox;
103
QCheckBox * m_pShowAtStartupCheck;
104
QCheckBox * m_pCloseAfterJoinCheck;
105
QPushButton * m_pJoinButton;
106
QPushButton * m_pRegButton;
107
QPushButton * m_pClearButton;
108
KviConsoleWindow * m_pConsole;
110
virtual void closeEvent(QCloseEvent * e);
113
* \brief Fills in the servers' list
119
* \brief Enables join and register button if channel is found
125
* \brief Sets the console and fills in the servers' list
126
* \param pConsole The source console
129
void setConsole(KviConsoleWindow * pConsole);
132
* \brief Called when the user choose an item from the list
138
* \brief Called when the text changes
141
void editTextChanged(const QString &);
144
* \brief Called when the return is pressed
146
* It joins the selected channel
149
void editReturnPressed();
152
* \brief Called when the cancel button is pressed
154
* It destroys the window object
157
void cancelClicked();
160
* \brief Called when the join button is pressed
162
* It joins the selected channel
168
* \brief Called when the delete button is pressed
170
* It deletes the selected channel
173
void deleteClicked();
176
* \brief Called when the register button is pressed
178
* It registers the selected channel in the database
184
* \brief Called when the clear button is pressed
186
* It clears the list of recent channels
192
//void namesClicked();
195
#endif //_CHANNELSJOINSWINDOW_H_