[4744] | 1 | /* |
---|
[1853] | 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. |
---|
[1855] | 10 | |
---|
| 11 | ### File Specific: |
---|
[7149] | 12 | main-programmer: Benjamin Grauer |
---|
[1855] | 13 | co-programmer: ... |
---|
[1853] | 14 | */ |
---|
| 15 | |
---|
[3955] | 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
[1853] | 17 | |
---|
[7539] | 18 | #include "qt_gui_elements.h" |
---|
[1853] | 19 | |
---|
[7447] | 20 | namespace OrxGui |
---|
| 21 | { |
---|
[1853] | 22 | |
---|
[7447] | 23 | |
---|
| 24 | |
---|
[7555] | 25 | QtGuiCheckBox::QtGuiCheckBox(const std::string& name, SaveableGroup* group, bool defaultValue) |
---|
| 26 | : QCheckBox(QString().fromStdString(name)), Saveable(name, group) |
---|
[7539] | 27 | { |
---|
| 28 | //this->load(this->value()); |
---|
| 29 | } |
---|
[7531] | 30 | |
---|
[7598] | 31 | void QtGuiCheckBox::load() |
---|
[7539] | 32 | { |
---|
[7598] | 33 | Saveable::load(); |
---|
| 34 | if (this->value().getBool()) |
---|
| 35 | this->setCheckState(Qt::Checked); |
---|
| 36 | else |
---|
| 37 | this->setCheckState(Qt::Unchecked); |
---|
[7539] | 38 | } |
---|
[7531] | 39 | |
---|
[7539] | 40 | |
---|
| 41 | |
---|
[7598] | 42 | void QtGuiCheckBox::save() |
---|
[7531] | 43 | { |
---|
[7539] | 44 | } |
---|
[7531] | 45 | |
---|
[7549] | 46 | |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | |
---|
[7555] | 50 | QtGuiSlider::QtGuiSlider(const std::string& name, SaveableGroup* group, Qt::Orientation orientation) |
---|
| 51 | : QSlider(orientation), Saveable(name, group) |
---|
[7549] | 52 | { |
---|
| 53 | |
---|
| 54 | } |
---|
| 55 | QtGuiSlider::~QtGuiSlider() |
---|
| 56 | {} |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | |
---|
[7555] | 65 | QtGuiComboBox::QtGuiComboBox(const std::string& name, SaveableGroup* group) |
---|
| 66 | : QComboBox(), Saveable(name, group) |
---|
[7539] | 67 | { |
---|
[7531] | 68 | |
---|
[7539] | 69 | |
---|
[7531] | 70 | } |
---|
| 71 | |
---|
[7598] | 72 | void QtGuiComboBox::load() |
---|
[7539] | 73 | { |
---|
| 74 | //TODO |
---|
| 75 | } |
---|
[7531] | 76 | |
---|
[7598] | 77 | void QtGuiComboBox::save() |
---|
[7539] | 78 | { |
---|
| 79 | } |
---|
[7531] | 80 | |
---|
[7539] | 81 | |
---|
[7585] | 82 | QtGuiInputLine::QtGuiInputLine(const std::string& name, SaveableGroup* group) |
---|
| 83 | : QLineEdit(), Saveable(name, group) |
---|
| 84 | { |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | } |
---|
| 88 | |
---|
| 89 | |
---|
[7598] | 90 | void QtGuiInputLine::load() |
---|
[7585] | 91 | { |
---|
[7598] | 92 | this->setText(this->value().getString().c_str()); |
---|
[7585] | 93 | } |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
[7598] | 97 | void QtGuiInputLine::save() |
---|
[7585] | 98 | { |
---|
| 99 | } |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|
[7447] | 104 | } |
---|