KVIrc  4.9.2
DeveloperAPIs
KviIpEditor.h
Go to the documentation of this file.
1 #ifndef _KVI_IPEDITOR_H_
2 #define _KVI_IPEDITOR_H_
3 //=============================================================================
4 //
5 // File : KviIpEditor.h
6 // Creation date : Wed Jun 12 2000 14:16:02 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2000-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 "kvi_settings.h"
28 
29 #include <QWidget>
30 #include <QString>
31 #include <QFrame>
32 
33 class QLineEdit;
34 class QLabel;
35 
36 class KVIRC_API KviIpEditor : public QFrame
37 {
38  Q_OBJECT
39 public:
41  {
43  IPv6
44  };
45  KviIpEditor(QWidget * parent, AddressType = IPv4, const QString & ipAddr = QString(), const char * name = 0);
46  ~KviIpEditor();
47 
48 private:
49  QLabel * m_pLabel[7];
50  QLineEdit * m_pEdit[8];
52 
53 public:
54  bool setAddress(const QString & ipAddr);
55  QString address() const;
56  void setAddressType(AddressType addrType);
57  AddressType addressType() const;
58  bool hasEmptyFields() const;
59  void clear();
60  virtual void setEnabled(bool bEnabled);
61 
62 protected:
63  virtual bool eventFilter(QObject * o, QEvent * e);
64  virtual void resizeEvent(QResizeEvent * e);
65  virtual QSize sizeHint() const;
66 
67 private:
68  void recreateChildren();
69 };
70 
71 #endif //_KVI_IPEDITOR_H_
#define KVIRC_API
Definition: kvi_settings.h:128
Definition: KviIpEditor.h:36
AddressType m_addrType
Definition: KviIpEditor.h:51
#define e
Definition: detector.cpp:69
btnDict clear()
Definition: KviIpEditor.h:42
AddressType
Definition: KviIpEditor.h:40
#define o
Definition: detector.cpp:79
QString name()
Definition: KviRuntimeInfo.cpp:655
This file contains compile time settings.