Inheritance diagram for LayerItem:
Public Member Functions | |
LayerItem (QListViewItem *item, ShowModesDlg *dlg, int height, QString allowOverlapStr) | |
QString | name () |
void | setAttributes (QDomElement elem) |
~LayerItem () | |
void | parseDom (QDomElement elem) |
void | edit () |
bool | deletable () |
void | add () |
void | setTextInListView () |
Protected Attributes | |
int | m_height |
QString | m_allowOverlapStr |
Definition at line 155 of file showmodesdlg.cpp.
|
Definition at line 158 of file showmodesdlg.cpp. References add(), edit(), Item::menu, and setTextInListView(). 00159 : Item( item , dlg), m_height( height ), m_allowOverlapStr( allowOverlapStr) 00160 { 00161 menu = new QPopupMenu( dlg ); 00162 menu->insertItem( "add feature",dlg , SLOT(add 00163 ()) ); 00164 menu->insertItem( "remove this layer", dlg , SLOT(remove 00165 ()) ); 00166 menu->insertItem( "edit this layer", dlg , SLOT(edit()) ); 00167 setTextInListView(); 00168 }
|
|
Definition at line 180 of file showmodesdlg.cpp.
|
|
Reimplemented from Item. Definition at line 582 of file showmodesdlg.cpp. References GeneralMaker::listRegistered(). Referenced by LayerItem(). 00583 { 00584 QStringList lst; 00585 std::list< std::string > aList = GeneralMaker::listRegistered(); 00586 for ( std::list< std::string >::iterator it = aList.begin(); it != aList.end(); ++it ) 00587 { 00588 lst << it->c_str(); 00589 } 00590 bool ok; 00591 QString res = QInputDialog::getItem( 00592 "MyApp 3000", "Select an feature:", lst, 1, false, &ok, 00593 showModesDlg ); 00594 if ( ok ) 00595 { 00596 FeatureItem *item = new FeatureItem( this, showModesDlg, res ); 00597 setOpen( true ); 00598 } 00599 else 00600 { 00601 return; 00602 } 00603 }
|
|
Implements Item. Definition at line 208 of file showmodesdlg.cpp.
|
|
Reimplemented from Item. Definition at line 567 of file showmodesdlg.cpp. References m_allowOverlapStr, m_height, setTextInListView(), and Item::showModesDlg. Referenced by LayerItem(). 00568 { 00569 QString allowOverlapString = m_allowOverlapStr; 00570 int height = m_height; 00571 LayerEditDlg * dlg = new LayerEditDlg( height, allowOverlapString, showModesDlg, "edit layer" ); 00572 if ( dlg->exec() == QDialog::Accepted ) 00573 { 00574 m_height = height; 00575 m_allowOverlapStr = allowOverlapString; 00576 setTextInListView(); 00577 } 00578 return; 00579 }
|
|
Implements Item. Definition at line 169 of file showmodesdlg.cpp. Referenced by parseDom().
|
|
Definition at line 182 of file showmodesdlg.cpp. References name(), and Item::showModesDlg. Referenced by ModeItem::parseDom(). 00183 { 00184 00185 QDomNode node = elem.firstChild(); 00186 00187 while ( !node.isNull() ) 00188 { 00189 00190 if ( node.isElement() && node.nodeName() == "feature" ) 00191 { 00192 00193 QDomElement elem = node.toElement(); 00194 00195 Q_ASSERT((elem.hasAttribute("name"))); 00196 00197 QString name = elem.attribute( "name" ,""); 00198 00199 00200 new FeatureItem( this, showModesDlg , name ); 00201 00202 } 00203 node = node.nextSibling(); 00204 } 00205 }
|
|
Implements Item. Definition at line 173 of file showmodesdlg.cpp. References m_allowOverlapStr, and m_height. 00174 { 00175 elem.setAttribute( "height", QString("%1").arg(m_height) ); 00176 elem.setAttribute( "allowOverlapStr", m_allowOverlapStr ); 00177 return; 00178 00179 }
|
|
Definition at line 215 of file showmodesdlg.cpp. References m_allowOverlapStr, and m_height. Referenced by edit(), and LayerItem(). 00216 { 00217 setText(0,"layer"); 00218 setText(2, QString("%1").arg( m_height )); 00219 setText(3, m_allowOverlapStr ); 00220 }
|
|
Definition at line 224 of file showmodesdlg.cpp. Referenced by edit(), setAttributes(), and setTextInListView(). |
|
Definition at line 223 of file showmodesdlg.cpp. Referenced by edit(), setAttributes(), and setTextInListView(). |