From d62c8c002c51fb7c36487839eeeb4ac89f044dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 26 Mar 2016 13:50:43 +0100 Subject: Initial import of kxmleditor 1.1.4 --- part/kxetreeviewsettings.h | 103 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 part/kxetreeviewsettings.h (limited to 'part/kxetreeviewsettings.h') 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 -- cgit v1.2.1