You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
#include <tqlayout.h>
|
|
#include <tqbuttongroup.h>
|
|
#include <tqradiobutton.h>
|
|
|
|
#include <kdebug.h>
|
|
|
|
#include "bugsystem.h"
|
|
#include "kbbprefs.h"
|
|
|
|
#include "severityselectdialog.h"
|
|
#include "severityselectdialog.moc"
|
|
|
|
SeveritySelectDialog::SeveritySelectDialog(TQWidget *tqparent,const char *name) :
|
|
KDialogBase( tqparent, name, true, i18n("Select Severity"), Ok|Cancel )
|
|
{
|
|
mButtonGroup = new TQButtonGroup( 1,Qt::Horizontal, i18n("Severity"), this );
|
|
setMainWidget( mButtonGroup );
|
|
|
|
TQValueList<Bug::Severity> severities = Bug::severities();
|
|
TQValueList<Bug::Severity>::ConstIterator it;
|
|
for( it = severities.begin(); it != severities.end(); ++it ) {
|
|
mButtonGroup->insert(
|
|
new TQRadioButton( 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() );
|
|
}
|
|
|
|
TQString SeveritySelectDialog::selectedSeverityAsString()
|
|
{
|
|
return Bug::severityToString( selectedSeverity() );
|
|
}
|