[atlantik-cvs] CVS: kdegames/atlantik/libatlantic atlantic_core.cpp, 1.27.2.3, 1.27.2.4 configoption.cpp, 1.1.2.1, 1.1.2.2 configoption.h, 1.1.2.1, 1.1.2.2
[email protected] Mon, 8 Dec 2003 00:31:54 +0100 (CET)
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/kde/kdegames/atlantik/libatlantic
In directory office:/tmp/cvs-serv30825/libatlantic
Modified Files:
Tag: atlantik_3_3_branch
atlantic_core.cpp configoption.cpp configoption.h
Log Message:
completely support new configupdate behavior for bool options
Index: atlantic_core.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/atlantic_core.cpp,v
retrieving revision 1.27.2.3
retrieving revision 1.27.2.4
diff -u -d -r1.27.2.3 -r1.27.2.4
--- atlantic_core.cpp 7 Dec 2003 22:37:29 -0000 1.27.2.3
+++ atlantic_core.cpp 7 Dec 2003 23:31:51 -0000 1.27.2.4
@@ -363,7 +363,7 @@
ConfigOption *configOption = 0;
for (QPtrListIterator<ConfigOption> it(m_configOptions); (configOption = *it) ; ++it)
- std::cout << "CO:" << QString::number(configOption->id()).latin1() << " " << configOption->name().latin1() << std::endl;
+ std::cout << "CO:" << QString::number(configOption->id()).latin1() << " " << configOption->name().latin1() << " " << configOption->value().latin1() << std::endl;
}
#include "atlantic_core.moc"
Index: configoption.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/Attic/configoption.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- configoption.cpp 7 Dec 2003 22:38:01 -0000 1.1.2.1
+++ configoption.cpp 7 Dec 2003 23:31:51 -0000 1.1.2.2
@@ -21,6 +21,8 @@
m_id = configId;
m_name = "";
m_description = "";
+ m_edit = false;
+ m_value = "";
m_changed = false;
}
@@ -55,6 +57,34 @@
QString ConfigOption::description() const
{
return m_description;
+}
+
+void ConfigOption::setEdit(bool edit)
+{
+ if (m_edit != edit)
+ {
+ m_edit = edit;
+ m_changed = true;
+ }
+}
+
+bool ConfigOption::edit()
+{
+ return m_edit;
+}
+
+void ConfigOption::setValue(const QString &value)
+{
+ if (m_value != value)
+ {
+ m_value = value;
+ m_changed = true;
+ }
+}
+
+QString ConfigOption::value() const
+{
+ return m_value;
}
void ConfigOption::update(bool force)
Index: configoption.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/Attic/configoption.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- configoption.h 7 Dec 2003 22:38:01 -0000 1.1.2.1
+++ configoption.h 7 Dec 2003 23:31:51 -0000 1.1.2.2
@@ -29,8 +29,12 @@
int id();
void setName(const QString &name);
QString name() const;
- void setDescription(const QString &host);
+ void setDescription(const QString &description);
QString description() const;
+ void setEdit(bool edit);
+ bool edit();
+ void setValue(const QString &value);
+ QString value() const;
void update(bool force = false);
signals:
@@ -38,8 +42,8 @@
private:
int m_id;
- bool m_changed;
- QString m_name, m_description;
+ bool m_changed, m_edit;
+ QString m_name, m_description, m_value;
};
#endif