diff options
Diffstat (limited to 'part/kxe_viewattributes.h')
| -rw-r--r-- | part/kxe_viewattributes.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/part/kxe_viewattributes.h b/part/kxe_viewattributes.h new file mode 100644 index 0000000..c314c56 --- /dev/null +++ b/part/kxe_viewattributes.h @@ -0,0 +1,71 @@ +/*************************************************************************** + kxe_viewattributes.h - description + ------------------- + begin : Thu Nov 22 2001 + copyright : (C) 2001, 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 KXE_VIEWATTRIBUTES_H +#define KXE_VIEWATTRIBUTES_H + +#include <qtable.h> +#include <qdom.h> + +/** + * @author The KXMLEditor Team + */ +class KXE_ViewAttributes : public QTable +{ + Q_OBJECT + + public: + + KXE_ViewAttributes( QWidget * pParent = 0, const char * pszName = 0 ); + + /** Returns a pointer to the currently selected attribute or a null pointer. */ + QDomAttr getSelectedAttribute() const; + + /** Changes the behaviour of this view to readonly or readwrite. */ + void setReadWrite( bool fReadWrite ); + + public slots: + + /** Changes/Rebuilds the whole table according to the given element's attributes. */ + void slotChange( const QDomElement & element ); + + protected: + + /** the currently selected node */ + QDomElement m_domElement; + + protected slots: + + /** Called, when a context menu was requested (connected to @ref QTable::contextMenuRequested). */ + void slotContextMenuRequested( int nRow, int nCol, const QPoint & pos ); + + /** Called, when an item was changed via inplace editing. */ + void slotItemRenamedInplace( int nRow, int nCol ); + + signals: + + /** Emitted, when a context menu is requested */ + void sigContextMenuRequested( const QString & szMenuName, const QPoint & pos ); + + /** Emitted, when an attributes value was renamed via inplace editing. */ + void sigAttributeNameChangedInplace( const QDomAttr &, const QString ); + + /** Emitted, when an attributes value was renamed via inplace editing. */ + void sigAttributeValueChangedInplace( const QDomAttr &, const QString ); +}; + +#endif |
