author | treke <treke> | 2002-10-25 03:11:05 (UTC) |
---|---|---|
committer | treke <treke> | 2002-10-25 03:11:05 (UTC) |
commit | ff9b13c8c312d0a385770d7742530e526e19117e (patch) (side-by-side diff) | |
tree | 786fa405daf0a6693ab91c3b91850de328da66c2 | |
parent | a8b95086dd331c67c728a346f56416c355142758 (diff) | |
download | opie-ff9b13c8c312d0a385770d7742530e526e19117e.zip opie-ff9b13c8c312d0a385770d7742530e526e19117e.tar.gz opie-ff9b13c8c312d0a385770d7742530e526e19117e.tar.bz2 |
Added QWhatsThis's
-rw-r--r-- | noncore/comm/keypebble/kvnc.cpp | 4 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncbookmarkdlgbase.ui | 6 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncconndlg.cpp | 2 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncconndlgbase.ui | 42 |
4 files changed, 49 insertions, 5 deletions
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp index b173004..ef57366 100644 --- a/noncore/comm/keypebble/kvnc.cpp +++ b/noncore/comm/keypebble/kvnc.cpp @@ -1,203 +1,203 @@ #include <qiconset.h> #include <qdialog.h> #include <qpixmap.h> #include <qdom.h> #include <qaction.h> #include <qpe/qpemenubar.h> #include <qstatusbar.h> #include <qpopupmenu.h> #include <qpushbutton.h> #include <qpe/qpetoolbar.h> #include <qtimer.h> #include <qmessagebox.h> #include <qspinbox.h> #include <qlistbox.h> #include <qlineedit.h> #include <qpe/qpeapplication.h> #include <qpe/global.h> #include <qpe/qpetoolbar.h> #include <qpe/resource.h> #include <assert.h> #include "kvnc.h" #include "krfbcanvas.h" #include "krfbconnection.h" #include "kvncconndlg.h" #include "krfbserver.h" static int u_id = 1; static int get_unique_id() { return u_id++; } /* XPM */ static char * menu_xpm[] = { "12 12 5 1", " c None", ". c #000000", "+ c #FFFDAD", "@ c #FFFF00", "# c #E5E100", " ", " ", " ......... ", " .+++++++. ", " .+@@@@#. ", " .+@@@#. ", " .+@@#. ", " .+@#. ", " .+#. ", " .+. ", " .. ", " "}; const int StatusTextId = 0; -KVNC::KVNC( const char *name ) : QMainWindow( 0, name ) +KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp) { setCaption( tr("VNC Viewer") ); fullscreen = false; stack = new QWidgetStack( this ); setCentralWidget( stack ); bookmarkSelector=new KVNCBookmarkDlg(); stack->addWidget(bookmarkSelector,get_unique_id()); stack->raiseWidget( bookmarkSelector ); canvas = new KRFBCanvas( stack, "canvas" ); stack->addWidget(canvas,get_unique_id()); setCentralWidget( stack ); connect( bookmarkSelector->bookmarkList, SIGNAL(doubleClicked(QListBoxItem *)), this, SLOT(openConnection(QListBoxItem *)) ); connect( canvas->connection(), SIGNAL(statusChanged(const QString &)), this, SLOT(statusMessage(const QString &)) ); connect( canvas->connection(), SIGNAL(error(const QString &)), this, SLOT(error(const QString &)) ); connect( canvas->connection(), SIGNAL(connected()), this, SLOT(connected()) ); connect( canvas->connection(), SIGNAL(loggedIn()), this, SLOT(loggedIn()) ); connect( canvas->connection(), SIGNAL(disconnected()), this, SLOT(disconnected()) ); setupActions(); cornerButton = new QPushButton( this ); cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); connect( cornerButton, SIGNAL(pressed()), this, SLOT(showMenu()) ); canvas->setCornerWidget( cornerButton ); stack->raiseWidget( bookmarkSelector ); bar= new QToolBar( this ); setToolBarsMovable( false ); setRightJustification(false); QAction *n = new QAction( tr( "New Connection" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); connect( n, SIGNAL( activated() ), this, SLOT( newConnection() ) ); n->addTo( bar ); - QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "edit" ), + QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); connect( o, SIGNAL( activated() ), this, SLOT( openConnection() ) ); o->addTo( bar ); QAction *d = new QAction( tr( "Delete Bookmark" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); connect( d, SIGNAL( activated() ), this, SLOT( deleteBookmark() ) ); d->addTo( bar ); } KVNC::~KVNC() { } void KVNC::newConnection() { curServer=new KRFBServer; KVNCConnDlg dlg( curServer,this); dlg.showMaximized(); if ( dlg.exec()) { if (!curServer->name.isEmpty()) bookmarkSelector->addBookmark(curServer); canvas->openConnection(*curServer); } else curServer=0; } void KVNC::openConnection( QString name) { curServer=bookmarkSelector->getServer(name); if (curServer) { KVNCConnDlg dlg( curServer,this); dlg.showMaximized(); if ( dlg.exec() ) { canvas->openConnection(*curServer); bookmarkSelector->writeBookmarks(); } else curServer=0; } } void KVNC::openConnection( void ) { openConnection( bookmarkSelector->selectedBookmark()); } void KVNC::openConnection( QListBoxItem * item) { openConnection(item->text()); } void KVNC::setupActions() { cornerMenu = new QPopupMenu( this ); fullScreenAction = new QAction( tr("Full Screen"), QString::null, 0, 0 ); connect( fullScreenAction, SIGNAL(activated()), this, SLOT( toggleFullScreen() ) ); fullScreenAction->addTo( cornerMenu ); fullScreenAction->setEnabled( false ); ctlAltDelAction = new QAction( tr("Send Contrl-Alt-Delete"), QString::null, 0, 0 ); connect( ctlAltDelAction, SIGNAL(activated()), canvas, SLOT( sendCtlAltDel() ) ); ctlAltDelAction->addTo( cornerMenu ); ctlAltDelAction->setEnabled( false ); disconnectAction = new QAction( tr("Disconnect"), QString::null, 0, 0 ); connect( disconnectAction, SIGNAL(activated()), this, SLOT( closeConnection() ) ); disconnectAction->addTo( cornerMenu ); disconnectAction->setEnabled( false ); } void KVNC::toggleFullScreen() { if ( fullscreen ) { canvas->releaseKeyboard(); canvas->reparent( stack, 0, QPoint(0,0), false ); canvas->setFrameStyle( QFrame::Panel | QFrame::Sunken ); setCentralWidget( stack ); stack->addWidget(canvas,get_unique_id()); stack->raiseWidget(canvas); canvas->show(); stack->show(); fullScreenAction->setText( tr("Full Screen") ); } else { canvas->setFrameStyle( QFrame::NoFrame ); stack->removeWidget(canvas); canvas->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop, diff --git a/noncore/comm/keypebble/kvncbookmarkdlgbase.ui b/noncore/comm/keypebble/kvncbookmarkdlgbase.ui index 45114cb..69d8a14 100644 --- a/noncore/comm/keypebble/kvncbookmarkdlgbase.ui +++ b/noncore/comm/keypebble/kvncbookmarkdlgbase.ui @@ -1,57 +1,61 @@ <!DOCTYPE UI><UI> <class>KVNCBookmarkDlgBase</class> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>KVNCBookmarkDlgBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>584</width> + <width>580</width> <height>480</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Bookmarks</string> </property> <vbox> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QListBox</class> <property stdset="1"> <name>name</name> <cstring>bookmarkList</cstring> </property> + <property> + <name>whatsThis</name> + <string>Choose a bookmark that you would like to open</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout1</cstring> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> </hbox> </widget> </vbox> </widget> </UI> diff --git a/noncore/comm/keypebble/kvncconndlg.cpp b/noncore/comm/keypebble/kvncconndlg.cpp index 2f073f8..cd55bb0 100644 --- a/noncore/comm/keypebble/kvncconndlg.cpp +++ b/noncore/comm/keypebble/kvncconndlg.cpp @@ -1,94 +1,94 @@ #include <qframe.h> #include <qvbox.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qspinbox.h> #include <qlabel.h> #include <qlayout.h> #include <qwhatsthis.h> #include <qapplication.h> #include <qlineedit.h> #include <qpushbutton.h> #include "krfbserver.h" #include "kvncconndlg.h" KVNCConnDlg::KVNCConnDlg( KRFBServer *options, QWidget *parent, char *name, bool modal ) -: KVNCConnDlgBase( parent, name, modal ) +: KVNCConnDlgBase( parent, name, modal, WStyle_ContextHelp ) { this->options=options; tmpOptions=*options; serverHostname->setText(options->hostname); serverDisplay->setValue(options->display); serverPassword->setText(options->password); serverBookmark->setText(options->name); hex->setChecked( options->hexTile ); corre->setChecked( options->corre ); rre->setChecked( options->rre ); copyRect->setChecked( options->copyrect ); for (int i=0; i < scaleFactor->count(); ++i) { if (scaleFactor->text(i).toInt()==tmpOptions.scaleFactor) { scaleFactor->setCurrentItem(i); } } // TODO hex->setEnabled( false ); corre->setEnabled( false ); rre->setEnabled( false ); // /TODO deIconify->setChecked( options->deIconify ); bit->setChecked( options->colors256 ); shared->setChecked( options->shared ); timeBox->setValue( options->updateRate ); serverPassword->setEchoMode(QLineEdit::Password); connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) ); } KVNCConnDlg::~KVNCConnDlg() { } void KVNCConnDlg::accept() { save(); QDialog::accept(); } void KVNCConnDlg::save() { tmpOptions.hexTile = hex->isChecked(); tmpOptions.corre = corre->isChecked(); tmpOptions.rre = rre->isChecked(); tmpOptions.copyrect = copyRect->isChecked(); tmpOptions.deIconify = deIconify->isChecked(); tmpOptions.colors256 = bit->isChecked(); tmpOptions.shared = shared->isChecked(); tmpOptions.hostname = serverHostname->text(); tmpOptions.password = serverPassword->text(); tmpOptions.display = serverDisplay->value(); tmpOptions.name = serverBookmark->text(); tmpOptions.scaleFactor = scaleFactor->currentText().toInt(); if (!serverBookmark->text().isEmpty()) { if ( options) { *options=tmpOptions; } } } void KVNCConnDlg::showPassword(int show) { if (show) serverPassword->setEchoMode(QLineEdit::Normal); else serverPassword->setEchoMode(QLineEdit::Password); } diff --git a/noncore/comm/keypebble/kvncconndlgbase.ui b/noncore/comm/keypebble/kvncconndlgbase.ui index 42765c1..de3f785 100644 --- a/noncore/comm/keypebble/kvncconndlgbase.ui +++ b/noncore/comm/keypebble/kvncconndlgbase.ui @@ -1,482 +1,522 @@ <!DOCTYPE UI><UI> <class>KVNCConnDlgBase</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>KVNCConnDlgBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>260</width> + <width>256</width> <height>242</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>VNC Viewer Connection</string> </property> <property> <name>layoutMargin</name> </property> <widget> <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>TabWidget3</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> <width>266</width> <height>233</height> </rect> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Server</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget row="2" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>serverPassword</cstring> </property> <property stdset="1"> <name>autoMask</name> <bool>true</bool> </property> <property stdset="1"> <name>echoMode</name> <enum>Password</enum> </property> + <property> + <name>whatsThis</name> + <string>The password of the VNC server</string> + </property> </widget> <widget row="3" column="1" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>togglePassword</cstring> </property> <property stdset="1"> <name>text</name> <string>Show Password</string> </property> + <property> + <name>whatsThis</name> + <string>Toggle obscuring the password</string> + </property> </widget> <widget row="2" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3</cstring> </property> <property stdset="1"> <name>text</name> <string>Password:</string> </property> </widget> <widget row="4" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>serverBookmark</cstring> </property> + <property> + <name>whatsThis</name> + <string>The name of the VNC server</string> + </property> </widget> <widget row="4" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_2</cstring> </property> <property stdset="1"> <name>text</name> <string>Bookmark Name:</string> </property> </widget> <widget row="0" column="1" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>serverHostname</cstring> </property> + <property> + <name>whatsThis</name> + <string>The host name of the VNC server</string> + </property> </widget> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>hostname</cstring> </property> <property stdset="1"> <name>text</name> <string>Host Name:</string> </property> </widget> <widget row="1" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_2</cstring> </property> <property stdset="1"> <name>text</name> <string>Display Number:</string> </property> </widget> <widget row="1" column="1" rowspan="1" colspan="2" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>serverDisplay</cstring> </property> <property stdset="1"> <name>maxValue</name> <number>500</number> </property> <property stdset="1"> <name>minValue</name> <number>0</number> </property> <property stdset="1"> <name>value</name> <number>0</number> </property> + <property> + <name>whatsThis</name> + <string>The display number of the VNC server</string> + </property> </widget> <spacer row="5" column="2" > <property> <name>name</name> <cstring>Spacer2</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </grid> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Options</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1</cstring> </property> <property stdset="1"> <name>text</name> <string>Check for screen updates every:</string> </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout2</cstring> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>timeBox</cstring> </property> <property stdset="1"> <name>maxValue</name> <number>500</number> </property> <property stdset="1"> <name>minValue</name> <number>1</number> </property> + <property> + <name>whatsThis</name> + <string>Delay between requesting updates from the server</string> + </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2</cstring> </property> <property stdset="1"> <name>text</name> <string>Milliseconds</string> </property> </widget> </hbox> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>bit</cstring> </property> <property stdset="1"> <name>text</name> <string>Request 8-bit session</string> </property> + <property> + <name>whatsThis</name> + <string>Request that the VNC server transfer 8 bit color</string> + </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>deIconify</cstring> </property> <property stdset="1"> <name>text</name> <string>Raise on bell</string> </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>shared</cstring> </property> <property stdset="1"> <name>text</name> <string>Request shared session</string> </property> + <property> + <name>whatsThis</name> + <string>Allow other users to connect to the VNC server</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout3</cstring> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QComboBox</class> <item> <property> <name>text</name> <string>1</string> </property> </item> <item> <property> <name>text</name> <string>2</string> </property> </item> <item> <property> <name>text</name> <string>4</string> </property> </item> <property stdset="1"> <name>name</name> <cstring>scaleFactor</cstring> </property> + <property> + <name>whatsThis</name> + <string>Scale the remote display to fit on the PDA (Slow)</string> + </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_3</cstring> </property> <property stdset="1"> <name>text</name> <string>Scale Factor</string> </property> </widget> </hbox> </widget> <spacer> <property> <name>name</name> <cstring>Spacer2</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </vbox> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Encodings</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>hex</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>Hextile encoding</string> </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>corre</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>CoRRE encoding</string> </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>rre</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>RRE encoding</string> </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>copyRect</cstring> </property> <property stdset="1"> <name>text</name> <string>Copy rectangle encoding</string> </property> + <property> + <name>whatsThis</name> + <string>Enable transmiting identical rectangles as references to existing data</string> + </property> </widget> <spacer> <property> <name>name</name> <cstring>Spacer3</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </vbox> </widget> </widget> </widget> <tabstops> <tabstop>TabWidget3</tabstop> <tabstop>serverHostname</tabstop> <tabstop>serverDisplay</tabstop> <tabstop>serverPassword</tabstop> <tabstop>serverBookmark</tabstop> <tabstop>timeBox</tabstop> <tabstop>bit</tabstop> <tabstop>deIconify</tabstop> <tabstop>shared</tabstop> <tabstop>hex</tabstop> <tabstop>corre</tabstop> <tabstop>rre</tabstop> <tabstop>copyRect</tabstop> </tabstops> </UI> |