src/widgets.h

changeset 667
31540c1f22ea
parent 603
47e7773c7841
equal deleted inserted replaced
666:c595cfb4791c 667:31540c1f22ea
1 /* 1 /*
2 * LDForge: LDraw parts authoring CAD 2 * LDForge: LDraw parts authoring CAD
3 * Copyright (C) 2013 Santeri Piippo 3 * Copyright (C) 2013, 2014 Santeri Piippo
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or 7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
20 #define WIDGETS_H 20 #define WIDGETS_H
21 21
22 #include <QGroupBox> 22 #include <QGroupBox>
23 #include <QSpinBox> 23 #include <QSpinBox>
24 #include <map> 24 #include <map>
25 #include "common.h" 25 #include "main.h"
26 #include "types.h" 26 #include "types.h"
27 27
28 class QIcon; 28 class QIcon;
29 class QCheckBox; 29 class QCheckBox;
30 class QButtonGroup; 30 class QButtonGroup;
35 // RadioGroup 35 // RadioGroup
36 // 36 //
37 // Convenience widget - is a groupbox of radio buttons. 37 // Convenience widget - is a groupbox of radio buttons.
38 // ============================================================================= 38 // =============================================================================
39 class RadioGroup : public QGroupBox 39 class RadioGroup : public QGroupBox
40 { Q_OBJECT 40 {
41 Q_OBJECT
41 42
42 public: 43 public:
43 typedef QList<QRadioButton*>::Iterator Iterator; 44 typedef QList<QRadioButton*>::Iterator Iterator;
44 45
45 explicit RadioGroup() 46 explicit RadioGroup()
46 { init (Qt::Vertical); 47 {
48 init (Qt::Vertical);
47 } 49 }
48 50
49 explicit RadioGroup (QWidget* parent = null) : QGroupBox (parent) 51 explicit RadioGroup (QWidget* parent = null) : QGroupBox (parent)
50 { init (Qt::Vertical); 52 {
53 init (Qt::Vertical);
51 } 54 }
52 55
53 explicit RadioGroup (const QString& title, QWidget* parent = null); 56 explicit RadioGroup (const QString& title, QWidget* parent = null);
54 explicit RadioGroup (const QString& title, initlist<char const*> entries, int const defaultId, 57 explicit RadioGroup (const QString& title, initlist<char const*> entries, int const defaultId,
55 const Qt::Orientation orient = Qt::Vertical, QWidget* parent = null); 58 const Qt::Orientation orient = Qt::Vertical, QWidget* parent = null);

mercurial