diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 13:50:43 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 13:50:43 +0100 |
commit | d62c8c002c51fb7c36487839eeeb4ac89f044dee (patch) | |
tree | bb4d1f5c631ab1f22a3018ba39e6a806035f80fd /part/kxeelementdialog.h | |
download | kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.tar.gz kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.zip |
Initial import of kxmleditor 1.1.4
Diffstat (limited to 'part/kxeelementdialog.h')
-rw-r--r-- | part/kxeelementdialog.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/part/kxeelementdialog.h b/part/kxeelementdialog.h new file mode 100644 index 0000000..8012525 --- /dev/null +++ b/part/kxeelementdialog.h @@ -0,0 +1,92 @@ +/*************************************************************************** + kxeelementdialog.h - description + ------------------ + begin : Mit Apr 17 2002 + copyright : (C) 2002, 2003 by The KXMLEditor Team + email : lvanek@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 KXEELEMENTDIALOG_H +#define KXEELEMENTDIALOG_H + +#include "kxeelementdialogbase.h" + +class KXEElementDialog : public KXEElementDialogBase +{ + Q_OBJECT + + public: + KXEElementDialog( QWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); + + public: + + const QString nsURI() const { return m_strNsURI; } + const QString prefix() const { return m_strPrefix; } + const QString name() const { return m_strName; } + const bool atTop() const { return m_bAtTop; } + + void setNsURI(const QString strNsURI) { m_strNsURI = strNsURI; } + void setPrefix(const QString strPrefix) { m_strPrefix = strPrefix; } + void setName(const QString strName) { m_strName = strName; } + + /** + * To be used for creating a new XML element + * + * @return see @ref QDialog::exec + */ + int exec( bool, bool, bool ); + + // check element name + static QString checkName(const QString); + + protected: + /** + * Clears the dialogs widgets (removes their content). + */ + + void clearDialog(); + + /** + * Fills the dialogs widgets with the data members. + */ + void fillDialog( bool ); + + /** + * Don't use this function directly, it's for internal use only. + * Use one of the other @ref DlgXMLElement::exec functions instead. + */ + int exec(); + /** + * Called, when the namespace URI in the edit line @ref DlgXMLElementBase::m_pEditNsURI + * is changed. + * Disables the prefix edit line (@ref DlgXMLElementBase::m_pEditPrefix), + * if the given string is empty. + */ + + + protected slots: + void slotNsURIChanged( const QString & szNewNsURI ); + /** + * Called, when the name in the edit line @ref DlgXMLElementBase::m_pEditName + * is changed. + * Disables the OK button, if the given string is empty. + */ + void slotNameChanged( const QString & szNewName ); + +protected: + QString m_strNsURI; + QString m_strPrefix; + QString m_strName; + bool m_bAtTop; +}; + +#endif |