00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "detectwidgetbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qlabel.h>
00017 #include <qframe.h>
00018 #include <qbuttongroup.h>
00019 #include <qradiobutton.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
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 QVBoxLayout( this, 11, 6, "Form3Layout");
00034
00035 textLabel9 = new QLabel( this, "textLabel9" );
00036 Form3Layout->addWidget( textLabel9 );
00037
00038 line1 = new QFrame( this, "line1" );
00039 line1->setFrameShape( QFrame::HLine );
00040 line1->setFrameShadow( QFrame::Sunken );
00041 line1->setFrameShape( QFrame::HLine );
00042 Form3Layout->addWidget( line1 );
00043
00044 layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2");
00045
00046 textLabel11 = new QLabel( this, "textLabel11" );
00047
00048 layout2->addWidget( textLabel11, 4, 0 );
00049
00050 textLabel1 = new QLabel( this, "textLabel1" );
00051
00052 layout2->addWidget( textLabel1, 0, 0 );
00053
00054 textLabel3 = new QLabel( this, "textLabel3" );
00055
00056 layout2->addWidget( textLabel3, 1, 0 );
00057
00058 type_label = new QLabel( this, "type_label" );
00059
00060 layout2->addWidget( type_label, 2, 1 );
00061
00062 textLabel8 = new QLabel( this, "textLabel8" );
00063
00064 layout2->addWidget( textLabel8, 3, 0 );
00065
00066 class_label = new QLabel( this, "class_label" );
00067
00068 layout2->addWidget( class_label, 0, 1 );
00069
00070 role_label = new QLabel( this, "role_label" );
00071
00072 layout2->addWidget( role_label, 1, 1 );
00073
00074 title_label = new QLabel( this, "title_label" );
00075
00076 layout2->addWidget( title_label, 3, 1 );
00077
00078 machine_label = new QLabel( this, "machine_label" );
00079
00080 layout2->addWidget( machine_label, 5, 1 );
00081
00082 textLabel4 = new QLabel( this, "textLabel4" );
00083
00084 layout2->addWidget( textLabel4, 2, 0 );
00085
00086 extrarole_label = new QLabel( this, "extrarole_label" );
00087
00088 layout2->addWidget( extrarole_label, 4, 1 );
00089
00090 textLabel13 = new QLabel( this, "textLabel13" );
00091
00092 layout2->addWidget( textLabel13, 5, 0 );
00093 Form3Layout->addLayout( layout2 );
00094
00095 buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
00096 buttonGroup1->setColumnLayout(0, Qt::Vertical );
00097 buttonGroup1->layout()->setSpacing( 6 );
00098 buttonGroup1->layout()->setMargin( 11 );
00099 buttonGroup1Layout = new QVBoxLayout( buttonGroup1->layout() );
00100 buttonGroup1Layout->setAlignment( Qt::AlignTop );
00101
00102 use_class = new QRadioButton( buttonGroup1, "use_class" );
00103 use_class->setChecked( TRUE );
00104 buttonGroup1Layout->addWidget( use_class );
00105
00106 use_role = new QRadioButton( buttonGroup1, "use_role" );
00107 buttonGroup1Layout->addWidget( use_role );
00108
00109 use_whole_class = new QRadioButton( buttonGroup1, "use_whole_class" );
00110 buttonGroup1Layout->addWidget( use_whole_class );
00111 Form3Layout->addWidget( buttonGroup1 );
00112 spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00113 Form3Layout->addItem( spacer1 );
00114 languageChange();
00115 resize( QSize(557, 335).expandedTo(minimumSizeHint()) );
00116 clearWState( WState_Polished );
00117 }
00118
00119
00120
00121
00122 KWinInternal::DetectWidgetBase::~DetectWidgetBase()
00123 {
00124
00125 }
00126
00127
00128
00129
00130
00131 void KWinInternal::DetectWidgetBase::languageChange()
00132 {
00133 textLabel9->setText( tr2i18n( "Information About Selected Window" ) );
00134 textLabel11->setText( tr2i18n( "Extra role:" ) );
00135 textLabel1->setText( tr2i18n( "Class:" ) );
00136 textLabel3->setText( tr2i18n( "Role:" ) );
00137 type_label->setText( QString::null );
00138 textLabel8->setText( tr2i18n( "Title:" ) );
00139 class_label->setText( QString::null );
00140 role_label->setText( QString::null );
00141 title_label->setText( QString::null );
00142 machine_label->setText( QString::null );
00143 textLabel4->setText( tr2i18n( "Type:" ) );
00144 extrarole_label->setText( QString::null );
00145 textLabel13->setText( tr2i18n( "Machine:" ) );
00146 buttonGroup1->setTitle( QString::null );
00147 use_class->setText( tr2i18n( "Use window &class (whole application)" ) );
00148 QWhatsThis::add( use_class, tr2i18n( "For selecting all windows belonging to a specific application, selecting only window class should usually work." ) );
00149 use_role->setText( tr2i18n( "Use window class and window &role (specific window)" ) );
00150 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." ) );
00151 use_whole_class->setText( tr2i18n( "Use &whole window class (specific window)" ) );
00152 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." ) );
00153 }
00154
00155 #include "detectwidgetbase.moc"