diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
commit | 5de3dd4762ca33a0f92e79ffa4fe2ff67069d531 (patch) | |
tree | bad482b7afa4cdf47422d60a5dd2c61c7e333b09 /src/gui/propertieslistview.h | |
download | ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.tar.gz ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.zip |
Added KDE3 version of ktechlab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1095338 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/propertieslistview.h')
-rw-r--r-- | src/gui/propertieslistview.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/gui/propertieslistview.h b/src/gui/propertieslistview.h new file mode 100644 index 0000000..c6ad8f7 --- /dev/null +++ b/src/gui/propertieslistview.h @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (C) 2003-2004 by David Saxton * + * david@bluehaze.org * + * * + * 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 PROPERTIESLISTVIEW_H +#define PROPERTIESLISTVIEW_H + +#include <klistview.h> +#include <qmap.h> + +class CNItemGroup; +class ItemGroup; +class PIEditor; +class PLVItem; +class QPushButton; + +typedef QMap< QString, PLVItem * > PLVItemMap; + +/** +@author Daniel Clarke +@author David Saxton +*/ +class PropertiesListView : public KListView +{ +Q_OBJECT +public: + PropertiesListView( QWidget *parent = 0l, const char *name = 0l ); + ~PropertiesListView(); + +public slots: + /** + * Creates a new set of property items and inserts them into the widget. + */ + void slotCreate( ItemGroup * itemGroup ); + /** + * Updates the set of property items (enables/disables according to whether + * the items have differing values, etc). This will be called by slotCreate, + * and any time new items are selected / unselected. + */ + void slotUpdate( ItemGroup * itemGroup ); + /** + * Removes all property items from the widget. + */ + void slotClear(); + void slotSelectionChanged(QListViewItem *item); + /** + * Whenthe selected items have different values, then the property editor + * for the disagreeing property will have a value taken from one of the + * items, but will also be disabled. This will enable all disabled property + * editors and set the items to the value contained. + */ + void slotMergeProperties(); + void slotSetDefaults(); + +protected slots: + void headerSizeChanged(int section, int oldSize, int newSize); + void slotDataChanged(const QString &id, QVariant data); + void destroyEditor(); + +protected: + virtual void wheelEvent( QWheelEvent *e ); + + PIEditor *m_editor; + QPushButton *m_diffBt; + PLVItem *p_lastItem; + PLVItemMap m_plvItemMap; +}; + +#endif |