author | zecke <zecke> | 2002-09-29 16:53:10 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-29 16:53:10 (UTC) |
commit | 33ebc68a530393697724428f0e0db3a4807f3a9e (patch) (side-by-side diff) | |
tree | f13affe84a0a4fce01c642c18b6b3c3f42d68e6b /library/fileselector.cpp | |
parent | 3e8ee39d31b43f01524670df6cb048efc2194b9a (diff) | |
download | opie-33ebc68a530393697724428f0e0db3a4807f3a9e.zip opie-33ebc68a530393697724428f0e0db3a4807f3a9e.tar.gz opie-33ebc68a530393697724428f0e0db3a4807f3a9e.tar.bz2 |
Add the possibility to hide/show the TypeCombo/CategorySelect
-rw-r--r-- | library/fileselector.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/library/fileselector.cpp b/library/fileselector.cpp index 382012f..7ff09b4 100644 --- a/library/fileselector.cpp +++ b/library/fileselector.cpp @@ -311,24 +311,25 @@ FileSelector::FileSelector( const QString &f, QWidget *parent, const char *name, QPEMenuToolFocusManager::manager()->addWidget( tb ); view = new FileSelectorView( this, "fileview" ); QPEApplication::setStylusOperation( view->viewport(), QPEApplication::RightOnHold ); connect( view, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ), this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) ); connect( view, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ), this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) ); connect( view, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( fileClicked( QListViewItem * ) ) ); QHBox *hb = new QHBox( this ); + d->typeCombo = new TypeCombo( hb ); connect( d->typeCombo, SIGNAL(selected(const QString&)), this, SLOT(typeSelected(const QString&)) ); QWhatsThis::add( d->typeCombo, tr("Show documents of this type") ); Categories c; c.load(categoryFileName()); QArray<int> vl( 0 ); d->catSelect = new CategorySelect( hb ); d->catSelect->setRemoveCategoryEdit( TRUE ); d->catSelect->setCategories( vl, "Document View", tr("Document View") ); d->catSelect->setAllCategories( TRUE ); @@ -487,24 +488,43 @@ void FileSelector::setNewVisible( bool b ) This function is deprecated. */ void FileSelector::setCloseVisible( bool b ) { if ( b ) d->toolbar->show(); else d->toolbar->hide(); } /*! + +*/ +void FileSelector::setTypeComboVisible( bool b ) { + if ( b ) + d->typeCombo->show(); + else + d->typeCombo->hide(); +} +/*! + +*/ +void FileSelector::setCategorySelectVisible( bool b ) { + if ( b ) + d->catSelect->show(); + else + d->catSelect->hide(); +} + +/*! Rereads the list of documents. */ void FileSelector::reread() { d->files.clear(); Global::findDocuments(&d->files, filter); d->typeCombo->reread( d->files, filter ); updateView(); } void FileSelector::updateView() { |