added [empty] dialog-entry.cc; stubbed dialog-entry.h
[simple-launcher] / dialog-entry.h
1 // This file is a part of Simple Launcher
2 //
3 // Copyright (C) 2006, 2007, Mikhail Sobolev
4 //
5 // Simple Launcher is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License version 2 as published by
7 // the Free Software Foundation.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12 // more details.
13 //
14 // You should have received a copy of the GNU General Public License along with
15 // this program; if not, write to the Free Software Foundation, Inc., 51
16 // Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
18 #ifndef _DIALOG_ENTRY_H_
19 #define _DIALOG_ENTRY_H_
20
21 #include "gconf-wrapper.h"
22
23 class SettingsDialogEntry {
24 public:
25         virtual ~SettingsDialogEntry() {}
26
27 protected:
28         SettingsDialogEntry(GConfOption& option, const std::string& name): myOption(option), myName(name) {}
29
30   const std::string& name() const { return myName; }
31
32   virtual void updateValue() = 0;
33
34 protected:
35         GConfOption& myOption;
36         const std::string myName;
37 };
38
39 class SettingsDialogStringEntry : public SettingsDialogEntry {
40 public:
41   SettingsDialogStringEntry(GConfStringOption& option, const std::string& name): SettingsDialogEntry(option, name) {}
42
43   void updateValue();
44 };
45
46 class SettingsDialogBooleanEntry : public SettingsDialogEntry {
47 public:
48   SettingsDialogBooleanEntry(GConfBooleanOption& option, const std::string& name): SettingsDialogEntry(option, name) {}
49
50   void updateValue() {}
51 };
52
53 class SettingsDialogIntegerEntry : public SettingsDialogEntry {
54 public:
55   SettingsDialogIntegerEntry(GConfIntegerOption& option, const std::string& name): SettingsDialogEntry(option, name) {}
56
57   void updateValue() {}
58 };
59
60 #endif
61
62 // vim:ts=2:sw=2:et