00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#include <qlabel.h>
00025
00026
#include <kcombobox.h>
00027
#include <kdialog.h>
00028
#include <klocale.h>
00029
00030
#include "filterselectionwidget.h"
00031
00032 FilterSelectionWidget::FilterSelectionWidget(
QWidget *parent,
const char *name )
00033 :
QHBox( parent, name )
00034 {
00035 setSpacing( KDialog::spacingHint() );
00036
00037
QLabel *label =
new QLabel( i18n(
"Filter:" ),
this,
"kde toolbar widget" );
00038
00039 mFilterCombo =
new KComboBox(
this );
00040 label->setBuddy( mFilterCombo );
00041 connect( mFilterCombo, SIGNAL( activated(
int ) ),
00042
this, SIGNAL( filterActivated(
int ) ) );
00043 }
00044
00045 FilterSelectionWidget::~FilterSelectionWidget()
00046 {
00047 }
00048
00049
int FilterSelectionWidget::currentItem()
const
00050
{
00051
return mFilterCombo->currentItem();
00052 }
00053
00054
void FilterSelectionWidget::setCurrentItem(
int index )
00055 {
00056 mFilterCombo->setCurrentItem( index );
00057 }
00058
00059
void FilterSelectionWidget::setItems(
const QStringList &names )
00060 {
00061 mFilterCombo->clear();
00062 mFilterCombo->insertStringList( names );
00063 }
00064
00065
#include "filterselectionwidget.moc"