KVIrc  4.9.2
DeveloperAPIs
KviTalGroupBox.h
Go to the documentation of this file.
1 #ifndef _KVI_TAL_GROUPBOX_H_
2 #define _KVI_TAL_GROUPBOX_H_
3 
4 //=============================================================================
5 //
6 // File : KviTalGroupBox.h
7 // Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
8 //
9 // This file is part of the KVIrc IRC client distribution
10 // Copyright (C) 2007-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 
34 #include "kvi_settings.h"
35 
36 #include <QGroupBox>
37 #include <QLayout>
38 
43 class KVILIB_API KviTalGroupBox : public QGroupBox
44 {
45  Q_OBJECT
46 public:
53  KviTalGroupBox(QWidget * pParent, char * pcName = 0);
54 
60  KviTalGroupBox(QWidget * pParent = 0);
61 
68  KviTalGroupBox(const QString & szTitle, QWidget * pParent = 0);
69 
76  KviTalGroupBox(Qt::Orientation orientation, QWidget * pParent = 0);
77 
85  KviTalGroupBox(Qt::Orientation orientation, const QString & szTitle, QWidget * pParent = 0);
86 
90  ~KviTalGroupBox();
91 
92 protected:
93  Qt::Orientation mOrientation;
94  QLayout * m_pLayout;
95 
96 public:
102  void setInsideMargin(int iMargin)
103  {
104  if(layout())
105  layout()->setMargin(iMargin);
106  };
107 
113  void setInsideSpacing(int iSpacing)
114  {
115  if(layout())
116  layout()->setSpacing(iSpacing);
117  };
118 
124  {
125  if(layout())
126  return layout()->margin();
127  return 0;
128  };
129 
135  {
136  if(layout())
137  return layout()->spacing();
138  return 0;
139  };
140 
146  void addSpace(int iSpace);
147 
153  void setOrientation(Qt::Orientation orientation);
154 
160  void setLayout(QLayout * newLayout);
161 
162 protected:
163  virtual void childEvent(QChildEvent * e);
164 };
165 
166 #endif // _KVI_TAL_GROUPBOX_H_
Qt::Orientation mOrientation
Definition: KviTalGroupBox.h:93
void setInsideMargin(int iMargin)
Sets the inside margin.
Definition: KviTalGroupBox.h:102
int insideSpacing()
Returns the inside spacing.
Definition: KviTalGroupBox.h:134
#define e
Definition: detector.cpp:69
Toolkit Abstraction Layer: groupbox class.
Definition: KviTalGroupBox.h:43
void setInsideSpacing(int iSpacing)
Sets the inside spacing.
Definition: KviTalGroupBox.h:113
QLayout * m_pLayout
Definition: KviTalGroupBox.h:94
int insideMargin()
Returns the inside margin.
Definition: KviTalGroupBox.h:123
This file contains compile time settings.
#define KVILIB_API
Definition: kvi_settings.h:125