summaryrefslogtreecommitdiffstats
path: root/part/kxetreeviewsettings.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-26 13:50:43 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-26 13:50:43 +0100
commitd62c8c002c51fb7c36487839eeeb4ac89f044dee (patch)
treebb4d1f5c631ab1f22a3018ba39e6a806035f80fd /part/kxetreeviewsettings.h
downloadkxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.tar.gz
kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.zip
Initial import of kxmleditor 1.1.4
Diffstat (limited to 'part/kxetreeviewsettings.h')
-rw-r--r--part/kxetreeviewsettings.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/part/kxetreeviewsettings.h b/part/kxetreeviewsettings.h
new file mode 100644
index 0000000..403a0bb
--- /dev/null
+++ b/part/kxetreeviewsettings.h
@@ -0,0 +1,103 @@
+/***************************************************************************
+ kxetreeviewsettings.h
+ ---------------------
+ begin : Tue Dec 02 2003
+ copyright : (C) 2003 by The KXMLEditor Team
+ email : hartig@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KXETREEVIEWSETTINGS_H
+#define KXETREEVIEWSETTINGS_H
+
+#include "kxesettings.h"
+
+class KXETreeViewSettingsPage;
+
+/**
+ * This class represents the group of configuration settings for the
+ * tree view.
+ *
+ * @author Olaf Hartig
+ */
+class KXETreeViewSettings : public KXESettings
+{
+ public:
+
+ enum AttributeVisibility
+ {
+ NoAttributes,
+ NamesOnly,
+ NamesAndValues
+ };
+
+ KXETreeViewSettings( QObject * pParent = 0, const char * pszName = 0 );
+
+ // The following functions can be used to access this object's settings.
+ bool createItemsOnDemand() const { return m_bCreateItemsOnDemand; }
+ int dfltExpLevel() const { return m_iDfltExpLevel; }
+ bool decorateRoot() const { return m_bDecorateRoot; }
+ bool enableDragging() const { return m_bEnableDragging; }
+ bool enableDropping() const { return m_bEnableDropping; }
+ AttributeVisibility elemDisplMode() const { return m_enmElemDisplMode; }
+
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual QString dialogPageName() const;
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual QString dialogPageHeader() const;
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual QString dialogPageIcon() const;
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual QWidget * dialogPage( QFrame * pParent );
+
+ protected:
+
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual void write( KConfig * ) const;
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual void read( const KConfig * );
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual void setFromPage();
+ /**
+ * Derived from @ref KXESettings
+ */
+ virtual void updatePage() const;
+
+ // the settings itself
+ bool m_bCreateItemsOnDemand;
+ int m_iDfltExpLevel;
+ bool m_bDecorateRoot;
+ bool m_bEnableDragging;
+ bool m_bEnableDropping;
+ AttributeVisibility m_enmElemDisplMode;
+
+ /**
+ * the corresponding configuration dialog page
+ * It is created on demand by @ref dialogPage.
+ */
+ KXETreeViewSettingsPage * m_pDialogPage;
+};
+
+#endif