#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './mainwnd.ui'
**
** Created: Son Mai 18 19:32:25 2003
** by: The User Interface Compiler ($Id: qt/main.cpp 3.1.2 edited Dec 19 11:45 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "mainwnd.h"
#include <qvariant.h>
#include <qgroupbox.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qpushbutton.h>
#include <kled.h>
#include <qprogressbar.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a mainwnd as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
mainwnd::mainwnd( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "mainwnd" );
groupBox1 = new QGroupBox( this, "groupBox1" );
groupBox1->setGeometry( QRect( 10, 10, 350, 150 ) );
groupBox1->setFrameShape( QGroupBox::Panel );
groupBox1->setFrameShadow( QGroupBox::Raised );
additionalCharLineEdit = new QLineEdit( groupBox1, "additionalCharLineEdit" );
additionalCharLineEdit->setEnabled( FALSE );
additionalCharLineEdit->setGeometry( QRect( 220, 120, 120, 20 ) );
useAddCheckBox = new QCheckBox( groupBox1, "useAddCheckBox" );
useAddCheckBox->setGeometry( QRect( 20, 120, 160, 20 ) );
useSpaceCheckBox = new QCheckBox( groupBox1, "useSpaceCheckBox" );
useSpaceCheckBox->setGeometry( QRect( 20, 100, 300, 20 ) );
textLabel5 = new QLabel( groupBox1, "textLabel5" );
textLabel5->setGeometry( QRect( 290, 40, 40, 20 ) );
textLabel5->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
textLabel4 = new QLabel( groupBox1, "textLabel4" );
textLabel4->setGeometry( QRect( 290, 20, 40, 20 ) );
textLabel4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
useLowerCheckBox = new QCheckBox( groupBox1, "useLowerCheckBox" );
useLowerCheckBox->setGeometry( QRect( 20, 20, 260, 20 ) );
useLowerCheckBox->setChecked( TRUE );
useUpperCheckBox = new QCheckBox( groupBox1, "useUpperCheckBox" );
useUpperCheckBox->setGeometry( QRect( 20, 40, 260, 20 ) );
useUpperCheckBox->setChecked( TRUE );
useNumCheckBox = new QCheckBox( groupBox1, "useNumCheckBox" );
useNumCheckBox->setGeometry( QRect( 20, 60, 260, 20 ) );
useSpecialCheckBox = new QCheckBox( groupBox1, "useSpecialCheckBox" );
useSpecialCheckBox->setGeometry( QRect( 20, 80, 180, 20 ) );
textLabel6 = new QLabel( groupBox1, "textLabel6" );
textLabel6->setEnabled( FALSE );
textLabel6->setGeometry( QRect( 290, 60, 40, 20 ) );
textLabel6->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
textLabel7 = new QLabel( groupBox1, "textLabel7" );
textLabel7->setEnabled( FALSE );
textLabel7->setGeometry( QRect( 210, 80, 120, 20 ) );
textLabel7->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
groupBox4 = new QGroupBox( this, "groupBox4" );
groupBox4->setGeometry( QRect( 10, 170, 350, 50 ) );
groupBox4->setFrameShape( QGroupBox::Panel );
groupBox4->setFrameShadow( QGroupBox::Raised );
pwLenSpinBox = new QSpinBox( groupBox4, "pwLenSpinBox" );
pwLenSpinBox->setGeometry( QRect( 20, 20, 310, 20 ) );
pwLenSpinBox->setMaxValue( 32767 );
pwLenSpinBox->setMinValue( 1 );
pwLenSpinBox->setValue( 8 );
groupBox5 = new QGroupBox( this, "groupBox5" );
groupBox5->setGeometry( QRect( 10, 230, 350, 50 ) );
groupBox5->setFrameShape( QGroupBox::Panel );
groupBox5->setFrameShadow( QGroupBox::Raised );
selectFilterButton = new QPushButton( groupBox5, "selectFilterButton" );
selectFilterButton->setGeometry( QRect( 20, 20, 310, 20 ) );
groupBox6 = new QGroupBox( this, "groupBox6" );
groupBox6->setGeometry( QRect( 10, 290, 350, 50 ) );
groupBox6->setFrameShape( QGroupBox::Panel );
groupBox6->setFrameShadow( QGroupBox::Raised );
genNowButton = new QPushButton( groupBox6, "genNowButton" );
genNowButton->setGeometry( QRect( 20, 20, 310, 20 ) );
genNowButton->setOn( FALSE );
genNowButton->setAutoRepeat( FALSE );
genNowButton->setFlat( FALSE );
groupBox11 = new QGroupBox( this, "groupBox11" );
groupBox11->setGeometry( QRect( 390, 20, 310, 160 ) );
groupBox11->setFrameShape( QGroupBox::Panel );
groupBox11->setFrameShadow( QGroupBox::Raised );
textLabel2 = new QLabel( groupBox11, "textLabel2" );
textLabel2->setGeometry( QRect( 30, 40, 197, 30 ) );
textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
filterStatusLed = new KLed( groupBox11, "filterStatusLed" );
filterStatusLed->setGeometry( QRect( 250, 40, 20, 20 ) );
textLabel3 = new QLabel( groupBox11, "textLabel3" );
textLabel3->setGeometry( QRect( 40, 100, 230, 20 ) );
progressBar = new QProgressBar( groupBox11, "progressBar" );
progressBar->setGeometry( QRect( 40, 120, 230, 22 ) );
progressBar->setLineWidth( 1 );
progressBar->setProgress( -1 );
progressBar->setCenterIndicator( FALSE );
progressBar->setPercentageVisible( TRUE );
groupBox12 = new QGroupBox( this, "groupBox12" );
groupBox12->setGeometry( QRect( 390, 190, 310, 140 ) );
groupBox12->setFrameShape( QGroupBox::Panel );
groupBox12->setFrameShadow( QGroupBox::Raised );
optionsButton = new QPushButton( groupBox12, "optionsButton" );
optionsButton->setGeometry( QRect( 30, 30, 250, 20 ) );
aboutButton = new QPushButton( groupBox12, "aboutButton" );
aboutButton->setGeometry( QRect( 30, 90, 110, 20 ) );
genHowtoButton = new QPushButton( groupBox12, "genHowtoButton" );
genHowtoButton->setGeometry( QRect( 30, 60, 250, 20 ) );
quitButton = new QPushButton( groupBox12, "quitButton" );
quitButton->setGeometry( QRect( 170, 90, 110, 20 ) );
languageChange();
resize( QSize(710, 350).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( genNowButton, SIGNAL( clicked() ), this, SLOT( genNowButton_slot() ) );
connect( aboutButton, SIGNAL( clicked() ), this, SLOT( aboutButton_slot() ) );
connect( quitButton, SIGNAL( clicked() ), this, SLOT( quitButton_slot() ) );
connect( useLowerCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( charsetChanged_slot() ) );
connect( useUpperCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( charsetChanged_slot() ) );
connect( useNumCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( charsetChanged_slot() ) );
connect( useSpecialCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( charsetChanged_slot() ) );
connect( useSpaceCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( charsetChanged_slot() ) );
connect( optionsButton, SIGNAL( clicked() ), this, SLOT( optionsButton_slot() ) );
connect( selectFilterButton, SIGNAL( clicked() ), this, SLOT( selectFilterButton_slot() ) );
connect( genHowtoButton, SIGNAL( clicked() ), this, SLOT( genHowtoButton_slot() ) );
connect( useAddCheckBox, SIGNAL( toggled(bool) ), additionalCharLineEdit, SLOT( setEnabled(bool) ) );
connect( useLowerCheckBox, SIGNAL( toggled(bool) ), textLabel4, SLOT( setEnabled(bool) ) );
connect( useUpperCheckBox, SIGNAL( toggled(bool) ), textLabel5, SLOT( setEnabled(bool) ) );
connect( useNumCheckBox, SIGNAL( toggled(bool) ), textLabel6, SLOT( setEnabled(bool) ) );
connect( useSpecialCheckBox, SIGNAL( toggled(bool) ), textLabel7, SLOT( setEnabled(bool) ) );
// tab order
setTabOrder( useLowerCheckBox, useUpperCheckBox );
setTabOrder( useUpperCheckBox, useNumCheckBox );
setTabOrder( useNumCheckBox, useSpecialCheckBox );
setTabOrder( useSpecialCheckBox, useSpaceCheckBox );
setTabOrder( useSpaceCheckBox, additionalCharLineEdit );
setTabOrder( additionalCharLineEdit, pwLenSpinBox );
setTabOrder( pwLenSpinBox, genNowButton );
setTabOrder( genNowButton, aboutButton );
setTabOrder( aboutButton, optionsButton );
setTabOrder( optionsButton, quitButton );
}
/*
* Destroys the object and frees any allocated resources
*/
mainwnd::~mainwnd()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void mainwnd::languageChange()
{
setCaption( tr2i18n( "PwG - password generator" ) );
groupBox1->setTitle( tr2i18n( "1st step: characters to use" ) );
useAddCheckBox->setText( tr2i18n( "additional characters:" ) );
useSpaceCheckBox->setText( tr2i18n( "spaces (blank character)" ) );
textLabel5->setText( tr2i18n( "ABC" ) );
textLabel4->setText( tr2i18n( "abc" ) );
useLowerCheckBox->setText( tr2i18n( "lowercase characters:" ) );
useUpperCheckBox->setText( tr2i18n( "uppercase characters:" ) );
useNumCheckBox->setText( tr2i18n( "numbers:" ) );
useSpecialCheckBox->setText( tr2i18n( "special characters:" ) );
textLabel6->setText( tr2i18n( "123" ) );
textLabel7->setText( tr2i18n( "!\\\"ยง$%&/()=?,.-;:_+" ) );
groupBox4->setTitle( tr2i18n( "2nd step: password length" ) );
groupBox5->setTitle( tr2i18n( "3rd step: Filtering" ) );
selectFilterButton->setText( tr2i18n( "Select &filters" ) );
groupBox6->setTitle( tr2i18n( "4th step: generate it!" ) );
genNowButton->setText( tr2i18n( "Generate &password now" ) );
groupBox11->setTitle( tr2i18n( "Status overview" ) );
textLabel2->setText( tr2i18n( "current filter-status:\n"
"(green = not filtering, red = filtering)" ) );
QToolTip::add( filterStatusLed, tr2i18n( "This LED represents the current status of the filters. red -> filtering; green -> not filtering" ) );
textLabel3->setText( tr2i18n( "Progress:" ) );
groupBox12->setTitle( QString::null );
optionsButton->setText( tr2i18n( "&Options" ) );
aboutButton->setText( tr2i18n( "&About" ) );
genHowtoButton->setText( tr2i18n( "Generating &HOWTO" ) );
quitButton->setText( tr2i18n( "&QUIT" ) );
}
void mainwnd::genNowButton_slot()
{
qWarning( "mainwnd::genNowButton_slot(): Not implemented yet" );
}
void mainwnd::aboutButton_slot()
{
qWarning( "mainwnd::aboutButton_slot(): Not implemented yet" );
}
void mainwnd::quitButton_slot()
{
qWarning( "mainwnd::quitButton_slot(): Not implemented yet" );
}
void mainwnd::copyClipButton_slot()
{
qWarning( "mainwnd::copyClipButton_slot(): Not implemented yet" );
}
void mainwnd::charsetChanged_slot()
{
qWarning( "mainwnd::charsetChanged_slot(): Not implemented yet" );
}
void mainwnd::optionsButton_slot()
{
qWarning( "mainwnd::optionsButton_slot(): Not implemented yet" );
}
void mainwnd::selectFilterButton_slot()
{
qWarning( "mainwnd::selectFilterButton_slot(): Not implemented yet" );
}
void mainwnd::genHowtoButton_slot()
{
qWarning( "mainwnd::genHowtoButton_slot(): Not implemented yet" );
}
#include "mainwnd.moc"
syntax highlighted by Code2HTML, v. 0.9.1