#include #include /**************************************************************************** ** Form implementation generated from reading ui file '/home/oliver/work/programming/kyammi/src/DeleteDialog.ui' ** ** Created: Sun Jul 31 13:19:31 2005 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.4 edited Nov 24 2003 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "DeleteDialog.h" #include #include #include #include #include #include #include #include #include /* * Constructs a DeleteDialog as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ DeleteDialog::DeleteDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "DeleteDialog" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); setSizeGripEnabled( TRUE ); DeleteDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "DeleteDialogLayout"); CheckBoxDeleteDbEntry = new QCheckBox( this, "CheckBoxDeleteDbEntry" ); CheckBoxDeleteDbEntry->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, CheckBoxDeleteDbEntry->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addMultiCellWidget( CheckBoxDeleteDbEntry, 2, 2, 0, 5 ); TextLabel1 = new QLabel( this, "TextLabel1" ); TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)3, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); QFont TextLabel1_font( TextLabel1->font() ); TextLabel1_font.setPointSize( 14 ); TextLabel1_font.setBold( TRUE ); TextLabel1->setFont( TextLabel1_font ); DeleteDialogLayout->addMultiCellWidget( TextLabel1, 0, 0, 0, 5 ); Line1 = new QFrame( this, "Line1" ); Line1->setFrameShape( QFrame::HLine ); Line1->setFrameShadow( QFrame::Sunken ); Line1->setFrameShape( QFrame::HLine ); DeleteDialogLayout->addMultiCellWidget( Line1, 4, 4, 0, 5 ); CheckBoxDeleteFile = new QCheckBox( this, "CheckBoxDeleteFile" ); CheckBoxDeleteFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, CheckBoxDeleteFile->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addMultiCellWidget( CheckBoxDeleteFile, 3, 3, 0, 5 ); ComboBoxOnMedia = new QComboBox( FALSE, this, "ComboBoxOnMedia" ); ComboBoxOnMedia->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBoxOnMedia->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addMultiCellWidget( ComboBoxOnMedia, 6, 6, 4, 5 ); LabelSongname = new QLabel( this, "LabelSongname" ); LabelSongname->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, LabelSongname->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addMultiCellWidget( LabelSongname, 1, 1, 0, 5 ); TextLabel1_2 = new QLabel( this, "TextLabel1_2" ); TextLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel1_2->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addMultiCellWidget( TextLabel1_2, 5, 6, 0, 3 ); PushButtonOK = new QPushButton( this, "PushButtonOK" ); PushButtonOK->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, PushButtonOK->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addWidget( PushButtonOK, 8, 1 ); Spacer4 = new QSpacerItem( 0, 23, QSizePolicy::Minimum, QSizePolicy::Expanding ); DeleteDialogLayout->addItem( Spacer4, 7, 2 ); PushButtonCancel = new QPushButton( this, "PushButtonCancel" ); PushButtonCancel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, PushButtonCancel->sizePolicy().hasHeightForWidth() ) ); DeleteDialogLayout->addMultiCellWidget( PushButtonCancel, 8, 8, 3, 4 ); Spacer2 = new QSpacerItem( 40, 20, QSizePolicy::Preferred, QSizePolicy::Minimum ); DeleteDialogLayout->addItem( Spacer2, 8, 2 ); Spacer1 = new QSpacerItem( 40, 16, QSizePolicy::Preferred, QSizePolicy::Minimum ); DeleteDialogLayout->addItem( Spacer1, 8, 0 ); Spacer3 = new QSpacerItem( 40, 20, QSizePolicy::Preferred, QSizePolicy::Minimum ); DeleteDialogLayout->addItem( Spacer3, 8, 5 ); languageChange(); resize( QSize(304, 197).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( PushButtonOK, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( PushButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); // tab order setTabOrder( CheckBoxDeleteDbEntry, CheckBoxDeleteFile ); setTabOrder( CheckBoxDeleteFile, ComboBoxOnMedia ); setTabOrder( ComboBoxOnMedia, PushButtonOK ); setTabOrder( PushButtonOK, PushButtonCancel ); } /* * Destroys the object and frees any allocated resources */ DeleteDialog::~DeleteDialog() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void DeleteDialog::languageChange() { setCaption( tr2i18n( "DeleteDialog" ) ); CheckBoxDeleteDbEntry->setText( tr2i18n( "delete database entry (in Yammi's database)" ) ); QToolTip::add( CheckBoxDeleteDbEntry, tr2i18n( "deletes the database entry in Yammi's database (does not affect the file)" ) ); TextLabel1->setText( tr2i18n( "Delete a song entry and/or its file" ) ); CheckBoxDeleteFile->setText( tr2i18n( "delete file (on harddisk)" ) ); QToolTip::add( CheckBoxDeleteFile, tr2i18n( "deletes the file on harddisk (if you keep the database entry, this song needs to be loaded for playing)" ) ); QToolTip::add( ComboBoxOnMedia, tr2i18n( "shows a list of media, on which the song(s) to delete can be found" ) ); LabelSongname->setText( tr2i18n( "song to delete..." ) ); TextLabel1_2->setText( tr2i18n( "For your information:\n" "Song is contained on media" ) ); QToolTip::add( TextLabel1_2, tr2i18n( "shows a list of media, on which the song(s) to delete can be found" ) ); PushButtonOK->setText( tr2i18n( "OK" ) ); PushButtonCancel->setText( tr2i18n( "Cancel" ) ); } #include "DeleteDialog.moc"