Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.cc @ 7585

Last change on this file since 7585 was 7585, checked in by bensch, 18 years ago

orxonox/qt_gui: more guo-elements

File size: 1.7 KB
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
21namespace OrxGui
22{
23
24
25
26  QtGuiCheckBox::QtGuiCheckBox(const std::string& name, SaveableGroup* group, bool defaultValue)
27  : QCheckBox(QString().fromStdString(name)), Saveable(name, group)
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, SaveableGroup* group, Qt::Orientation orientation)
50  : QSlider(orientation), Saveable(name, group)
51  {
52
53  }
54  QtGuiSlider::~QtGuiSlider()
55  {}
56
57
58
59
60
61
62
63
64  QtGuiComboBox::QtGuiComboBox(const std::string& name, SaveableGroup* group)
65  : QComboBox(), Saveable(name, group)
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  QtGuiInputLine::QtGuiInputLine(const std::string& name, SaveableGroup* group)
84  : QLineEdit(), Saveable(name, group)
85  {
86
87
88  }
89
90
91  void QtGuiInputLine::load(const MultiType& value)
92  {
93    this->setText(value.getString().c_str());
94    this->value() = value;
95  }
96
97
98
99  const MultiType& QtGuiInputLine::save()
100  {
101    return this->value();
102  }
103
104
105
106
107}
Note: See TracBrowser for help on using the repository browser.