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. |
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); |