kpilot/kpilot

kpilotConfigDialog_device.cc

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './kpilotConfigDialog_device.ui'
00005 **
00006 ** Created: Thu Mar 29 05:52:08 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 "kpilotConfigDialog_device.h"
00013 
00014 #include <qvariant.h>
00015 #include <qlabel.h>
00016 #include <qlineedit.h>
00017 #include <qcombobox.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021 
00022 /*
00023  *  Constructs a DeviceConfigWidget as a child of 'parent', with the
00024  *  name 'name' and widget flags set to 'f'.
00025  */
00026 DeviceConfigWidget::DeviceConfigWidget( QWidget* parent, const char* name, WFlags fl )
00027     : QWidget( parent, name, fl )
00028 {
00029     if ( !name )
00030     setName( "DeviceForm" );
00031     DeviceFormLayout = new QGridLayout( this, 1, 1, 0, 6, "DeviceFormLayout"); 
00032 
00033     TextLabel1 = new QLabel( this, "TextLabel1" );
00034 
00035     DeviceFormLayout->addWidget( TextLabel1, 0, 0 );
00036 
00037     fPilotDevice = new QLineEdit( this, "fPilotDevice" );
00038 
00039     DeviceFormLayout->addMultiCellWidget( fPilotDevice, 0, 0, 1, 2 );
00040 
00041     TextLabel4 = new QLabel( this, "TextLabel4" );
00042 
00043     DeviceFormLayout->addWidget( TextLabel4, 1, 0 );
00044 
00045     fUserName = new QLineEdit( this, "fUserName" );
00046 
00047     DeviceFormLayout->addMultiCellWidget( fUserName, 4, 4, 1, 2 );
00048     spacer1 = new QSpacerItem( 20, 90, QSizePolicy::Minimum, QSizePolicy::Expanding );
00049     DeviceFormLayout->addItem( spacer1, 5, 2 );
00050 
00051     fPilotSpeed = new QComboBox( FALSE, this, "fPilotSpeed" );
00052 
00053     DeviceFormLayout->addWidget( fPilotSpeed, 1, 1 );
00054 
00055     textLabel1 = new QLabel( this, "textLabel1" );
00056 
00057     DeviceFormLayout->addWidget( textLabel1, 3, 0 );
00058 
00059     TextLabel2 = new QLabel( this, "TextLabel2" );
00060 
00061     DeviceFormLayout->addWidget( TextLabel2, 4, 0 );
00062 
00063     fPilotEncoding = new QComboBox( FALSE, this, "fPilotEncoding" );
00064     fPilotEncoding->setEditable( TRUE );
00065 
00066     DeviceFormLayout->addMultiCellWidget( fPilotEncoding, 3, 3, 1, 2 );
00067 
00068     textLabel1_2 = new QLabel( this, "textLabel1_2" );
00069 
00070     DeviceFormLayout->addWidget( textLabel1_2, 2, 0 );
00071 
00072     fWorkaround = new QComboBox( FALSE, this, "fWorkaround" );
00073 
00074     DeviceFormLayout->addMultiCellWidget( fWorkaround, 2, 2, 1, 2 );
00075     languageChange();
00076     resize( QSize(383, 334).expandedTo(minimumSizeHint()) );
00077     clearWState( WState_Polished );
00078 
00079     // buddies
00080     TextLabel1->setBuddy( fPilotDevice );
00081     TextLabel4->setBuddy( fPilotSpeed );
00082     textLabel1->setBuddy( fPilotEncoding );
00083     TextLabel2->setBuddy( fUserName );
00084     textLabel1_2->setBuddy( fWorkaround );
00085 }
00086 
00087 /*
00088  *  Destroys the object and frees any allocated resources
00089  */
00090 DeviceConfigWidget::~DeviceConfigWidget()
00091 {
00092     // no need to delete child widgets, Qt does it all for us
00093 }
00094 
00095 /*
00096  *  Sets the strings of the subwidgets using the current
00097  *  language.
00098  */
00099 void DeviceConfigWidget::languageChange()
00100 {
00101     setCaption( tr2i18n( "KPilot Options" ) );
00102     TextLabel1->setText( tr2i18n( "Pilot &device:" ) );
00103     QWhatsThis::add( TextLabel1, tr2i18n( "<qt>Enter the device the Pilot is attached to (for instance a serial or USB port) here. You can also use <i>/dev/pilot</i>, and make that a symlink to the correct device. You need write permission to successfully synchronize with the handheld.</qt>" ) );
00104     QWhatsThis::add( fPilotDevice, tr2i18n( "<qt>Enter the device the Pilot is attached to (for instance a serial or USB port) here. You can also use <i>/dev/pilot</i>, and make that a symlink to the correct device. You need write permission to successfully synchronize with the handheld.</qt>" ) );
00105     TextLabel4->setText( tr2i18n( "&Speed:" ) );
00106     QWhatsThis::add( TextLabel4, tr2i18n( "<qt>Select the speed of the serial connection to your handheld here. This has no meaning for USB devices. For an older model, choose 9600. Newer models may be able to handle speeds up to the maximum listed, 115200. You can experiment with the connection speed: the manual suggests starting at a speed of 19200 and trying faster speeds to see if they work.</qt>" ) );
00107     QWhatsThis::add( fUserName, tr2i18n( "<qt>Enter your name here, as it appears in the Pilot's &quot;Owner&quot; setting.</qt>" ) );
00108     fPilotSpeed->clear();
00109     fPilotSpeed->insertItem( tr2i18n( "9600" ) );
00110     fPilotSpeed->insertItem( tr2i18n( "19200" ) );
00111     fPilotSpeed->insertItem( tr2i18n( "38400" ) );
00112     fPilotSpeed->insertItem( tr2i18n( "57600" ) );
00113     fPilotSpeed->insertItem( tr2i18n( "115200" ) );
00114     QWhatsThis::add( fPilotSpeed, tr2i18n( "<qt>Select the speed of the serial connection to your handheld here. This has no meaning for USB devices. For an older model, choose 9600. Newer models may be able to handle speeds up to the maximum listed, 115200. You can experiment with the connection speed: the manual suggests starting at a speed of 19200 and trying faster speeds to see if they work.</qt>" ) );
00115     textLabel1->setText( tr2i18n( "En&coding:" ) );
00116     QWhatsThis::add( textLabel1, tr2i18n( "<qt>PalmOS devices are available in many different languages. If your device uses a different encoding than ISO-latin1 (ISO8859-1), select the correct encoding here, in order to display special characters correctly.</qt>" ) );
00117     TextLabel2->setText( tr2i18n( "Pilot &user:" ) );
00118     QWhatsThis::add( TextLabel2, tr2i18n( "<qt>Enter your name here, as it appears in the Pilot's &quot;Owner&quot; setting.</qt>" ) );
00119     QWhatsThis::add( fPilotEncoding, tr2i18n( "<qt>PalmOS devices are available in many different languages. If your device uses a different encoding than ISO-latin1 (ISO8859-1), select the correct encoding here, in order to display special characters correctly.</qt>" ) );
00120     textLabel1_2->setText( tr2i18n( "&Workarounds:" ) );
00121     fWorkaround->clear();
00122     fWorkaround->insertItem( tr2i18n( "None" ) );
00123     fWorkaround->insertItem( tr2i18n( "Zire 31, 72, Tungsten T5" ) );
00124     QWhatsThis::add( fWorkaround, QString::null );
00125 }
00126 
00127 #include "kpilotConfigDialog_device.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys