00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "kpilotConfigWizard_user.h"
00013
00014 #include <qvariant.h>
00015 #include <qlabel.h>
00016 #include <qgroupbox.h>
00017 #include <qpushbutton.h>
00018 #include <qlineedit.h>
00019 #include <qcheckbox.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028 ConfigWizard_base2::ConfigWizard_base2( QWidget* parent, const char* name, WFlags fl )
00029 : QWidget( parent, name, fl )
00030 {
00031 if ( !name )
00032 setName( "ConfigWizard_base2" );
00033 ConfigWizard_base2Layout = new QVBoxLayout( this, 11, 6, "ConfigWizard_base2Layout");
00034
00035 textLabel1 = new QLabel( this, "textLabel1" );
00036 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00037 ConfigWizard_base2Layout->addWidget( textLabel1 );
00038
00039 textLabel5 = new QLabel( this, "textLabel5" );
00040 textLabel5->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00041 ConfigWizard_base2Layout->addWidget( textLabel5 );
00042
00043 groupBox2 = new QGroupBox( this, "groupBox2" );
00044 groupBox2->setColumnLayout(0, Qt::Vertical );
00045 groupBox2->layout()->setSpacing( 6 );
00046 groupBox2->layout()->setMargin( 11 );
00047 groupBox2Layout = new QGridLayout( groupBox2->layout() );
00048 groupBox2Layout->setAlignment( Qt::AlignTop );
00049
00050 textLabel3_2 = new QLabel( groupBox2, "textLabel3_2" );
00051
00052 groupBox2Layout->addWidget( textLabel3_2, 1, 0 );
00053
00054 fProbeButton = new QPushButton( groupBox2, "fProbeButton" );
00055
00056 groupBox2Layout->addMultiCellWidget( fProbeButton, 2, 2, 0, 1 );
00057
00058 fDeviceName = new QLineEdit( groupBox2, "fDeviceName" );
00059
00060 groupBox2Layout->addWidget( fDeviceName, 1, 1 );
00061
00062 fUserName = new QLineEdit( groupBox2, "fUserName" );
00063
00064 groupBox2Layout->addWidget( fUserName, 0, 1 );
00065
00066 textLabel2_2 = new QLabel( groupBox2, "textLabel2_2" );
00067
00068 groupBox2Layout->addWidget( textLabel2_2, 0, 0 );
00069 ConfigWizard_base2Layout->addWidget( groupBox2 );
00070
00071 fPilotRunningPermanently = new QCheckBox( this, "fPilotRunningPermanently" );
00072 fPilotRunningPermanently->setChecked( TRUE );
00073 ConfigWizard_base2Layout->addWidget( fPilotRunningPermanently );
00074 spacer4 = new QSpacerItem( 20, 70, QSizePolicy::Minimum, QSizePolicy::Expanding );
00075 ConfigWizard_base2Layout->addItem( spacer4 );
00076 languageChange();
00077 resize( QSize(512, 298).expandedTo(minimumSizeHint()) );
00078 clearWState( WState_Polished );
00079
00080
00081 setTabOrder( fUserName, fDeviceName );
00082 setTabOrder( fDeviceName, fProbeButton );
00083 setTabOrder( fProbeButton, fPilotRunningPermanently );
00084
00085
00086 textLabel3_2->setBuddy( fDeviceName );
00087 textLabel2_2->setBuddy( fUserName );
00088 }
00089
00090
00091
00092
00093 ConfigWizard_base2::~ConfigWizard_base2()
00094 {
00095
00096 }
00097
00098
00099
00100
00101
00102 void ConfigWizard_base2::languageChange()
00103 {
00104 textLabel1->setText( tr2i18n( "This wizard will help you configure KPilot." ) );
00105 textLabel5->setText( tr2i18n( "As a first step, we need to determine the user name and how the handheld is connected to the computer." ) );
00106 groupBox2->setTitle( tr2i18n( "Handheld && User Name" ) );
00107 QWhatsThis::add( groupBox2, tr2i18n( "<p>You can either let KPilot detect these values automatically (for this you need your handheld ready and connected to the PC) or enter them manually.</p>\n"
00108 "<p>Please enter the username exactly as set on the handheld. </p>\n"
00109 "<p>If setting the device type manually (i.e., if automatic detection did not work for you), please look below for tips on choosing the right device name. {0...n} means a number from 0 up to a very large number, though usually just 255.\n"
00110 "<p>\n"
00111 "Serial Port: an old method of connection, used primarily by the original line of Palm Pilots, and various Palm-based cellphones. Device name will look like /dev/ttyS{0...n} (Linux) or /dev/cuaa{0...n} (FreeBSD).</p>\n"
00112 "<p>\n"
00113 "USB Port: A newer style of connection, used by most newer Palms, Handsprings, and Sony Clies. Device name will look like /dev/ttyUSB{0...n} or /dev/usb/tts/{0...n} (Linux) or /dev/ucom{0...n} (FreeBSD). On Linux, definitely check both 0 and 1: newer devices tend to use 1; older devices tend to use 0.</p>\n"
00114 "<p>\n"
00115 "Infrared: (pronounced infra-red) is a relatively slow connection type used solely as a last resort. Device name will be /dev/ircomm0 or /dev/ttyS{0...n} (Linux), or /dev/sio{0...n} (FreeBSD).</p>\n"
00116 "<p>\n"
00117 "Bluetooth: A new connection method, this is used almost exclusively on new, high-end devices, like the Tungsten T3 or the Zire 72. Device name will be /dev/usb/ttub/{0...n} or /dev/ttyUB{0...n} (Linux), or /dev/ttyp{0...n} (FreeBSD).</p>\n"
00118 "<p>\n"
00119 "Network: This has not been tested by any of the KPilot developers themselves (hardware donations always accepted!), but it has been reported that setting the device to \"net:any\" will work for network-enabled devices. However, this has also been known to lock KPilot up when doing anything other than just syncing. Use it with caution.\n"
00120 "</p>" ) );
00121 textLabel3_2->setText( tr2i18n( "&Device:" ) );
00122 QWhatsThis::add( textLabel3_2, 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. Use the button below to automatically detect the device. You need write permission to successfully synchronize with the handheld.</qt>" ) );
00123 fProbeButton->setText( tr2i18n( "&Automatically Detect Handheld && User Name" ) );
00124 QWhatsThis::add( fProbeButton, tr2i18n( "<qt>Click this button to open the detection dialog. The wizard will try to automatically find and display the correct device and username for your handheld. If the wizard cannot retrieve this information, check if you have write permission for the device.</qt>" ) );
00125 fDeviceName->setText( tr2i18n( "/dev/pilot" ) );
00126 QWhatsThis::add( fDeviceName, 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. Use the button below to automatically detect the device. You need write permission to successfully synchronize with the handheld.</qt>" ) );
00127 QWhatsThis::add( fUserName, tr2i18n( "<qt>Enter your username here, as it appears in the Pilot's "Owner" setting, or use the button below to automatically detect it.</qt>" ) );
00128 textLabel2_2->setText( tr2i18n( "User na&me:" ) );
00129 QWhatsThis::add( textLabel2_2, tr2i18n( "<qt>Enter your username here, as it appears in the Pilot's "Owner" setting, or use the button below to automatically detect it.</qt>" ) );
00130 fPilotRunningPermanently->setText( tr2i18n( "&Start KPilot at login" ) );
00131 QWhatsThis::add( fPilotRunningPermanently, tr2i18n( "<qt>Check this box to make the kpilot daemon load when you first log in until you log out. That means (in theory), that you should not have to do anything other than connect your handheld and push \"sync\", and kpilot will appear and magically do your bidding. </qt>" ) );
00132 }
00133
00134 #include "kpilotConfigWizard_user.moc"