~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/modules/channelsjoin/ChannelsJoinDialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 opinion) 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
/**
 
28
* \file ChannelsJoinDialog.h
 
29
* \author Juan Alvarez
 
30
* \brief Channels join window
 
31
*/
 
32
 
 
33
#include "KviWindow.h"
 
34
#include "KviCString.h"
 
35
#include "KviTalPopupMenu.h"
 
36
 
 
37
#include <QTreeWidget>
 
38
#include <QDialog>
 
39
 
 
40
class QCheckBox;
 
41
class QPushButton;
 
42
class QLineEdit;
 
43
class KviConsoleWindow;
 
44
class KviTalGroupBox;
 
45
 
 
46
/**
 
47
* \class ChannelsJoinDialogTreeWidget
 
48
* \brief Channels join window tree widget
 
49
*/
 
50
class ChannelsJoinDialogTreeWidget : public QTreeWidget
 
51
{
 
52
        Q_OBJECT
 
53
public:
 
54
        ChannelsJoinDialogTreeWidget(QWidget * par)
 
55
        :QTreeWidget(par), m_pJoinPopup(0)
 
56
        {
 
57
        };
 
58
 
 
59
        ~ChannelsJoinDialogTreeWidget()
 
60
        {
 
61
                if(m_pJoinPopup)
 
62
                        delete m_pJoinPopup;
 
63
        };
 
64
protected:
 
65
        KviTalPopupMenu                   * m_pJoinPopup;
 
66
        /**
 
67
        * \brief Called when the user clicks on the list
 
68
        * \param e mouse event descriptor
 
69
        * \return void
 
70
        */
 
71
        virtual void mousePressEvent(QMouseEvent * e);
 
72
        virtual void mouseDoubleClickEvent(QMouseEvent * e);
 
73
};
 
74
 
 
75
/**
 
76
* \class ChannelsJoinDialog
 
77
* \brief Channels join window class
 
78
*/
 
79
class ChannelsJoinDialog : public QDialog
 
80
{
 
81
        Q_OBJECT
 
82
        friend class ChannelsJoinDialogTreeWidget;
 
83
public:
 
84
        /**
 
85
        * \brief Constructs the channels join window
 
86
        * \param par The parent widget
 
87
        * \param name The name of the window
 
88
        * \return ChannelsJoinDialog
 
89
        */
 
90
        ChannelsJoinDialog(QWidget * par, const char * name);
 
91
 
 
92
        /**
 
93
        * \brief Destroys the channels join window
 
94
        */
 
95
        ~ChannelsJoinDialog();
 
96
 
 
97
protected:
 
98
        enum ItemTypes { HeaderItem, RecentChannelItem, RegisteredChannelItem };
 
99
        QLineEdit                         * m_pChannelEdit;
 
100
        ChannelsJoinDialogTreeWidget      * m_pTreeWidget;
 
101
        KviTalGroupBox                    * m_pGroupBox;
 
102
        QLineEdit                         * m_pPass;
 
103
        QCheckBox                         * m_pShowAtStartupCheck;
 
104
        QCheckBox                         * m_pCloseAfterJoinCheck;
 
105
        QPushButton                       * m_pJoinButton;
 
106
        QPushButton                       * m_pRegButton;
 
107
        QPushButton                       * m_pClearButton;
 
108
        KviConsoleWindow                  * m_pConsole;
 
109
public:
 
110
        virtual void closeEvent(QCloseEvent * e);
 
111
 
 
112
        /**
 
113
        * \brief Fills in the servers' list
 
114
        * \return void
 
115
        */
 
116
        void fillListView();
 
117
 
 
118
        /**
 
119
        * \brief Enables join and register button if channel is found
 
120
        * \return void
 
121
        */
 
122
        void enableJoin();
 
123
 
 
124
        /**
 
125
        * \brief Sets the console and fills in the servers' list
 
126
        * \param pConsole The source console
 
127
        * \return void
 
128
        */
 
129
        void setConsole(KviConsoleWindow * pConsole);
 
130
 
 
131
        /**
 
132
        * \brief Called when the user choose an item from the list
 
133
        * \return void
 
134
        */
 
135
        void itemSelected();
 
136
protected slots:
 
137
        /**
 
138
        * \brief Called when the text changes
 
139
        * \return void
 
140
        */
 
141
        void editTextChanged(const QString &);
 
142
 
 
143
        /**
 
144
        * \brief Called when the return is pressed
 
145
        *
 
146
        * It joins the selected channel
 
147
        * \return void
 
148
        */
 
149
        void editReturnPressed();
 
150
 
 
151
        /**
 
152
        * \brief Called when the cancel button is pressed
 
153
        *
 
154
        * It destroys the window object
 
155
        * \return void
 
156
        */
 
157
        void cancelClicked();
 
158
 
 
159
        /**
 
160
        * \brief Called when the join button is pressed
 
161
        *
 
162
        * It joins the selected channel
 
163
        * \return void
 
164
        */
 
165
        void joinClicked();
 
166
 
 
167
        /**
 
168
        * \brief Called when the delete button is pressed
 
169
        *
 
170
        * It deletes the selected channel
 
171
        * \return void
 
172
        */
 
173
        void deleteClicked();
 
174
 
 
175
        /**
 
176
        * \brief Called when the register button is pressed
 
177
        *
 
178
        * It registers the selected channel in the database
 
179
        * \return void
 
180
        */
 
181
        void regClicked();
 
182
 
 
183
        /**
 
184
        * \brief Called when the clear button is pressed
 
185
        *
 
186
        * It clears the list of recent channels
 
187
        * \return void
 
188
        */
 
189
        void clearClicked();
 
190
 
 
191
        //void whoClicked();
 
192
        //void namesClicked();
 
193
};
 
194
 
 
195
#endif //_CHANNELSJOINSWINDOW_H_