00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "kpilotConfigDialog_device.h"
00012
00013 #include <qvariant.h>
00014 #include <qlabel.h>
00015 #include <qlineedit.h>
00016 #include <qcombobox.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020
00021
00022
00023
00024
00025 DeviceConfigWidget::DeviceConfigWidget( QWidget* parent, const char* name, WFlags fl )
00026 : QWidget( parent, name, fl )
00027 {
00028 if ( !name )
00029 setName( "DeviceForm" );
00030 DeviceFormLayout = new QGridLayout( this, 1, 1, 0, 6, "DeviceFormLayout");
00031
00032 TextLabel1 = new QLabel( this, "TextLabel1" );
00033
00034 DeviceFormLayout->addWidget( TextLabel1, 0, 0 );
00035
00036 fPilotDevice = new QLineEdit( this, "fPilotDevice" );
00037
00038 DeviceFormLayout->addMultiCellWidget( fPilotDevice, 0, 0, 1, 2 );
00039
00040 TextLabel4 = new QLabel( this, "TextLabel4" );
00041
00042 DeviceFormLayout->addWidget( TextLabel4, 1, 0 );
00043
00044 fUserName = new QLineEdit( this, "fUserName" );
00045
00046 DeviceFormLayout->addMultiCellWidget( fUserName, 4, 4, 1, 2 );
00047 spacer1 = new QSpacerItem( 20, 90, QSizePolicy::Minimum, QSizePolicy::Expanding );
00048 DeviceFormLayout->addItem( spacer1, 5, 2 );
00049
00050 fPilotSpeed = new QComboBox( FALSE, this, "fPilotSpeed" );
00051
00052 DeviceFormLayout->addWidget( fPilotSpeed, 1, 1 );
00053
00054 textLabel1 = new QLabel( this, "textLabel1" );
00055
00056 DeviceFormLayout->addWidget( textLabel1, 3, 0 );
00057
00058 TextLabel2 = new QLabel( this, "TextLabel2" );
00059
00060 DeviceFormLayout->addWidget( TextLabel2, 4, 0 );
00061
00062 fPilotEncoding = new QComboBox( FALSE, this, "fPilotEncoding" );
00063 fPilotEncoding->setEditable( TRUE );
00064
00065 DeviceFormLayout->addMultiCellWidget( fPilotEncoding, 3, 3, 1, 2 );
00066
00067 textLabel1_2 = new QLabel( this, "textLabel1_2" );
00068
00069 DeviceFormLayout->addWidget( textLabel1_2, 2, 0 );
00070
00071 fWorkaround = new QComboBox( FALSE, this, "fWorkaround" );
00072
00073 DeviceFormLayout->addMultiCellWidget( fWorkaround, 2, 2, 1, 2 );
00074 languageChange();
00075 resize( QSize(383, 334).expandedTo(minimumSizeHint()) );
00076 clearWState( WState_Polished );
00077
00078
00079 TextLabel1->setBuddy( fPilotDevice );
00080 TextLabel4->setBuddy( fPilotSpeed );
00081 textLabel1->setBuddy( fPilotEncoding );
00082 TextLabel2->setBuddy( fUserName );
00083 textLabel1_2->setBuddy( fWorkaround );
00084 }
00085
00086
00087
00088
00089 DeviceConfigWidget::~DeviceConfigWidget()
00090 {
00091
00092 }
00093
00094
00095
00096
00097
00098 void DeviceConfigWidget::languageChange()
00099 {
00100 setCaption( tr2i18n( "KPilot Options" ) );
00101 TextLabel1->setText( tr2i18n( "Pilot &device:" ) );
00102 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>" ) );
00103 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>" ) );
00104 TextLabel4->setText( tr2i18n( "&Speed:" ) );
00105 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>" ) );
00106 QWhatsThis::add( fUserName, tr2i18n( "<qt>Enter your name here, as it appears in the Pilot's "Owner" setting.</qt>" ) );
00107 fPilotSpeed->clear();
00108 fPilotSpeed->insertItem( tr2i18n( "9600" ) );
00109 fPilotSpeed->insertItem( tr2i18n( "19200" ) );
00110 fPilotSpeed->insertItem( tr2i18n( "38400" ) );
00111 fPilotSpeed->insertItem( tr2i18n( "57600" ) );
00112 fPilotSpeed->insertItem( tr2i18n( "115200" ) );
00113 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>" ) );
00114 textLabel1->setText( tr2i18n( "En&coding:" ) );
00115 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>" ) );
00116 TextLabel2->setText( tr2i18n( "Pilot &user:" ) );
00117 QWhatsThis::add( TextLabel2, tr2i18n( "<qt>Enter your name here, as it appears in the Pilot's "Owner" setting.</qt>" ) );
00118 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>" ) );
00119 textLabel1_2->setText( tr2i18n( "&Workarounds:" ) );
00120 fWorkaround->clear();
00121 fWorkaround->insertItem( tr2i18n( "None" ) );
00122 fWorkaround->insertItem( tr2i18n( "Zire 31, 72, Tungsten T5" ) );
00123 QWhatsThis::add( fWorkaround, QString::null );
00124 }
00125
00126 #include "kpilotConfigDialog_device.moc"