transmission/qt/hig.h

73 lines
1.6 KiB
C
Raw Normal View History

2009-04-09 18:55:47 +00:00
/*
* This file Copyright (C) 2009-2014 Mnemosyne LLC
2009-04-09 18:55:47 +00:00
*
* It may be used under the GNU GPL versions 2 or 3
* or any future license endorsed by Mnemosyne LLC.
2009-04-09 18:55:47 +00:00
*
* $Id$
2009-04-09 18:55:47 +00:00
*/
2009-04-09 18:55:47 +00:00
#ifndef QTR_HIG_H
#define QTR_HIG_H
#include <QWidget>
class QCheckBox;
class QLabel;
class QString;
class QGridLayout;
class QLayout;
class HIG: public QWidget
{
2013-09-14 22:45:04 +00:00
Q_OBJECT
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
public:
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
enum
{
PAD_SMALL = 3,
PAD = 6,
PAD_BIG = 12,
PAD_LARGE = PAD_BIG
};
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
public:
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
HIG (QWidget * parent = 0);
virtual ~HIG ();
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
public:
void addSectionDivider ();
void addSectionTitle (const QString&);
void addSectionTitle (QWidget*);
void addSectionTitle (QLayout*);
void addWideControl (QLayout *);
void addWideControl (QWidget *);
QCheckBox* addWideCheckBox (const QString&, bool isChecked);
QLabel* addLabel (const QString&);
QLabel* addTallLabel (const QString&);
void addLabel (QWidget *);
void addTallLabel (QWidget *);
void addControl (QWidget *);
void addControl (QLayout *);
QLabel* addRow (const QString & label, QWidget * control, QWidget * buddy=0);
QLabel* addRow (const QString & label, QLayout * control, QWidget * buddy);
void addRow (QWidget * label, QWidget * control, QWidget * buddy=0);
void addRow (QWidget * label, QLayout * control, QWidget * buddy);
QLabel* addTallRow (const QString & label, QWidget * control, QWidget * buddy=0);
void finish ();
private:
QLayout* addRow (QWidget* w);
private:
int myRow;
bool myHasTall;
QGridLayout * myGrid;
2009-04-09 18:55:47 +00:00
};
#endif // QTR_HIG_H