kwin Library API Documentation

detectwidgetbase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './detectwidgetbase.ui'
00005 **
00006 ** Created: Wed Jun 14 16:32:36 2006
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 "detectwidgetbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <qlabel.h>
00016 #include <qframe.h>
00017 #include <qbuttongroup.h>
00018 #include <qradiobutton.h>
00019 #include <qcheckbox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 
00024 /*
00025  *  Constructs a KWinInternal::DetectWidgetBase as a child of 'parent', with the
00026  *  name 'name' and widget flags set to 'f'.
00027  */
00028 KWinInternal::DetectWidgetBase::DetectWidgetBase( QWidget* parent, const char* name, WFlags fl )
00029     : QWidget( parent, name, fl )
00030 {
00031     if ( !name )
00032     setName( "Form3" );
00033     Form3Layout = new QGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "Form3Layout"); 
00034     spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00035     Form3Layout->addMultiCell( spacer1, 9, 9, 0, 1 );
00036 
00037     textLabel11 = new QLabel( this, "textLabel11" );
00038 
00039     Form3Layout->addWidget( textLabel11, 6, 0 );
00040 
00041     textLabel1 = new QLabel( this, "textLabel1" );
00042 
00043     Form3Layout->addWidget( textLabel1, 2, 0 );
00044 
00045     textLabel3 = new QLabel( this, "textLabel3" );
00046 
00047     Form3Layout->addWidget( textLabel3, 3, 0 );
00048 
00049     type_label = new QLabel( this, "type_label" );
00050 
00051     Form3Layout->addWidget( type_label, 4, 1 );
00052 
00053     textLabel8 = new QLabel( this, "textLabel8" );
00054 
00055     Form3Layout->addWidget( textLabel8, 5, 0 );
00056 
00057     class_label = new QLabel( this, "class_label" );
00058 
00059     Form3Layout->addWidget( class_label, 2, 1 );
00060 
00061     role_label = new QLabel( this, "role_label" );
00062 
00063     Form3Layout->addWidget( role_label, 3, 1 );
00064 
00065     title_label = new QLabel( this, "title_label" );
00066 
00067     Form3Layout->addWidget( title_label, 5, 1 );
00068 
00069     machine_label = new QLabel( this, "machine_label" );
00070 
00071     Form3Layout->addWidget( machine_label, 7, 1 );
00072 
00073     textLabel4 = new QLabel( this, "textLabel4" );
00074 
00075     Form3Layout->addWidget( textLabel4, 4, 0 );
00076 
00077     extrarole_label = new QLabel( this, "extrarole_label" );
00078 
00079     Form3Layout->addWidget( extrarole_label, 6, 1 );
00080 
00081     textLabel13 = new QLabel( this, "textLabel13" );
00082 
00083     Form3Layout->addWidget( textLabel13, 7, 0 );
00084 
00085     line1 = new QFrame( this, "line1" );
00086     line1->setFrameShape( QFrame::HLine );
00087     line1->setFrameShadow( QFrame::Sunken );
00088     line1->setFrameShape( QFrame::HLine );
00089 
00090     Form3Layout->addMultiCellWidget( line1, 1, 1, 0, 1 );
00091 
00092     textLabel9 = new QLabel( this, "textLabel9" );
00093 
00094     Form3Layout->addMultiCellWidget( textLabel9, 0, 0, 0, 1 );
00095 
00096     buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
00097     buttonGroup1->setColumnLayout(0, Qt::Vertical );
00098     buttonGroup1->layout()->setSpacing( KDialog::spacingHint() );
00099     buttonGroup1->layout()->setMargin( KDialog::marginHint() );
00100     buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() );
00101     buttonGroup1Layout->setAlignment( Qt::AlignTop );
00102 
00103     use_class = new QRadioButton( buttonGroup1, "use_class" );
00104     use_class->setChecked( TRUE );
00105     buttonGroup1Layout->addWidget( use_class );
00106 
00107     use_role = new QRadioButton( buttonGroup1, "use_role" );
00108     buttonGroup1Layout->addWidget( use_role );
00109 
00110     use_whole_class = new QRadioButton( buttonGroup1, "use_whole_class" );
00111     buttonGroup1Layout->addWidget( use_whole_class );
00112 
00113     match_title = new QCheckBox( buttonGroup1, "match_title" );
00114     buttonGroup1Layout->addWidget( match_title );
00115 
00116     Form3Layout->addMultiCellWidget( buttonGroup1, 8, 8, 0, 1 );
00117     languageChange();
00118     resize( QSize(523, 325).expandedTo(minimumSizeHint()) );
00119     clearWState( WState_Polished );
00120 }
00121 
00122 /*
00123  *  Destroys the object and frees any allocated resources
00124  */
00125 KWinInternal::DetectWidgetBase::~DetectWidgetBase()
00126 {
00127     // no need to delete child widgets, Qt does it all for us
00128 }
00129 
00130 /*
00131  *  Sets the strings of the subwidgets using the current
00132  *  language.
00133  */
00134 void KWinInternal::DetectWidgetBase::languageChange()
00135 {
00136     textLabel11->setText( tr2i18n( "Extra role:" ) );
00137     textLabel1->setText( tr2i18n( "Class:" ) );
00138     textLabel3->setText( tr2i18n( "Role:" ) );
00139     type_label->setText( QString::null );
00140     textLabel8->setText( tr2i18n( "Title:" ) );
00141     class_label->setText( QString::null );
00142     role_label->setText( QString::null );
00143     title_label->setText( QString::null );
00144     machine_label->setText( QString::null );
00145     textLabel4->setText( tr2i18n( "Type:" ) );
00146     extrarole_label->setText( QString::null );
00147     textLabel13->setText( tr2i18n( "Machine:" ) );
00148     textLabel9->setText( tr2i18n( "Information About Selected Window" ) );
00149     buttonGroup1->setTitle( QString::null );
00150     use_class->setText( tr2i18n( "Use window &class (whole application)" ) );
00151     QWhatsThis::add( use_class, tr2i18n( "For selecting all windows belonging to a specific application, selecting only window class should usually work." ) );
00152     use_role->setText( tr2i18n( "Use window class and window &role (specific window)" ) );
00153     QWhatsThis::add( use_role, tr2i18n( "For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though." ) );
00154     use_whole_class->setText( tr2i18n( "Use &whole window class (specific window)" ) );
00155     QWhatsThis::add( use_whole_class, tr2i18n( "With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role." ) );
00156     match_title->setText( tr2i18n( "Match also window &title" ) );
00157 }
00158 
00159 #include "detectwidgetbase.moc"
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 16:47:02 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003