KDevelop API Documentation

addicondlgbase.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './addicondlgbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:56:48 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "addicondlgbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qlabel.h>
00017 #include <qcombobox.h>
00018 #include <qframe.h>
00019 #include <qpushbutton.h>
00020 #include <qlineedit.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 
00025 /*
00026  *  Constructs a AddIconDialogBase as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  *
00029  *  The dialog will by default be modeless, unless you set 'modal' to
00030  *  TRUE to construct a modal dialog.
00031  */
00032 AddIconDialogBase::AddIconDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00033     : QDialog( parent, name, modal, fl )
00034 {
00035     if ( !name )
00036     setName( "add_icon_dialog" );
00037     setSizeGripEnabled( FALSE );
00038     add_icon_dialogLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "add_icon_dialogLayout"); 
00039 
00040     type_label = new QLabel( this, "type_label" );
00041     QFont type_label_font(  type_label->font() );
00042     type_label->setFont( type_label_font ); 
00043     type_label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00044 
00045     add_icon_dialogLayout->addWidget( type_label, 0, 0 );
00046 
00047     size_label = new QLabel( this, "size_label" );
00048     QFont size_label_font(  size_label->font() );
00049     size_label->setFont( size_label_font ); 
00050     size_label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00051 
00052     add_icon_dialogLayout->addWidget( size_label, 1, 0 );
00053 
00054     size_combo = new QComboBox( FALSE, this, "size_combo" );
00055 
00056     add_icon_dialogLayout->addWidget( size_combo, 1, 1 );
00057 
00058     filename_label = new QLabel( this, "filename_label" );
00059     QFont filename_label_font(  filename_label->font() );
00060     filename_label->setFont( filename_label_font ); 
00061     filename_label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00062 
00063     add_icon_dialogLayout->addWidget( filename_label, 4, 0 );
00064 
00065     name_label = new QLabel( this, "name_label" );
00066     QFont name_label_font(  name_label->font() );
00067     name_label->setFont( name_label_font ); 
00068     name_label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00069 
00070     add_icon_dialogLayout->addWidget( name_label, 2, 0 );
00071 
00072     Line1 = new QFrame( this, "Line1" );
00073     Line1->setFrameShape( QFrame::HLine );
00074     Line1->setFrameShadow( QFrame::Sunken );
00075     Line1->setFrameShape( QFrame::HLine );
00076 
00077     add_icon_dialogLayout->addMultiCellWidget( Line1, 5, 5, 0, 1 );
00078 
00079     Layout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout1"); 
00080     Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00081     Layout1->addItem( Horizontal_Spacing2 );
00082 
00083     okbutton = new QPushButton( this, "okbutton" );
00084     okbutton->setAutoDefault( TRUE );
00085     okbutton->setDefault( TRUE );
00086     Layout1->addWidget( okbutton );
00087 
00088     cancelbutton = new QPushButton( this, "cancelbutton" );
00089     cancelbutton->setAutoDefault( TRUE );
00090     Layout1->addWidget( cancelbutton );
00091 
00092     add_icon_dialogLayout->addMultiCellLayout( Layout1, 6, 6, 0, 1 );
00093 
00094     name_edit = new QLineEdit( this, "name_edit" );
00095 
00096     add_icon_dialogLayout->addWidget( name_edit, 2, 1 );
00097 
00098     type_combo = new QComboBox( FALSE, this, "type_combo" );
00099 
00100     add_icon_dialogLayout->addWidget( type_combo, 0, 1 );
00101 
00102     filename_edit = new QLabel( this, "filename_edit" );
00103     filename_edit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, filename_edit->sizePolicy().hasHeightForWidth() ) );
00104     filename_edit->setFrameShape( QLabel::StyledPanel );
00105     filename_edit->setFrameShadow( QLabel::Sunken );
00106 
00107     add_icon_dialogLayout->addWidget( filename_edit, 4, 1 );
00108     Spacer22 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed );
00109     add_icon_dialogLayout->addItem( Spacer22, 3, 1 );
00110     languageChange();
00111     resize( QSize(301, 218).expandedTo(minimumSizeHint()) );
00112     clearWState( WState_Polished );
00113 
00114     // signals and slots connections
00115     connect( okbutton, SIGNAL( clicked() ), this, SLOT( accept() ) );
00116     connect( cancelbutton, SIGNAL( clicked() ), this, SLOT( reject() ) );
00117     connect( name_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( somethingChanged() ) );
00118     connect( type_combo, SIGNAL( activated(int) ), this, SLOT( somethingChanged() ) );
00119     connect( size_combo, SIGNAL( activated(int) ), this, SLOT( somethingChanged() ) );
00120 
00121     // tab order
00122     setTabOrder( type_combo, size_combo );
00123     setTabOrder( size_combo, name_edit );
00124     setTabOrder( name_edit, okbutton );
00125     setTabOrder( okbutton, cancelbutton );
00126 
00127     // buddies
00128     type_label->setBuddy( type_combo );
00129     size_label->setBuddy( size_combo );
00130     filename_label->setBuddy( filename_edit );
00131     name_label->setBuddy( name_edit );
00132 }
00133 
00134 /*
00135  *  Destroys the object and frees any allocated resources
00136  */
00137 AddIconDialogBase::~AddIconDialogBase()
00138 {
00139     // no need to delete child widgets, Qt does it all for us
00140 }
00141 
00142 /*
00143  *  Sets the strings of the subwidgets using the current
00144  *  language.
00145  */
00146 void AddIconDialogBase::languageChange()
00147 {
00148     setCaption( tr2i18n( "Add New Icon" ) );
00149     type_label->setText( tr2i18n( "&Type:" ) );
00150     size_label->setText( tr2i18n( "&Size:" ) );
00151     filename_label->setText( tr2i18n( "File name:" ) );
00152     name_label->setText( tr2i18n( "&Name:" ) );
00153     okbutton->setText( tr2i18n( "&OK" ) );
00154     cancelbutton->setText( tr2i18n( "&Cancel" ) );
00155     name_edit->setText( tr2i18n( "unknown" ) );
00156 }
00157 
00158 void AddIconDialogBase::somethingChanged()
00159 {
00160     qWarning( "AddIconDialogBase::somethingChanged(): Not implemented yet" );
00161 }
00162 
00163 #include "addicondlgbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:39 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003