kitchensync

kspluckerconfigwidget.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './kspluckerconfigwidget.ui'
00005 **
00006 ** Created: Thu Mar 29 05:59:53 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "kspluckerconfigwidget.h"
00013 
00014 #include <qvariant.h>
00015 #include <kfiledialog.h>
00016 #include <qlistbox.h>
00017 #include <qpushbutton.h>
00018 #include <qgroupbox.h>
00019 #include <qlabel.h>
00020 #include <kurlrequester.h>
00021 #include <klistbox.h>
00022 #include <kpushbutton.h>
00023 #include <qlayout.h>
00024 #include <qtooltip.h>
00025 #include <qwhatsthis.h>
00026 #include "kurlrequester.h"
00027 #include "klineedit.h"
00028 #include "kpushbutton.h"
00029 #include "klistbox.h"
00030 #include "pluckerconfig.h"
00031 #include "pluckerprocesshandler.h"
00032 #include "./kspluckerconfigwidget.ui.h"
00033 
00034 /*
00035  *  Constructs a KSPluckerConfigWidget as a child of 'parent', with the
00036  *  name 'name' and widget flags set to 'f'.
00037  */
00038 KSPluckerConfigWidget::KSPluckerConfigWidget( QWidget* parent, const char* name, WFlags fl )
00039     : QWidget( parent, name, fl )
00040 {
00041     if ( !name )
00042     setName( "KSPluckerConfigWidget" );
00043     KSPluckerConfigWidgetLayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "KSPluckerConfigWidgetLayout"); 
00044 
00045     groupBox1 = new QGroupBox( this, "groupBox1" );
00046     groupBox1->setColumnLayout(0, Qt::Vertical );
00047     groupBox1->layout()->setSpacing( KDialog::spacingHint() );
00048     groupBox1->layout()->setMargin( KDialog::marginHint() );
00049     groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
00050     groupBox1Layout->setAlignment( Qt::AlignTop );
00051 
00052     layout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout1"); 
00053 
00054     textLabel1 = new QLabel( groupBox1, "textLabel1" );
00055     layout1->addWidget( textLabel1 );
00056     spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00057     layout1->addItem( spacer1 );
00058 
00059     urlJava = new KURLRequester( groupBox1, "urlJava" );
00060     layout1->addWidget( urlJava );
00061     groupBox1Layout->addLayout( layout1 );
00062 
00063     layout3 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout3"); 
00064 
00065     textLabel2 = new QLabel( groupBox1, "textLabel2" );
00066     layout3->addWidget( textLabel2 );
00067     spacer2 = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00068     layout3->addItem( spacer2 );
00069 
00070     urlPlucker = new KURLRequester( groupBox1, "urlPlucker" );
00071     layout3->addWidget( urlPlucker );
00072     groupBox1Layout->addLayout( layout3 );
00073     KSPluckerConfigWidgetLayout->addWidget( groupBox1 );
00074 
00075     groupBox2 = new QGroupBox( this, "groupBox2" );
00076     groupBox2->setColumnLayout(0, Qt::Vertical );
00077     groupBox2->layout()->setSpacing( KDialog::spacingHint() );
00078     groupBox2->layout()->setMargin( KDialog::marginHint() );
00079     groupBox2Layout = new QGridLayout( groupBox2->layout() );
00080     groupBox2Layout->setAlignment( Qt::AlignTop );
00081 
00082     lstBoxFiles = new KListBox( groupBox2, "lstBoxFiles" );
00083 
00084     groupBox2Layout->addWidget( lstBoxFiles, 0, 0 );
00085     spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
00086     groupBox2Layout->addItem( spacer4, 0, 1 );
00087 
00088     layout4 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout4"); 
00089     spacer3 = new QSpacerItem( 20, 70, QSizePolicy::Minimum, QSizePolicy::Expanding );
00090     layout4->addItem( spacer3 );
00091 
00092     btnAdd = new KPushButton( groupBox2, "btnAdd" );
00093     layout4->addWidget( btnAdd );
00094 
00095     btnRemove = new KPushButton( groupBox2, "btnRemove" );
00096     layout4->addWidget( btnRemove );
00097 
00098     btnConfigure = new KPushButton( groupBox2, "btnConfigure" );
00099     layout4->addWidget( btnConfigure );
00100 
00101     groupBox2Layout->addLayout( layout4, 0, 2 );
00102     KSPluckerConfigWidgetLayout->addWidget( groupBox2 );
00103     languageChange();
00104     resize( QSize(382, 316).expandedTo(minimumSizeHint()) );
00105     clearWState( WState_Polished );
00106 
00107     // signals and slots connections
00108     connect( btnAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
00109     connect( btnRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
00110     connect( btnConfigure, SIGNAL( clicked() ), this, SLOT( slotConfigureJXL() ) );
00111     init();
00112 }
00113 
00114 /*
00115  *  Destroys the object and frees any allocated resources
00116  */
00117 KSPluckerConfigWidget::~KSPluckerConfigWidget()
00118 {
00119     // no need to delete child widgets, Qt does it all for us
00120 }
00121 
00122 /*
00123  *  Sets the strings of the subwidgets using the current
00124  *  language.
00125  */
00126 void KSPluckerConfigWidget::languageChange()
00127 {
00128     groupBox1->setTitle( tr2i18n( "Java Configuration" ) );
00129     textLabel1->setText( tr2i18n( "Path to the Java executable:" ) );
00130     textLabel2->setText( tr2i18n( "Path to the JPlucker directory:" ) );
00131     groupBox2->setTitle( tr2i18n( "Plucker Files" ) );
00132     btnAdd->setText( tr2i18n( "&Add" ) );
00133     btnRemove->setText( tr2i18n( "&Remove" ) );
00134     btnConfigure->setText( tr2i18n( "&Configure" ) );
00135 }
00136 
00137 #include "kspluckerconfigwidget.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys