KVIrc 5.2.6
Developer APIs
KviTalHBox.h
Go to the documentation of this file.
1#ifndef _KVI_TAL_HBOX_H_
2#define _KVI_TAL_HBOX_H_
3//=============================================================================
4//
5// File : KviTalHBox.h
6// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
10// Copyright (C) 2008 Elvio Basello (hellvis69 at netsons dot org)
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
33
34#include "kvi_settings.h"
35
36#include <QHBoxLayout>
37#include <QWidget>
38
43class KVILIB_API KviTalHBox : public QWidget
44{
45 Q_OBJECT
46public:
53 KviTalHBox(QWidget * pParent, char * pcName = nullptr);
54
59
60private:
61 QHBoxLayout * m_pLayout;
62
63public:
70 void setStretchFactor(QWidget * pChild, int iStretch);
71
77 void setSpacing(int iSpace);
78
84 void setMargin(int iMargin);
85
91 void setAlignment(Qt::Alignment alignment);
92
99 void setAlignment(QWidget * pChild, Qt::Alignment alignment);
100
106 void addStretch(int iStretch);
107
113 void addSpacing(int iSpace);
114
115protected:
116 void childEvent(QChildEvent * e) override;
117};
118
119#endif // _KVI_TAL_HBOX_H_
void setMargin(int iMargin)
Sets the margin of the box.
Definition KviTalHBox.cpp:101
QHBoxLayout * m_pLayout
Definition KviTalHBox.h:61
void addSpacing(int iSpace)
Adds a non-stretchable spacing item.
Definition KviTalHBox.cpp:121
void setSpacing(int iSpace)
Sets the spacing of the box.
Definition KviTalHBox.cpp:96
void setStretchFactor(QWidget *pChild, int iStretch)
Sets the stretch factor for an object.
Definition KviTalHBox.cpp:91
void setAlignment(Qt::Alignment alignment)
Sets the alignment of the box.
Definition KviTalHBox.cpp:106
KviTalHBox(QWidget *pParent, char *pcName=nullptr)
Constructs an horizontal box object.
Definition KviTalHBox.cpp:56
void addStretch(int iStretch)
Adds the stretch factor.
Definition KviTalHBox.cpp:116
~KviTalHBox()
Destroys an horizontal box object.
void childEvent(QChildEvent *e) override
Definition KviTalHBox.cpp:71
#define e
Definition detector.cpp:70
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124