00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "kpilotConfigWizard_user.h"
00012
00013 #include <qvariant.h>
00014 #include <qlabel.h>
00015 #include <qgroupbox.h>
00016 #include <qpushbutton.h>
00017 #include <qlineedit.h>
00018 #include <qcheckbox.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022
00023
00024
00025
00026
00027 ConfigWizard_base2::ConfigWizard_base2( QWidget* parent, const char* name, WFlags fl )
00028 : QWidget( parent, name, fl )
00029 {
00030 if ( !name )
00031 setName( "ConfigWizard_base2" );
00032 ConfigWizard_base2Layout = new QVBoxLayout( this, 11, 6, "ConfigWizard_base2Layout");
00033
00034 textLabel1 = new QLabel( this, "textLabel1" );
00035 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00036 ConfigWizard_base2Layout->addWidget( textLabel1 );
00037
00038 textLabel5 = new QLabel( this, "textLabel5" );
00039 textLabel5->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00040 ConfigWizard_base2Layout->addWidget( textLabel5 );
00041
00042 groupBox2 = new QGroupBox( this, "groupBox2" );
00043 groupBox2->setColumnLayout(0, Qt::Vertical );
00044 groupBox2->layout()->setSpacing( 6 );
00045 groupBox2->layout()->setMargin( 11 );
00046 groupBox2Layout = new QGridLayout( groupBox2->layout() );
00047 groupBox2Layout->setAlignment( Qt::AlignTop );
00048
00049 textLabel3_2 = new QLabel( groupBox2, "textLabel3_2" );
00050
00051 groupBox2Layout->addWidget( textLabel3_2, 1, 0 );
00052
00053 fProbeButton = new QPushButton( groupBox2, "fProbeButton" );
00054
00055 groupBox2Layout->addMultiCellWidget( fProbeButton, 2, 2, 0, 1 );
00056
00057 fDeviceName = new QLineEdit( groupBox2, "fDeviceName" );
00058
00059 groupBox2Layout->addWidget( fDeviceName, 1, 1 );
00060
00061 fUserName = new QLineEdit( groupBox2, "fUserName" );
00062
00063 groupBox2Layout->addWidget( fUserName, 0, 1 );
00064
00065 textLabel2_2 = new QLabel( groupBox2, "textLabel2_2" );
00066
00067 groupBox2Layout->addWidget( textLabel2_2, 0, 0 );
00068 ConfigWizard_base2Layout->addWidget( groupBox2 );
00069
00070 fPilotRunningPermanently = new QCheckBox( this, "fPilotRunningPermanently" );
00071 fPilotRunningPermanently->setChecked( TRUE );
00072 ConfigWizard_base2Layout->addWidget( fPilotRunningPermanently );
00073 spacer4 = new QSpacerItem( 20, 70, QSizePolicy::Minimum, QSizePolicy::Expanding );
00074 ConfigWizard_base2Layout->addItem( spacer4 );
00075 languageChange();
00076 resize( QSize(512, 298).expandedTo(minimumSizeHint()) );
00077 clearWState( WState_Polished );
00078
00079
00080 setTabOrder( fUserName, fDeviceName );
00081 setTabOrder( fDeviceName, fProbeButton );
00082 setTabOrder( fProbeButton, fPilotRunningPermanently );
00083
00084
00085 textLabel3_2->setBuddy( fDeviceName );
00086 textLabel2_2->setBuddy( fUserName );
00087 }
00088
00089
00090
00091
00092 ConfigWizard_base2::~ConfigWizard_base2()
00093 {
00094
00095 }
00096
00097
00098
00099
00100
00101 void ConfigWizard_base2::languageChange()
00102 {
00103 textLabel1->setText( tr2i18n( "This wizard will help you configure KPilot." ) );
00104 textLabel5->setText( tr2i18n( "As a first step, we need to determine the user name and how the handheld is connected to the computer." ) );
00105 groupBox2->setTitle( tr2i18n( "Handheld && User Name" ) );
00106 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"
00107 "<p>Please enter the username exactly as set on the handheld. </p>\n"
00108 "<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"
00109 "<p>\n"
00110 "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"
00111 "<p>\n"
00112 "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"
00113 "<p>\n"
00114 "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"
00115 "<p>\n"
00116 "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"
00117 "<p>\n"
00118 "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"
00119 "</p>" ) );
00120 textLabel3_2->setText( tr2i18n( "&Device:" ) );
00121 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>" ) );
00122 fProbeButton->setText( tr2i18n( "&Automatically Detect Handheld && User Name" ) );
00123 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>" ) );
00124 fDeviceName->setText( tr2i18n( "/dev/pilot" ) );
00125 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>" ) );
00126 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>" ) );
00127 textLabel2_2->setText( tr2i18n( "User na&me:" ) );
00128 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>" ) );
00129 fPilotRunningPermanently->setText( tr2i18n( "&Start KPilot at login" ) );
00130 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>" ) );
00131 }
00132
00133 #include "kpilotConfigWizard_user.moc"