summaryrefslogtreecommitdiffstats
path: root/languages/cpp/creategettersetterconfiguration.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/creategettersetterconfiguration.cpp
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/creategettersetterconfiguration.cpp')
-rw-r--r--languages/cpp/creategettersetterconfiguration.cpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/languages/cpp/creategettersetterconfiguration.cpp b/languages/cpp/creategettersetterconfiguration.cpp
new file mode 100644
index 00000000..5b64290f
--- /dev/null
+++ b/languages/cpp/creategettersetterconfiguration.cpp
@@ -0,0 +1,62 @@
+//
+// C++ Implementation: %{MODULE}
+//
+// Description:
+//
+//
+// Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR}
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#include "creategettersetterconfiguration.h"
+
+#include "cppsupportpart.h"
+
+#include <domutil.h>
+
+#include <qdom.h>
+#include <kmessagebox.h>
+QString CreateGetterSetterConfiguration::defaultPath = QString::fromLatin1( "/kdevcppsupport/creategettersetter" );
+
+CreateGetterSetterConfiguration::CreateGetterSetterConfiguration( CppSupportPart * part )
+: QObject(part), m_part(part), m_settings(0)
+{
+ init();
+}
+
+
+CreateGetterSetterConfiguration::~CreateGetterSetterConfiguration()
+{
+}
+
+void CreateGetterSetterConfiguration::init( )
+{
+ m_settings = m_part->projectDom();
+ if (m_settings == 0)
+ return;
+
+ m_prefixGet = DomUtil::readEntry( *m_settings, defaultPath + "/prefixGet", "" );
+ m_prefixSet = DomUtil::readEntry( *m_settings, defaultPath + "/prefixSet", "set" );
+ m_prefixVariable = QStringList::split(",", DomUtil::readEntry( *m_settings, defaultPath + "/prefixVariable", "m_,_" ));
+ m_parameterName = DomUtil::readEntry( *m_settings, defaultPath + "/parameterName", "theValue" );
+ m_isInlineGet = DomUtil::readBoolEntry(*m_settings, defaultPath + "/inlineGet", true );
+ m_isInlineSet = DomUtil::readBoolEntry(*m_settings, defaultPath + "/inlineSet", true );
+}
+
+void CreateGetterSetterConfiguration::store( )
+{
+ if (m_settings == 0)
+ return;
+
+ DomUtil::writeEntry( *m_settings, defaultPath + "/prefixGet", m_prefixGet );
+ DomUtil::writeEntry( *m_settings, defaultPath + "/prefixSet", m_prefixSet );
+ DomUtil::writeEntry( *m_settings, defaultPath + "/prefixVariable", m_prefixVariable.join(",") );
+ DomUtil::writeEntry( *m_settings, defaultPath + "/parameterName", m_parameterName );
+ DomUtil::writeBoolEntry(*m_settings, defaultPath + "/inlineGet", m_isInlineGet );
+ DomUtil::writeBoolEntry(*m_settings, defaultPath + "/inlineSet", m_isInlineSet );
+}
+
+#include "creategettersetterconfiguration.moc"
+
+//kate: indent-mode csands; tab-width 4; space-indent off;