diff options
| author | Kevin Smith <git@kismith.co.uk> | 2009-07-26 18:05:52 (GMT) | 
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2009-07-26 18:05:52 (GMT) | 
| commit | aeab97f48ee6c260a3e2a21bca7a291ed1af8063 (patch) | |
| tree | 4e929b3cd7ea393c9ae756afb32828014e939324 /Swift/QtUI/Roster/QtTreeWidgetItem.h | |
| parent | 774fb699f967e05e7d3f46987b501c61c01f6687 (diff) | |
| download | swift-contrib-aeab97f48ee6c260a3e2a21bca7a291ed1af8063.zip swift-contrib-aeab97f48ee6c260a3e2a21bca7a291ed1af8063.tar.bz2  | |
Removing RosterItem and including in QtTreeWidgetItem.
Diffstat (limited to 'Swift/QtUI/Roster/QtTreeWidgetItem.h')
| -rw-r--r-- | Swift/QtUI/Roster/QtTreeWidgetItem.h | 68 | 
1 files changed, 28 insertions, 40 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidgetItem.h b/Swift/QtUI/Roster/QtTreeWidgetItem.h index 2a72a83..202c44a 100644 --- a/Swift/QtUI/Roster/QtTreeWidgetItem.h +++ b/Swift/QtUI/Roster/QtTreeWidgetItem.h @@ -8,7 +8,6 @@  #include "Swiften/Roster/TreeWidget.h"  #include "Swiften/Roster/TreeWidgetItem.h"  #include "Swift/QtUI/Roster/QtTreeWidgetItem.h" -#include "Swift/QtUI/Roster/RosterItem.h"  #include "Swift/QtUI/QtSwiftUtil.h" @@ -16,47 +15,36 @@  namespace Swift {  class QtTreeWidget; -class QtTreeWidgetItem : public TreeWidgetItem, public RosterItem { +class QtTreeWidgetItem : public QObject, public TreeWidgetItem { +	Q_OBJECT  	public: -		QtTreeWidgetItem(RosterItem* parentItem) : RosterItem(parentItem) { - -		} - -		void setText(const String& text) { -			setName(P2QSTRING(text)); -		} - -		void setTextColor(unsigned long color) { -			// QTreeWidgetItem::setTextColor(0, QColor( -			// 					((color & 0xFF0000)>>16), -			// 					((color & 0xFF00)>>8),  -			// 					(color & 0xFF))); -		} - -		void setBackgroundColor(unsigned long color) { -			// QTreeWidgetItem::setBackgroundColor(0, QColor( -			// 					((color & 0xFF0000)>>16), -			// 					((color & 0xFF00)>>8),  -			// 					(color & 0xFF))); -		} - -		void setExpanded(bool b) { -			//treeWidget()->setItemExpanded(this, b); -		} - -		void hide() { -			//setHidden(true); -		} - -		void show() { -			//setHidden(false); -		} -		 -		QWidget* getCollapsedRosterWidget(); -		QWidget* getExpandedRosterWidget(); +			~QtTreeWidgetItem(); +			void addChild(QtTreeWidgetItem* child); +			QtTreeWidgetItem* getParentItem(); +			int rowCount(); +			int rowOf(QtTreeWidgetItem* item); +			int row(); +			QtTreeWidgetItem* getItem(int row); +			QVariant data(int role); +			void setName(QString name); +			QtTreeWidgetItem(QtTreeWidgetItem* parentItem); +			void setText(const String& text); +			void setTextColor(unsigned long color); +			void setBackgroundColor(unsigned long color); +			void setExpanded(bool b); +			void hide(); +			void show(); + +			QWidget* getCollapsedRosterWidget(); +			QWidget* getExpandedRosterWidget(); -	private: -		QString displayName_; +		signals: +			void changed(); +		private: +			QList<QtTreeWidgetItem*> children_; +			QtTreeWidgetItem* parent_; +			QString name_; +			QString displayName_;  };  }  | 
 Swift