KVIrc  4.9.2
DeveloperAPIs
libkvidialog.h
Go to the documentation of this file.
1 #ifndef _KVI_DIALOG_H_
2 #define _KVI_DIALOG_H_
3 //=============================================================================
4 //
5 // File : libkvidialog.h
6 // Creation date : Sat Sep 15 2001 01:13:25 by Szymon Stefanek
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 
27 #include "KviWindow.h"
28 #include "KviCString.h"
29 #include "KviParameterList.h"
30 #include "KviFileDialog.h"
31 #include "KviImageDialog.h"
32 #include "KviKvsCallbackObject.h"
33 
34 #include <QMessageBox>
35 #include <QDialog>
36 
37 class KviKvsCallbackMessageBox : public QMessageBox, public KviKvsCallbackObject
38 {
39  Q_OBJECT
40 public:
42  const QString & szCaption,
43  const QString & szText,
44  const QString & szIcon,
45  const QString & szButton0,
46  const QString & szButton1,
47  const QString & szButton2,
48  const QString & szCode,
49  KviKvsVariantList * pMagicParams,
50  KviWindow * pWindow, bool modal = false);
52 protected slots:
53  virtual void done(int code);
54 };
55 
56 class KviKvsCallbackTextInput : public QDialog, public KviKvsCallbackObject
57 {
58  Q_OBJECT
59 public:
61  const QString & szCaption,
62  const QString & szLabel,
63  const QString & szDefaultText,
64  const QString & szIcon,
65  bool bMultiLine,
66  bool bPassword,
67  const QString & szButton0,
68  const QString & szButton1,
69  const QString & szButton2,
70  const QString & szCode,
71  KviKvsVariantList * pMagicParams,
72  KviWindow * pWindow, bool modal = false);
74 
75 protected:
78  QWidget * m_pEdit;
81 
82 protected:
83  virtual void closeEvent(QCloseEvent * e);
84  virtual void showEvent(QShowEvent * e);
85 protected slots:
86  void b0Clicked();
87  void b1Clicked();
88  void b2Clicked();
89  virtual void done(int code);
90 };
91 
93 {
94  Q_OBJECT
95 public:
97  const QString & szCaption,
98  const QString & szInitialSelection,
99  const QString & szFilter,
100  const QString & szCode,
101  KviKvsVariantList * pMagicParams,
102  KviWindow * pWindow, bool modal = false);
104 
105 protected:
106  virtual void done(int code);
107 };
108 
110 {
111  Q_OBJECT
112 public:
114  const QString & szCaption,
115  const QString & szInitialSelection,
116  int iType,
117  int iMaxSize,
118  const QString & szCode,
119  KviKvsVariantList * pMagicParams,
120  KviWindow * pWindow, bool modal = false);
122 
123 protected:
124  virtual void done(int code);
125 };
126 
127 #endif //_KVI_DIALOG_H_
Definition: libkvidialog.h:56
virtual void closeEvent(QCloseEvent *e)
Definition: libkvidialog.cpp:398
KviKvsCallbackMessageBox(const QString &szCaption, const QString &szText, const QString &szIcon, const QString &szButton0, const QString &szButton1, const QString &szButton2, const QString &szCode, KviKvsVariantList *pMagicParams, KviWindow *pWindow, bool modal=false)
Definition: libkvidialog.cpp:52
Class to handle variant variables lists.
Definition: KviKvsVariantList.h:41
Definition: KviImageDialog.h:64
~KviKvsCallbackMessageBox()
Definition: libkvidialog.cpp:120
virtual void done(int code)
Definition: libkvidialog.cpp:579
Definition: libkvidialog.h:92
~KviKvsCallbackImageDialog()
Definition: libkvidialog.cpp:713
int m_iEscapeButton
Definition: libkvidialog.h:79
File dialog class.
Definition: KviFileDialog.h:47
KviKvsCallbackTextInput(const QString &szCaption, const QString &szLabel, const QString &szDefaultText, const QString &szIcon, bool bMultiLine, bool bPassword, const QString &szButton0, const QString &szButton1, const QString &szButton2, const QString &szCode, KviKvsVariantList *pMagicParams, KviWindow *pWindow, bool modal=false)
Definition: libkvidialog.cpp:235
#define e
Definition: detector.cpp:69
virtual void done(int code)
Definition: libkvidialog.cpp:718
~KviKvsCallbackFileDialog()
Definition: libkvidialog.cpp:574
KviKvsCallbackFileDialog(const QString &szCaption, const QString &szInitialSelection, const QString &szFilter, const QString &szCode, KviKvsVariantList *pMagicParams, KviWindow *pWindow, bool modal=false)
Definition: libkvidialog.cpp:554
KviKvsCallbackImageDialog(const QString &szCaption, const QString &szInitialSelection, int iType, int iMaxSize, const QString &szCode, KviKvsVariantList *pMagicParams, KviWindow *pWindow, bool modal=false)
Definition: libkvidialog.cpp:699
virtual void done(int code)
Definition: libkvidialog.cpp:404
Definition: libkvidialog.h:37
Definition: libkvidialog.h:109
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
Definition: KviKvsCallbackObject.h:42
virtual void done(int code)
Definition: libkvidialog.cpp:125
bool m_bPassword
Definition: libkvidialog.h:77
bool m_bMultiLine
Definition: libkvidialog.h:76
File dialog helpers.
void b0Clicked()
Definition: libkvidialog.cpp:383
Contains the KviWindow class.
int m_iDefaultButton
Definition: libkvidialog.h:80
void b2Clicked()
Definition: libkvidialog.cpp:393
~KviKvsCallbackTextInput()
Definition: libkvidialog.cpp:378
QWidget * m_pEdit
Definition: libkvidialog.h:78
virtual void showEvent(QShowEvent *e)
Definition: libkvidialog.cpp:445
void b1Clicked()
Definition: libkvidialog.cpp:388