author | alwin <alwin> | 2004-11-10 23:42:14 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-10 23:42:14 (UTC) |
commit | 79060b829e9231cddc0acfe2dd2b7da3f13dfbc4 (patch) (side-by-side diff) | |
tree | 0e7a6a344bfce1aaf76bedd939a9765014f6ec09 /noncore/graphics/opie-eye/gui/iconview.cpp | |
parent | a57e46d9b290712fa1ff106a1be133f4f9751a96 (diff) | |
download | opie-79060b829e9231cddc0acfe2dd2b7da3f13dfbc4.zip opie-79060b829e9231cddc0acfe2dd2b7da3f13dfbc4.tar.gz opie-79060b829e9231cddc0acfe2dd2b7da3f13dfbc4.tar.bz2 |
lister modules can insert special widgets.
doc_dirlister will insert a category select widget
Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 5472ead..948477c 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -197,8 +197,9 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) m_internalReset = false; + m_customWidget = 0; - QHBox *hbox = new QHBox( this ); - QLabel* lbl = new QLabel( hbox ); + m_hbox = new QHBox( this ); + QLabel* lbl = new QLabel( m_hbox ); lbl->setText( tr("View as" ) ); - m_views = new QComboBox( hbox, "View As" ); + m_views = new QComboBox( m_hbox, "View As" ); @@ -451,4 +452,10 @@ void PIconView::slotViewChanged( int i) { + if (m_customWidget) { + delete m_customWidget; + m_customWidget = 0; + } PDirView* cur = currentView(); - if (cur) delete cur; + if (cur) { + delete cur; + } QString str = m_views->text(i); @@ -470,2 +477,7 @@ void PIconView::slotViewChanged( int i) { setCurrentView( cur ); + m_customWidget = cur->widget(m_hbox); + if (m_customWidget) { + odebug << "Got a widget" << oendl; + m_customWidget->show(); + } @@ -481,3 +493,3 @@ void PIconView::slotViewChanged( int i) { this, SLOT(slotEnd()) ); - + connect(lis,SIGNAL(sig_reloadDir()),this,SLOT(slotReloadDir())); |