Inheritance diagram for Item:
Public Slots | |
virtual void | edit () |
virtual void | add () |
Public Member Functions | |
Item (QListView *listView, ShowModesDlg *_dlg) | |
Item (QListViewItem *item, ShowModesDlg *_dlg) | |
~Item () | |
void | moveToEnd () |
virtual QString | name ()=0 |
virtual bool | deletable ()=0 |
void | popup (const QPoint &pos) |
virtual void | setAttributes (QDomElement elem)=0 |
void | createDom (QDomElement elem) |
Protected Attributes | |
QPopupMenu * | menu |
ShowModesDlg * | showModesDlg |
Definition at line 36 of file showmodesdlg.cpp.
Item::Item | ( | QListView * | listView, | |
ShowModesDlg * | _dlg | |||
) | [inline] |
Definition at line 39 of file showmodesdlg.cpp.
References moveToEnd().
00039 : QListViewItem( listView ), showModesDlg(_dlg) 00040 { moveToEnd(); }
Item::Item | ( | QListViewItem * | item, | |
ShowModesDlg * | _dlg | |||
) | [inline] |
Definition at line 41 of file showmodesdlg.cpp.
References moveToEnd().
00041 : QListViewItem( item ), showModesDlg(_dlg) 00042 { moveToEnd(); }
Item::~Item | ( | ) | [inline] |
void Item::moveToEnd | ( | ) | [inline] |
Definition at line 51 of file showmodesdlg.cpp.
References QListViewItem::moveItem(), and QListViewItem::nextSibling().
Referenced by Item().
00051 { 00052 QListViewItem *lastChild = this; 00053 if ( lastChild ) { 00054 while ( lastChild->nextSibling() ) 00055 lastChild = lastChild->nextSibling(); 00056 } 00057 00058 00059 moveItem( lastChild ); 00060 }
virtual QString Item::name | ( | ) | [pure virtual] |
virtual bool Item::deletable | ( | ) | [pure virtual] |
Implemented in FeatureItem, LayerItem, ModeItem, and RootItem.
Referenced by ShowModesDlg::remove().
void Item::popup | ( | const QPoint & | pos | ) | [inline] |
Definition at line 64 of file showmodesdlg.cpp.
References menu, and QPopupMenu::popup().
Referenced by ShowModesDlg::contextMenu().
00065 { 00066 if ( menu ) 00067 { 00068 menu->popup( pos ); 00069 } 00070 return; 00071 }
virtual void Item::setAttributes | ( | QDomElement | elem | ) | [pure virtual] |
void Item::createDom | ( | QDomElement | elem | ) | [inline] |
Definition at line 73 of file showmodesdlg.cpp.
References createDom(), QDomDocument::createElement(), QListViewItem::firstChild(), name(), QListViewItem::nextSibling(), and setAttributes().
Referenced by ShowModesDlg::accept(), and createDom().
00074 { 00075 00076 setAttributes( elem ); 00077 QListViewItem *child = firstChild(); 00078 while ( child ) 00079 { 00080 QDomDocument doc = elem.ownerDocument(); 00081 00082 Item * it = dynamic_cast<Item *> ( child ); 00083 00084 00085 Q_ASSERT( it ); 00086 if ( it ) 00087 { 00088 00089 QDomElement childElem = doc.createElement( it->name() ); 00090 elem.appendChild( childElem ); 00091 00092 it->createDom( childElem ); 00093 } 00094 child = child->nextSibling(); 00095 } 00096 }
virtual void Item::edit | ( | ) | [inline, virtual, slot] |
Reimplemented in LayerItem, and ModeItem.
Definition at line 99 of file showmodesdlg.cpp.
Referenced by ShowModesDlg::clicked(), and ShowModesDlg::edit().
virtual void Item::add | ( | ) | [inline, virtual, slot] |
Reimplemented in LayerItem, ModeItem, and RootItem.
Definition at line 104 of file showmodesdlg.cpp.
Referenced by ShowModesDlg::add().
QPopupMenu* Item::menu [protected] |
Definition at line 109 of file showmodesdlg.cpp.
Referenced by LayerItem::LayerItem(), ModeItem::ModeItem(), popup(), RootItem::RootItem(), and ~Item().
ShowModesDlg* Item::showModesDlg [protected] |
Definition at line 110 of file showmodesdlg.cpp.
Referenced by ModeItem::add(), RootItem::add(), LayerItem::edit(), ModeItem::edit(), RootItem::parseDom(), ModeItem::parseDom(), and LayerItem::parseDom().