KVIrc  4.9.2
DeveloperAPIs
OptionsWidget_nickserv.h
Go to the documentation of this file.
1 #ifndef _OPTW_NICKSERV_H_
2 #define _OPTW_NICKSERV_H_
3 
4 //=============================================================================
5 //
6 // File : OptionsWidget_nickserv.h
7 // Creation date : Fri Aug 10 2001 03:37:21 CEST by Szymon Stefanek
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "kvi_settings.h"
29 #include "KviOptionsWidget.h"
30 
31 #include <QDialog>
32 #include <QCheckBox>
33 
34 class QLineEdit;
35 class QPushButton;
36 class KviNickServRule;
37 class QTreeWidget;
38 
39 #define KVI_OPTIONS_WIDGET_ICON_OptionsWidget_nickServ KviIconManager::NickServ
40 #define KVI_OPTIONS_WIDGET_NAME_OptionsWidget_nickServ __tr2qs_no_lookup("NickServ")
41 #define KVI_OPTIONS_WIDGET_PARENT_OptionsWidget_nickServ OptionsWidget_tools
42 #define KVI_OPTIONS_WIDGET_KEYWORDS_OptionsWidget_nickServ __tr2qs_no_lookup("authentication,identify")
43 #define KVI_OPTIONS_WIDGET_PRIORITY_OptionsWidget_nickServ 10000
44 //#define KVI_OPTIONS_WIDGET_HIDDEN_OptionsWidget_nickServ true
45 
46 class NickServRuleEditor : public QDialog
47 {
48  Q_OBJECT
49 public:
50  NickServRuleEditor(QWidget * par, bool bUseServerMaskField = false);
52 
53 protected:
54  QLineEdit * m_pRegisteredNickEdit;
55  QLineEdit * m_pNickServMaskEdit;
56  QLineEdit * m_pMessageRegexpEdit;
58  QLineEdit * m_pServerMaskEdit;
59  QPushButton * m_pOkButton;
60 
61 public:
62  bool editRule(KviNickServRule * r);
63 
64 protected:
65  bool validate();
66 protected slots:
67  void okPressed();
68 };
69 
71 {
72  Q_OBJECT
73 public:
74  OptionsWidget_nickServ(QWidget * parent);
76 
77 protected:
78  QTreeWidget * m_pNickServTreeWidget;
79  QCheckBox * m_pNickServCheck;
80  QPushButton * m_pAddRuleButton;
81  QPushButton * m_pDelRuleButton;
82  QPushButton * m_pEditRuleButton;
83 protected slots:
85  void addNickServRule();
86  void delNickServRule();
87  void editNickServRule();
88 
89 public:
90  virtual void commit();
91 };
92 
93 #endif //_OPTW_NICKSERV_H_
QLineEdit * m_pNickServMaskEdit
Definition: OptionsWidget_nickserv.h:55
virtual void commit()
Definition: OptionsWidget_nickserv.cpp:344
QPushButton * m_pAddRuleButton
Definition: OptionsWidget_nickserv.h:80
QLineEdit * m_pRegisteredNickEdit
Definition: OptionsWidget_nickserv.h:54
bool validate()
Definition: OptionsWidget_nickserv.cpp:142
Definition: KviOptionsWidget.h:40
QTreeWidget * m_pNickServTreeWidget
Definition: OptionsWidget_nickserv.h:78
QPushButton * m_pDelRuleButton
Definition: OptionsWidget_nickserv.h:81
void okPressed()
Definition: OptionsWidget_nickserv.cpp:188
void addNickServRule()
Definition: OptionsWidget_nickserv.cpp:310
void delNickServRule()
Definition: OptionsWidget_nickserv.cpp:325
bool editRule(KviNickServRule *r)
Definition: OptionsWidget_nickserv.cpp:195
QLineEdit * m_pServerMaskEdit
Definition: OptionsWidget_nickserv.h:58
Definition: OptionsWidget_nickserv.h:70
#define r
Definition: detector.cpp:82
Definition: KviNickServRule.h:35
QLineEdit * m_pIdentifyCommandEdit
Definition: OptionsWidget_nickserv.h:57
void enableDisableNickServControls()
Definition: OptionsWidget_nickserv.cpp:334
void editNickServRule()
Definition: OptionsWidget_nickserv.cpp:293
QPushButton * m_pEditRuleButton
Definition: OptionsWidget_nickserv.h:82
Definition: OptionsWidget_nickserv.h:46
QLineEdit * m_pMessageRegexpEdit
Definition: OptionsWidget_nickserv.h:56
OptionsWidget_nickServ(QWidget *parent)
Definition: OptionsWidget_nickserv.cpp:215
NickServRuleEditor(QWidget *par, bool bUseServerMaskField=false)
Definition: OptionsWidget_nickserv.cpp:43
QCheckBox * m_pNickServCheck
Definition: OptionsWidget_nickserv.h:79
This file contains compile time settings.
QPushButton * m_pOkButton
Definition: OptionsWidget_nickserv.h:59