diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /kbugbuster/gui/severityselectdialog.cpp | |
download | tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/gui/severityselectdialog.cpp')
-rw-r--r-- | kbugbuster/gui/severityselectdialog.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/kbugbuster/gui/severityselectdialog.cpp b/kbugbuster/gui/severityselectdialog.cpp new file mode 100644 index 00000000..714e6f3a --- /dev/null +++ b/kbugbuster/gui/severityselectdialog.cpp @@ -0,0 +1,40 @@ +#include <qlayout.h> +#include <qbuttongroup.h> +#include <qradiobutton.h> + +#include <kdebug.h> + +#include "bugsystem.h" +#include "kbbprefs.h" + +#include "severityselectdialog.h" +#include "severityselectdialog.moc" + +SeveritySelectDialog::SeveritySelectDialog(QWidget *parent,const char *name) : + KDialogBase( parent, name, true, i18n("Select Severity"), Ok|Cancel ) +{ + mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Severity"), this ); + setMainWidget( mButtonGroup ); + + QValueList<Bug::Severity> severities = Bug::severities(); + QValueList<Bug::Severity>::ConstIterator it; + for( it = severities.begin(); it != severities.end(); ++it ) { + mButtonGroup->insert( + new QRadioButton( Bug::severityToString( *it ), mButtonGroup ), int(*it) ); + } +} + +void SeveritySelectDialog::setSeverity( Bug::Severity s ) +{ + mButtonGroup->setButton( s ); +} + +Bug::Severity SeveritySelectDialog::selectedSeverity() +{ + return (Bug::Severity)mButtonGroup->id( mButtonGroup->selected() ); +} + +QString SeveritySelectDialog::selectedSeverityAsString() +{ + return Bug::severityToString( selectedSeverity() ); +} |