Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Benjamin Grauer |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
17 | |
---|
18 | #include "qt_gui_elements.h" |
---|
19 | |
---|
20 | |
---|
21 | namespace OrxGui |
---|
22 | { |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | QtGuiCheckBox::QtGuiCheckBox(const std::string& name, bool defaultValue) |
---|
27 | : QCheckBox(QString().fromStdString(name)), Saveable(name) |
---|
28 | { |
---|
29 | //this->load(this->value()); |
---|
30 | } |
---|
31 | |
---|
32 | void QtGuiCheckBox::load(const MultiType& value) |
---|
33 | { |
---|
34 | this->setTristate(value.getBool()); |
---|
35 | this->value() = value; |
---|
36 | } |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | const MultiType& QtGuiCheckBox::save() |
---|
41 | { |
---|
42 | return this->value(); |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | QtGuiSlider::QtGuiSlider(const std::string& name, Qt::Orientation orientation) |
---|
50 | : QSlider(orientation), Saveable(name) |
---|
51 | { |
---|
52 | |
---|
53 | } |
---|
54 | QtGuiSlider::~QtGuiSlider() |
---|
55 | {} |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | QtGuiComboBox::QtGuiComboBox(const std::string& name) |
---|
65 | : QComboBox(), Saveable(name) |
---|
66 | { |
---|
67 | |
---|
68 | |
---|
69 | } |
---|
70 | |
---|
71 | void QtGuiComboBox::load(const MultiType& value) |
---|
72 | { |
---|
73 | this->value() = value; |
---|
74 | //TODO |
---|
75 | } |
---|
76 | |
---|
77 | const MultiType& QtGuiComboBox::save() |
---|
78 | { |
---|
79 | return this->value(); |
---|
80 | } |
---|
81 | |
---|
82 | |
---|
83 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.