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/kxeattributedialog.h | |
download | kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.tar.gz kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.zip |
Initial import of kxmleditor 1.1.4
Diffstat (limited to 'part/kxeattributedialog.h')
-rw-r--r-- | part/kxeattributedialog.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/part/kxeattributedialog.h b/part/kxeattributedialog.h new file mode 100644 index 0000000..e2019b9 --- /dev/null +++ b/part/kxeattributedialog.h @@ -0,0 +1,82 @@ +/*************************************************************************** + kxeattributedialog.h - description + -------------------- + begin : Fre Jul 12 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 KXEATTRIBUTEDIALOG_H +#define KXEATTRIBUTEDIALOG_H + +#include "kxeattributedialogbase.h" + +#include <qdom.h> + +class KXEAttributeDialog : public KXEAttributeDialogBase +{ + Q_OBJECT + + public: + KXEAttributeDialog( QWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 ); + + const QString attributeNamespace() const { return m_strNamespace; } + const QString QName() const { return m_strQName; } + const QString Value() const { return m_strValue; } + + /** + * To be used for adding an attribute to new XML element. + * + * @return see @ref QDialog::exec + */ + int exec( ); + + /** + * Clears the dialogs widgets. + */ + void clearDialog(); + + // Check, if XML attribute name is OK + static QString checkName(const QString); + + // Check, if XML attribute value is OK + static QString checkValue(const QString); + + // Check, if XML attribute namespace is OK + static QString checkNamespace(const QString); + + protected slots: + /** + * Called, when user change attribute name. + * Disables the OK button, if user input is wrong or incomplete. + */ + void slotNameChanged(const QString &); + + /** + * Called, when user change attribute value. + * Disables the OK button, if user input is wrong or incomplete. + */ + void slotValueChanged(const QString &); + + /** + * Called, when user change attribute namespace. + * Disables the OK button, if user input is wrong or incomplete. + */ + void slotNamespaceChanged(const QString &); + + protected: + QString m_strNamespace; + QString m_strQName; + QString m_strValue; +}; + +#endif |