author | drw <drw> | 2004-04-21 17:43:18 (UTC) |
---|---|---|
committer | drw <drw> | 2004-04-21 17:43:18 (UTC) |
commit | d10e9746089964b7a1be59903c43b4f3364a9ee2 (patch) (unidiff) | |
tree | d146e4509d23a399fab47759f42fd891812f9d07 | |
parent | 8d6f6d769e945eac05c7089964d1e2c764f0ee7a (diff) | |
download | opie-d10e9746089964b7a1be59903c43b4f3364a9ee2.zip opie-d10e9746089964b7a1be59903c43b4f3364a9ee2.tar.gz opie-d10e9746089964b7a1be59903c43b4f3364a9ee2.tar.bz2 |
Added/fixed QWhatsThis and fixed a few labels in the config dialog
-rw-r--r-- | noncore/settings/packagemanager/filterdlg.cpp | 16 | ||||
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 28 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 41 |
3 files changed, 64 insertions, 21 deletions
diff --git a/noncore/settings/packagemanager/filterdlg.cpp b/noncore/settings/packagemanager/filterdlg.cpp index eeed398..70875bd 100644 --- a/noncore/settings/packagemanager/filterdlg.cpp +++ b/noncore/settings/packagemanager/filterdlg.cpp | |||
@@ -8,128 +8,138 @@ | |||
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ..}^=.= = ; Public License for more details. | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | 20 | ++= -. .` .: |
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "filterdlg.h" | 30 | #include "filterdlg.h" |
31 | 31 | ||
32 | #include <qwhatsthis.h> | ||
33 | |||
32 | FilterDlg::FilterDlg( QWidget *parent, OPackageManager *pm, const QString &name, | 34 | FilterDlg::FilterDlg( QWidget *parent, OPackageManager *pm, const QString &name, |
33 | const QString &server, const QString &destination, | 35 | const QString &server, const QString &destination, |
34 | OPackageManager::Status status, const QString &category ) | 36 | OPackageManager::Status status, const QString &category ) |
35 | : QDialog( parent, QString::null, true ) | 37 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
36 | { | 38 | { |
37 | setCaption( tr( "Filter packages" ) ); | 39 | setCaption( tr( "Filter packages" ) ); |
38 | 40 | ||
39 | QVBoxLayout *layout = new QVBoxLayout( this ); | 41 | QVBoxLayout *layout = new QVBoxLayout( this ); |
40 | QScrollView *sv = new QScrollView( this ); | 42 | QScrollView *sv = new QScrollView( this ); |
41 | layout->addWidget( sv, 0, 0 ); | 43 | layout->addWidget( sv, 0, 0 ); |
42 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 44 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
43 | sv->setFrameStyle( QFrame::NoFrame ); | 45 | sv->setFrameStyle( QFrame::NoFrame ); |
44 | QWidget *container = new QWidget( sv->viewport() ); | 46 | QWidget *container = new QWidget( sv->viewport() ); |
45 | sv->addChild( container ); | 47 | sv->addChild( container ); |
46 | layout = new QVBoxLayout( container, 4, 4 ); | 48 | layout = new QVBoxLayout( container, 4, 4 ); |
47 | 49 | ||
48 | // Category | 50 | // Category |
49 | m_categoryCB = new QCheckBox( tr( "Category:" ), container ); | 51 | m_categoryCB = new QCheckBox( tr( "Category:" ), container ); |
52 | QWhatsThis::add( m_categoryCB, tr( "Tap here to filter package list by application category." ) ); | ||
50 | connect( m_categoryCB, SIGNAL(toggled(bool)), this, SLOT(slotCategorySelected(bool)) ); | 53 | connect( m_categoryCB, SIGNAL(toggled(bool)), this, SLOT(slotCategorySelected(bool)) ); |
51 | m_category = new QComboBox( container ); | 54 | m_category = new QComboBox( container ); |
55 | QWhatsThis::add( m_category, tr( "Select the application category to filter by here." ) ); | ||
52 | m_category->insertStringList( pm->categories() ); | 56 | m_category->insertStringList( pm->categories() ); |
53 | initItem( m_category, m_categoryCB, category ); | 57 | initItem( m_category, m_categoryCB, category ); |
54 | layout->addWidget( m_categoryCB ); | 58 | layout->addWidget( m_categoryCB ); |
55 | layout->addWidget( m_category ); | 59 | layout->addWidget( m_category ); |
56 | 60 | ||
57 | // Package name | 61 | // Package name |
58 | m_nameCB = new QCheckBox( tr( "Names containing:" ), container ); | 62 | m_nameCB = new QCheckBox( tr( "Names containing:" ), container ); |
63 | QWhatsThis::add( m_nameCB, tr( "Tap here to filter package list by package name." ) ); | ||
59 | connect( m_nameCB, SIGNAL(toggled(bool)), this, SLOT(slotNameSelected(bool)) ); | 64 | connect( m_nameCB, SIGNAL(toggled(bool)), this, SLOT(slotNameSelected(bool)) ); |
60 | m_name = new QLineEdit( name, container ); | 65 | m_name = new QLineEdit( name, container ); |
66 | QWhatsThis::add( m_name, tr( "Enter the package name to filter by here." ) ); | ||
61 | if ( !name.isNull() ) | 67 | if ( !name.isNull() ) |
62 | m_nameCB->setChecked( true ); | 68 | m_nameCB->setChecked( true ); |
63 | m_name->setEnabled( !name.isNull() ); | 69 | m_name->setEnabled( !name.isNull() ); |
64 | layout->addWidget( m_nameCB ); | 70 | layout->addWidget( m_nameCB ); |
65 | layout->addWidget( m_name ); | 71 | layout->addWidget( m_name ); |
66 | 72 | ||
67 | // Status | 73 | // Status |
68 | m_statusCB = new QCheckBox( tr( "With the status:" ), container ); | 74 | m_statusCB = new QCheckBox( tr( "With the status:" ), container ); |
75 | QWhatsThis::add( m_statusCB, tr( "Tap here to filter package list by the package status." ) ); | ||
69 | connect( m_statusCB, SIGNAL(toggled(bool)), this, SLOT(slotStatusSelected(bool)) ); | 76 | connect( m_statusCB, SIGNAL(toggled(bool)), this, SLOT(slotStatusSelected(bool)) ); |
70 | m_status = new QComboBox( container ); | 77 | m_status = new QComboBox( container ); |
78 | QWhatsThis::add( m_status, tr( "Select the package status to filter by here." ) ); | ||
71 | connect( m_status, SIGNAL(activated(const QString&)), this, SLOT(slotStatusChanged(const QString&)) ); | 79 | connect( m_status, SIGNAL(activated(const QString&)), this, SLOT(slotStatusChanged(const QString&)) ); |
72 | QString currStatus; | 80 | QString currStatus; |
73 | switch ( status ) | 81 | switch ( status ) |
74 | { | 82 | { |
75 | case OPackageManager::All : currStatus = tr( "All" ); | 83 | case OPackageManager::All : currStatus = tr( "All" ); |
76 | break; | 84 | break; |
77 | case OPackageManager::Installed : currStatus = tr( "Installed" ); | 85 | case OPackageManager::Installed : currStatus = tr( "Installed" ); |
78 | break; | 86 | break; |
79 | case OPackageManager::NotInstalled : currStatus = tr( "Not installed" ); | 87 | case OPackageManager::NotInstalled : currStatus = tr( "Not installed" ); |
80 | break; | 88 | break; |
81 | case OPackageManager::Updated : currStatus = tr( "Updated" ); | 89 | case OPackageManager::Updated : currStatus = tr( "Updated" ); |
82 | break; | 90 | break; |
83 | default : currStatus = QString::null; | 91 | default : currStatus = QString::null; |
84 | }; | 92 | }; |
85 | m_status->insertItem( tr( "All" ) ); | 93 | m_status->insertItem( tr( "All" ) ); |
86 | m_status->insertItem( tr( "Installed" ) ); | 94 | m_status->insertItem( tr( "Installed" ) ); |
87 | m_status->insertItem( tr( "Not installed" ) ); | 95 | m_status->insertItem( tr( "Not installed" ) ); |
88 | m_status->insertItem( tr( "Updated" ) ); | 96 | m_status->insertItem( tr( "Updated" ) ); |
89 | initItem( m_status, m_statusCB, currStatus ); | 97 | initItem( m_status, m_statusCB, currStatus ); |
90 | layout->addWidget( m_statusCB ); | 98 | layout->addWidget( m_statusCB ); |
91 | layout->addWidget( m_status ); | 99 | layout->addWidget( m_status ); |
92 | 100 | ||
93 | // Server | 101 | // Server |
94 | m_serverCB = new QCheckBox( tr( "Available from the following server:" ), container ); | 102 | m_serverCB = new QCheckBox( tr( "Available from the following server:" ), container ); |
103 | QWhatsThis::add( m_serverCB, tr( "Tap here to filter package list by source server." ) ); | ||
95 | connect( m_serverCB, SIGNAL(toggled(bool)), this, SLOT(slotServerSelected(bool)) ); | 104 | connect( m_serverCB, SIGNAL(toggled(bool)), this, SLOT(slotServerSelected(bool)) ); |
96 | m_server = new QComboBox( container ); | 105 | m_server = new QComboBox( container ); |
106 | QWhatsThis::add( m_server, tr( "Select the source server to filter by here." ) ); | ||
97 | m_server->insertStringList( *(pm->servers()) ); | 107 | m_server->insertStringList( *(pm->servers()) ); |
98 | initItem( m_server, m_serverCB, server ); | 108 | initItem( m_server, m_serverCB, server ); |
99 | layout->addWidget( m_serverCB ); | 109 | layout->addWidget( m_serverCB ); |
100 | layout->addWidget( m_server ); | 110 | layout->addWidget( m_server ); |
101 | 111 | ||
102 | // Destination | 112 | // Destination |
103 | m_destCB = new QCheckBox( tr( "Installed on device at:" ), container ); | 113 | m_destCB = new QCheckBox( tr( "Installed on device at:" ), container ); |
114 | QWhatsThis::add( m_destCB, tr( "Tap here to filter package list by destination where the package is installed to on this device." ) ); | ||
104 | connect( m_destCB, SIGNAL(toggled(bool)), this, SLOT(slotDestSelected(bool)) ); | 115 | connect( m_destCB, SIGNAL(toggled(bool)), this, SLOT(slotDestSelected(bool)) ); |
105 | m_destination = new QComboBox( container ); | 116 | m_destination = new QComboBox( container ); |
117 | QWhatsThis::add( m_destination, tr( "Select the destination location to filter by here." ) ); | ||
106 | m_destination->insertStringList( *(pm->destinations()) ); | 118 | m_destination->insertStringList( *(pm->destinations()) ); |
107 | initItem( m_destination, m_destCB, destination ); | 119 | initItem( m_destination, m_destCB, destination ); |
108 | layout->addWidget( m_destCB ); | 120 | layout->addWidget( m_destCB ); |
109 | layout->addWidget( m_destination ); | 121 | layout->addWidget( m_destination ); |
110 | |||
111 | //showMaximized(); | ||
112 | } | 122 | } |
113 | 123 | ||
114 | void FilterDlg::initItem( QComboBox *comboBox, QCheckBox *checkBox, const QString &selection ) | 124 | void FilterDlg::initItem( QComboBox *comboBox, QCheckBox *checkBox, const QString &selection ) |
115 | { | 125 | { |
116 | if ( !selection.isNull() ) | 126 | if ( !selection.isNull() ) |
117 | { | 127 | { |
118 | checkBox->setChecked( true ); | 128 | checkBox->setChecked( true ); |
119 | 129 | ||
120 | for ( int i = 0; i < comboBox->count(); i++ ) | 130 | for ( int i = 0; i < comboBox->count(); i++ ) |
121 | { | 131 | { |
122 | if ( comboBox->text( i ) == selection ) | 132 | if ( comboBox->text( i ) == selection ) |
123 | { | 133 | { |
124 | comboBox->setCurrentItem( i ); | 134 | comboBox->setCurrentItem( i ); |
125 | return; | 135 | return; |
126 | } | 136 | } |
127 | } | 137 | } |
128 | } | 138 | } |
129 | comboBox->setEnabled( !selection.isNull() ); | 139 | comboBox->setEnabled( !selection.isNull() ); |
130 | } | 140 | } |
131 | 141 | ||
132 | void FilterDlg::slotNameSelected( bool selected ) | 142 | void FilterDlg::slotNameSelected( bool selected ) |
133 | { | 143 | { |
134 | m_name->setEnabled( selected ); | 144 | m_name->setEnabled( selected ); |
135 | } | 145 | } |
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index b334bca..810046f 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp | |||
@@ -95,176 +95,176 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ ) | |||
95 | void MainWindow::closeEvent( QCloseEvent *event ) | 95 | void MainWindow::closeEvent( QCloseEvent *event ) |
96 | { | 96 | { |
97 | // Close app only if either the package or status widgets are currently active | 97 | // Close app only if either the package or status widgets are currently active |
98 | bool close = m_widgetStack.visibleWidget() == &m_packageList || | 98 | bool close = m_widgetStack.visibleWidget() == &m_packageList || |
99 | m_widgetStack.visibleWidget() == &m_statusWidget; | 99 | m_widgetStack.visibleWidget() == &m_statusWidget; |
100 | if ( close ) | 100 | if ( close ) |
101 | { | 101 | { |
102 | // TODO - write out application configuration settings | 102 | // TODO - write out application configuration settings |
103 | 103 | ||
104 | // Write out package manager configuration settings | 104 | // Write out package manager configuration settings |
105 | m_packman.saveSettings(); | 105 | m_packman.saveSettings(); |
106 | event->accept(); | 106 | event->accept(); |
107 | } | 107 | } |
108 | else | 108 | else |
109 | { | 109 | { |
110 | delete m_widgetStack.visibleWidget(); | 110 | delete m_widgetStack.visibleWidget(); |
111 | m_widgetStack.raiseWidget( &m_packageList ); | 111 | m_widgetStack.raiseWidget( &m_packageList ); |
112 | event->ignore(); | 112 | event->ignore(); |
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | void MainWindow::initPackageList() | 116 | void MainWindow::initPackageList() |
117 | { | 117 | { |
118 | m_packageList.addColumn( tr( "Packages" ) ); | 118 | m_packageList.addColumn( tr( "Packages" ) ); |
119 | QWhatsThis::add( &m_packageList, tr( "This is a listing of all packages.\n\nA blue dot next to the package name indicates that the package is currently installed.\n\nA blue dot with a star indicates that a newer version of the package is available from the server feed.\n\nClick inside the box at the left to select a package." ) ); | 119 | QWhatsThis::add( &m_packageList, tr( "This is a listing of all packages.\n\nA blue dot next to the package name indicates that the package is currently installed.\n\nA blue dot with a star indicates that a newer version of the package is available from the server feed.\n\nTap inside the box at the left to select a package. Tap and hold to view package details." ) ); |
120 | QPEApplication::setStylusOperation( m_packageList.viewport(), QPEApplication::RightOnHold ); | 120 | QPEApplication::setStylusOperation( m_packageList.viewport(), QPEApplication::RightOnHold ); |
121 | connect( &m_packageList, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)), | 121 | connect( &m_packageList, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)), |
122 | this, SLOT(slotDisplayPackageInfo(QListViewItem*)) ); | 122 | this, SLOT(slotDisplayPackageInfo(QListViewItem*)) ); |
123 | } | 123 | } |
124 | 124 | ||
125 | void MainWindow::initStatusWidget() | 125 | void MainWindow::initStatusWidget() |
126 | { | 126 | { |
127 | QVBoxLayout *layout = new QVBoxLayout( &m_statusWidget, 4, 4 ); | 127 | QVBoxLayout *layout = new QVBoxLayout( &m_statusWidget, 4, 4 ); |
128 | 128 | ||
129 | m_statusText.setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); | 129 | m_statusText.setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); |
130 | layout->addWidget( &m_statusText ); | 130 | layout->addWidget( &m_statusText ); |
131 | 131 | ||
132 | connect( &m_packman, SIGNAL(initStatus(int)), this, SLOT(slotInitStatusBar(int)) ); | 132 | connect( &m_packman, SIGNAL(initStatus(int)), this, SLOT(slotInitStatusBar(int)) ); |
133 | connect( &m_packman, SIGNAL(statusText(const QString&)), this, SLOT(slotStatusText(const QString&)) ); | 133 | connect( &m_packman, SIGNAL(statusText(const QString&)), this, SLOT(slotStatusText(const QString&)) ); |
134 | connect( &m_packman, SIGNAL(statusBar(int)), this, SLOT(slotStatusBar(int)) ); | 134 | connect( &m_packman, SIGNAL(statusBar(int)), this, SLOT(slotStatusBar(int)) ); |
135 | 135 | ||
136 | layout->addWidget( &m_statusBar ); | 136 | layout->addWidget( &m_statusBar ); |
137 | } | 137 | } |
138 | 138 | ||
139 | void MainWindow::initUI() | 139 | void MainWindow::initUI() |
140 | { | 140 | { |
141 | // Build menu and tool bars | 141 | // Build menu and tool bars |
142 | setToolBarsMovable( false ); | 142 | setToolBarsMovable( false ); |
143 | 143 | ||
144 | m_menuBar.setHorizontalStretchable( true ); | 144 | m_menuBar.setHorizontalStretchable( true ); |
145 | QMenuBar *mb = new QMenuBar( &m_menuBar ); | 145 | QMenuBar *mb = new QMenuBar( &m_menuBar ); |
146 | mb->setMargin( 0 ); | 146 | mb->setMargin( 0 ); |
147 | 147 | ||
148 | // Find toolbar | 148 | // Find toolbar |
149 | addToolBar( &m_findBar, QMainWindow::Top, true ); | 149 | addToolBar( &m_findBar, QMainWindow::Top, true ); |
150 | m_findBar.setHorizontalStretchable( true ); | 150 | m_findBar.setHorizontalStretchable( true ); |
151 | m_findEdit = new QLineEdit( &m_findBar ); | 151 | m_findEdit = new QLineEdit( &m_findBar ); |
152 | QWhatsThis::add( m_findEdit, tr( "Type the text to search for here." ) ); | 152 | QWhatsThis::add( m_findEdit, tr( "Type the text to search for here." ) ); |
153 | m_findBar.setStretchableWidget( m_findEdit ); | 153 | m_findBar.setStretchableWidget( m_findEdit ); |
154 | connect( m_findEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotFindChanged(const QString&)) ); | 154 | connect( m_findEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotFindChanged(const QString&)) ); |
155 | 155 | ||
156 | // Packages menu | 156 | // Packages menu |
157 | QPopupMenu *popup = new QPopupMenu( this ); | 157 | QPopupMenu *popup = new QPopupMenu( this ); |
158 | 158 | ||
159 | QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "packagemanager/update" ), QString::null, 0, this, 0 ); | 159 | QAction *a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "packagemanager/update" ), QString::null, 0, this, 0 ); |
160 | a->setWhatsThis( tr( "Click here to update package lists from servers." ) ); | 160 | a->setWhatsThis( tr( "Tap here to update package lists from servers." ) ); |
161 | connect( a, SIGNAL(activated()), this, SLOT(slotUpdate()) ); | 161 | connect( a, SIGNAL(activated()), this, SLOT(slotUpdate()) ); |
162 | a->addTo( popup ); | 162 | a->addTo( popup ); |
163 | a->addTo( &m_toolBar ); | 163 | a->addTo( &m_toolBar ); |
164 | 164 | ||
165 | QAction *actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "packagemanager/upgrade" ), QString::null, 0, this, 0 ); | 165 | QAction *actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "packagemanager/upgrade" ), QString::null, 0, this, 0 ); |
166 | actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) ); | 166 | actionUpgrade->setWhatsThis( tr( "Tap here to upgrade all installed packages if a newer version is available." ) ); |
167 | connect( actionUpgrade, SIGNAL(activated()), this, SLOT(slotUpgrade()) ); | 167 | connect( actionUpgrade, SIGNAL(activated()), this, SLOT(slotUpgrade()) ); |
168 | actionUpgrade->addTo( popup ); | 168 | actionUpgrade->addTo( popup ); |
169 | actionUpgrade->addTo( &m_toolBar ); | 169 | actionUpgrade->addTo( &m_toolBar ); |
170 | 170 | ||
171 | QPixmap iconDownload = Resource::loadPixmap( "packagemanager/download" ); | 171 | QPixmap iconDownload = Resource::loadPixmap( "packagemanager/download" ); |
172 | QPixmap iconRemove = Resource::loadPixmap( "packagemanager/remove" ); | 172 | QPixmap iconRemove = Resource::loadPixmap( "packagemanager/remove" ); |
173 | QAction *actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); | 173 | QAction *actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); |
174 | actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) ); | 174 | actionDownload->setWhatsThis( tr( "Tap here to download the currently selected package(s)." ) ); |
175 | connect( actionDownload, SIGNAL(activated()), this, SLOT(slotDownload()) ); | 175 | connect( actionDownload, SIGNAL(activated()), this, SLOT(slotDownload()) ); |
176 | actionDownload->addTo( popup ); | 176 | actionDownload->addTo( popup ); |
177 | actionDownload->addTo( &m_toolBar ); | 177 | actionDownload->addTo( &m_toolBar ); |
178 | 178 | ||
179 | a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "packagemanager/apply" ), QString::null, 0, this, 0 ); | 179 | a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "packagemanager/apply" ), QString::null, 0, this, 0 ); |
180 | a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) ); | 180 | a->setWhatsThis( tr( "Tap here to install, remove or upgrade currently selected package(s)." ) ); |
181 | connect( a, SIGNAL(activated()), this, SLOT(slotApply()) ); | 181 | connect( a, SIGNAL(activated()), this, SLOT(slotApply()) ); |
182 | a->addTo( popup ); | 182 | a->addTo( popup ); |
183 | a->addTo( &m_toolBar ); | 183 | a->addTo( &m_toolBar ); |
184 | 184 | ||
185 | popup->insertSeparator(); | 185 | popup->insertSeparator(); |
186 | 186 | ||
187 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); | 187 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); |
188 | a->setWhatsThis( tr( "Click here to configure this application." ) ); | 188 | a->setWhatsThis( tr( "Tap here to configure this application." ) ); |
189 | connect( a, SIGNAL(activated()), this, SLOT(slotConfigure()) ); | 189 | connect( a, SIGNAL(activated()), this, SLOT(slotConfigure()) ); |
190 | a->addTo( popup ); | 190 | a->addTo( popup ); |
191 | mb->insertItem( tr( "Actions" ), popup ); | 191 | mb->insertItem( tr( "Actions" ), popup ); |
192 | 192 | ||
193 | // View menu | 193 | // View menu |
194 | popup = new QPopupMenu( this ); | 194 | popup = new QPopupMenu( this ); |
195 | 195 | ||
196 | m_actionShowNotInstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); | 196 | m_actionShowNotInstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); |
197 | m_actionShowNotInstalled->setToggleAction( true ); | 197 | m_actionShowNotInstalled->setToggleAction( true ); |
198 | m_actionShowNotInstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) ); | 198 | m_actionShowNotInstalled->setWhatsThis( tr( "Tap here to show packages available which have not been installed." ) ); |
199 | connect( m_actionShowNotInstalled, SIGNAL(activated()), this, SLOT(slotShowNotInstalled()) ); | 199 | connect( m_actionShowNotInstalled, SIGNAL(activated()), this, SLOT(slotShowNotInstalled()) ); |
200 | m_actionShowNotInstalled->addTo( popup ); | 200 | m_actionShowNotInstalled->addTo( popup ); |
201 | 201 | ||
202 | m_actionShowInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 ); | 202 | m_actionShowInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 ); |
203 | m_actionShowInstalled->setToggleAction( true ); | 203 | m_actionShowInstalled->setToggleAction( true ); |
204 | m_actionShowInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) ); | 204 | m_actionShowInstalled->setWhatsThis( tr( "Tap here to show packages currently installed on this device." ) ); |
205 | connect( m_actionShowInstalled, SIGNAL(activated()), this, SLOT(slotShowInstalled()) ); | 205 | connect( m_actionShowInstalled, SIGNAL(activated()), this, SLOT(slotShowInstalled()) ); |
206 | m_actionShowInstalled->addTo( popup ); | 206 | m_actionShowInstalled->addTo( popup ); |
207 | 207 | ||
208 | m_actionShowUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); | 208 | m_actionShowUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); |
209 | m_actionShowUpdated->setToggleAction( true ); | 209 | m_actionShowUpdated->setToggleAction( true ); |
210 | m_actionShowUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) ); | 210 | m_actionShowUpdated->setWhatsThis( tr( "Tap here to show packages currently installed on this device which have a newer version available." ) ); |
211 | connect( m_actionShowUpdated, SIGNAL(activated()), this, SLOT(slotShowUpdated()) ); | 211 | connect( m_actionShowUpdated, SIGNAL(activated()), this, SLOT(slotShowUpdated()) ); |
212 | m_actionShowUpdated->addTo( popup ); | 212 | m_actionShowUpdated->addTo( popup ); |
213 | 213 | ||
214 | popup->insertSeparator(); | 214 | popup->insertSeparator(); |
215 | 215 | ||
216 | m_actionFilter = new QAction( tr( "Filter" ), Resource::loadPixmap( "packagemanager/filter" ), | 216 | m_actionFilter = new QAction( tr( "Filter" ), Resource::loadPixmap( "packagemanager/filter" ), |
217 | QString::null, 0, this, 0 ); | 217 | QString::null, 0, this, 0 ); |
218 | m_actionFilter->setToggleAction( true ); | 218 | m_actionFilter->setToggleAction( true ); |
219 | m_actionFilter->setWhatsThis( tr( "Click here to apply current filter." ) ); | 219 | m_actionFilter->setWhatsThis( tr( "Tap here to apply current filter." ) ); |
220 | connect( m_actionFilter, SIGNAL(toggled(bool)), this, SLOT(slotFilter(bool)) ); | 220 | connect( m_actionFilter, SIGNAL(toggled(bool)), this, SLOT(slotFilter(bool)) ); |
221 | m_actionFilter->addTo( popup ); | 221 | m_actionFilter->addTo( popup ); |
222 | 222 | ||
223 | a = new QAction( tr( "Filter settings" ), QString::null, 0, this, 0 ); | 223 | a = new QAction( tr( "Filter settings" ), QString::null, 0, this, 0 ); |
224 | a->setWhatsThis( tr( "Click here to change the package filter criteria." ) ); | 224 | a->setWhatsThis( tr( "Tap here to change the package filter criteria." ) ); |
225 | connect( a, SIGNAL(activated()), this, SLOT(slotFilterChange()) ); | 225 | connect( a, SIGNAL(activated()), this, SLOT(slotFilterChange()) ); |
226 | a->addTo( popup ); | 226 | a->addTo( popup ); |
227 | 227 | ||
228 | popup->insertSeparator(); | 228 | popup->insertSeparator(); |
229 | 229 | ||
230 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); | 230 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); |
231 | a->setWhatsThis( tr( "Click here to search for text in package names." ) ); | 231 | a->setWhatsThis( tr( "Tap here to search for text in package names." ) ); |
232 | connect( a, SIGNAL(activated()), this, SLOT(slotFindShowToolbar()) ); | 232 | connect( a, SIGNAL(activated()), this, SLOT(slotFindShowToolbar()) ); |
233 | a->addTo( popup ); | 233 | a->addTo( popup ); |
234 | 234 | ||
235 | m_actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); | 235 | m_actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); |
236 | m_actionFindNext->setEnabled( false ); | 236 | m_actionFindNext->setEnabled( false ); |
237 | m_actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) ); | 237 | m_actionFindNext->setWhatsThis( tr( "Tap here to find the next package name containing the text you are searching for." ) ); |
238 | connect( m_actionFindNext, SIGNAL(activated()), this, SLOT(slotFindNext()) ); | 238 | connect( m_actionFindNext, SIGNAL(activated()), this, SLOT(slotFindNext()) ); |
239 | m_actionFindNext->addTo( popup ); | 239 | m_actionFindNext->addTo( popup ); |
240 | m_actionFindNext->addTo( &m_findBar ); | 240 | m_actionFindNext->addTo( &m_findBar ); |
241 | 241 | ||
242 | mb->insertItem( tr( "View" ), popup ); | 242 | mb->insertItem( tr( "View" ), popup ); |
243 | 243 | ||
244 | // Finish find toolbar creation | 244 | // Finish find toolbar creation |
245 | a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 245 | a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
246 | a->setWhatsThis( tr( "Click here to hide the find toolbar." ) ); | 246 | a->setWhatsThis( tr( "Tap here to hide the find toolbar." ) ); |
247 | connect( a, SIGNAL(activated()), this, SLOT(slotFindHideToolbar()) ); | 247 | connect( a, SIGNAL(activated()), this, SLOT(slotFindHideToolbar()) ); |
248 | a->addTo( &m_findBar ); | 248 | a->addTo( &m_findBar ); |
249 | m_findBar.hide(); | 249 | m_findBar.hide(); |
250 | } | 250 | } |
251 | 251 | ||
252 | void MainWindow::loadPackageList( OPackageList *packages, bool clearList ) | 252 | void MainWindow::loadPackageList( OPackageList *packages, bool clearList ) |
253 | { | 253 | { |
254 | if ( clearList ) | 254 | if ( clearList ) |
255 | m_packageList.clear(); | 255 | m_packageList.clear(); |
256 | 256 | ||
257 | if ( packages ) | 257 | if ( packages ) |
258 | { | 258 | { |
259 | for ( OPackageListIterator packageIt( *packages ); packageIt.current(); ++packageIt ) | 259 | for ( OPackageListIterator packageIt( *packages ); packageIt.current(); ++packageIt ) |
260 | { | 260 | { |
261 | OPackage *package = packageIt.current(); | 261 | OPackage *package = packageIt.current(); |
262 | QCheckListItem *item = new QCheckListItem( &m_packageList, package->name(), | 262 | QCheckListItem *item = new QCheckListItem( &m_packageList, package->name(), |
263 | QCheckListItem::CheckBox ); | 263 | QCheckListItem::CheckBox ); |
264 | m_packageList.insertItem( item ); | 264 | m_packageList.insertItem( item ); |
265 | 265 | ||
266 | // If a different version of package is available, show update available icon | 266 | // If a different version of package is available, show update available icon |
267 | // Otherwise, show installed icon | 267 | // Otherwise, show installed icon |
268 | if ( !package->versionInstalled().isNull() ) | 268 | if ( !package->versionInstalled().isNull() ) |
269 | { | 269 | { |
270 | if ( m_packman.compareVersions( package->version(), package->versionInstalled() ) == 1 ) | 270 | if ( m_packman.compareVersions( package->version(), package->versionInstalled() ) == 1 ) |
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 74e7137..d134651 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -18,54 +18,55 @@ | |||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "oipkgconfigdlg.h" | 32 | #include "oipkgconfigdlg.h" |
33 | 33 | ||
34 | #include <qcheckbox.h> | 34 | #include <qcheckbox.h> |
35 | #include <qcombobox.h> | 35 | #include <qcombobox.h> |
36 | #include <qgroupbox.h> | 36 | #include <qgroupbox.h> |
37 | #include <qlabel.h> | 37 | #include <qlabel.h> |
38 | #include <qlineedit.h> | 38 | #include <qlineedit.h> |
39 | #include <qlistbox.h> | 39 | #include <qlistbox.h> |
40 | #include <qpushbutton.h> | 40 | #include <qpushbutton.h> |
41 | #include <qscrollview.h> | 41 | #include <qscrollview.h> |
42 | #include <qwhatsthis.h> | ||
42 | 43 | ||
43 | #include <qpe/resource.h> | 44 | #include <qpe/resource.h> |
44 | 45 | ||
45 | using namespace Opie::Ui; | 46 | using namespace Opie::Ui; |
46 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) | 47 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) |
47 | : QDialog( parent, QString::null, true ) | 48 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
48 | , m_ipkg( ipkg ) | 49 | , m_ipkg( ipkg ) |
49 | , m_configs( 0x0 ) | 50 | , m_configs( 0x0 ) |
50 | , m_installOptions( installOptions ) | 51 | , m_installOptions( installOptions ) |
51 | , m_serverNew( false ) | 52 | , m_serverNew( false ) |
52 | , m_serverCurrent( -1 ) | 53 | , m_serverCurrent( -1 ) |
53 | , m_destNew( false ) | 54 | , m_destNew( false ) |
54 | , m_destCurrent( -1 ) | 55 | , m_destCurrent( -1 ) |
55 | , m_layout( this, 2, 4 ) | 56 | , m_layout( this, 2, 4 ) |
56 | , m_tabWidget( this ) | 57 | , m_tabWidget( this ) |
57 | { | 58 | { |
58 | setCaption( tr( "Configuration" ) ); | 59 | setCaption( tr( "Configuration" ) ); |
59 | 60 | ||
60 | // Initialize configuration widgets | 61 | // Initialize configuration widgets |
61 | if ( !installOptions ) | 62 | if ( !installOptions ) |
62 | { | 63 | { |
63 | initServerWidget(); | 64 | initServerWidget(); |
64 | initDestinationWidget(); | 65 | initDestinationWidget(); |
65 | initProxyWidget(); | 66 | initProxyWidget(); |
66 | } | 67 | } |
67 | initOptionsWidget(); | 68 | initOptionsWidget(); |
68 | 69 | ||
69 | // Load configuration information | 70 | // Load configuration information |
70 | initData(); | 71 | initData(); |
71 | 72 | ||
@@ -146,215 +147,247 @@ void OIpkgConfigDlg::accept() | |||
146 | QDialog::accept(); | 147 | QDialog::accept(); |
147 | } | 148 | } |
148 | 149 | ||
149 | void OIpkgConfigDlg::reject() | 150 | void OIpkgConfigDlg::reject() |
150 | { | 151 | { |
151 | if ( m_configs ) | 152 | if ( m_configs ) |
152 | delete m_configs; | 153 | delete m_configs; |
153 | } | 154 | } |
154 | 155 | ||
155 | void OIpkgConfigDlg::initServerWidget() | 156 | void OIpkgConfigDlg::initServerWidget() |
156 | { | 157 | { |
157 | m_serverWidget = new QWidget( this ); | 158 | m_serverWidget = new QWidget( this ); |
158 | 159 | ||
159 | // Initialize UI | 160 | // Initialize UI |
160 | QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); | 161 | QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); |
161 | QScrollView *sv = new QScrollView( m_serverWidget ); | 162 | QScrollView *sv = new QScrollView( m_serverWidget ); |
162 | vb->addWidget( sv, 0, 0 ); | 163 | vb->addWidget( sv, 0, 0 ); |
163 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 164 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
164 | sv->setFrameStyle( QFrame::NoFrame ); | 165 | sv->setFrameStyle( QFrame::NoFrame ); |
165 | QWidget *container = new QWidget( sv->viewport() ); | 166 | QWidget *container = new QWidget( sv->viewport() ); |
166 | sv->addChild( container ); | 167 | sv->addChild( container ); |
167 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); | 168 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); |
168 | 169 | ||
169 | m_serverList = new QListBox( container ); | 170 | m_serverList = new QListBox( container ); |
171 | QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) ); | ||
170 | m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); | 172 | m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); |
171 | connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerEdit(int)) ); | 173 | connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerEdit(int)) ); |
172 | layout->addMultiCellWidget( m_serverList, 0, 0, 0, 1 ); | 174 | layout->addMultiCellWidget( m_serverList, 0, 0, 0, 1 ); |
173 | 175 | ||
174 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); | 176 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); |
177 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); | ||
175 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); | 178 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); |
176 | layout->addWidget( btn, 1, 0 ); | 179 | layout->addWidget( btn, 1, 0 ); |
177 | 180 | ||
178 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); | 181 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); |
182 | QWhatsThis::add( btn, tr( "Tap here to delete the entry selected above." ) ); | ||
179 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); | 183 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); |
180 | layout->addWidget( btn, 1, 1 ); | 184 | layout->addWidget( btn, 1, 1 ); |
181 | 185 | ||
182 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); | 186 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); |
183 | grpbox->layout()->setSpacing( 2 ); | 187 | grpbox->layout()->setSpacing( 2 ); |
184 | grpbox->layout()->setMargin( 4 ); | 188 | grpbox->layout()->setMargin( 4 ); |
185 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); | 189 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); |
186 | 190 | ||
187 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); | 191 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); |
188 | 192 | ||
189 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); | 193 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); |
194 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | ||
190 | grplayout->addWidget( label, 0, 0 ); | 195 | grplayout->addWidget( label, 0, 0 ); |
191 | m_serverName = new QLineEdit( grpbox ); | 196 | m_serverName = new QLineEdit( grpbox ); |
197 | QWhatsThis::add( m_serverName, tr( "Enter the name of this entry here." ) ); | ||
192 | grplayout->addWidget( m_serverName, 0, 1 ); | 198 | grplayout->addWidget( m_serverName, 0, 1 ); |
193 | 199 | ||
194 | label = new QLabel( tr( "Address:" ), grpbox ); | 200 | label = new QLabel( tr( "Address:" ), grpbox ); |
201 | QWhatsThis::add( label, tr( "Enter the URL address of this entry here." ) ); | ||
195 | grplayout->addWidget( label, 1, 0 ); | 202 | grplayout->addWidget( label, 1, 0 ); |
196 | m_serverLocation = new QLineEdit( grpbox ); | 203 | m_serverLocation = new QLineEdit( grpbox ); |
204 | QWhatsThis::add( m_serverLocation, tr( "Enter the URL address of this entry here." ) ); | ||
197 | grplayout->addWidget( m_serverLocation, 1, 1 ); | 205 | grplayout->addWidget( m_serverLocation, 1, 1 ); |
198 | 206 | ||
199 | m_serverActive = new QCheckBox( tr( "Active Server" ), grpbox ); | 207 | m_serverActive = new QCheckBox( tr( "Active" ), grpbox ); |
208 | QWhatsThis::add( m_serverActive, tr( "Tap here to indicate whether this entry is active or not." ) ); | ||
200 | grplayout->addMultiCellWidget( m_serverActive, 2, 2, 0, 1 ); | 209 | grplayout->addMultiCellWidget( m_serverActive, 2, 2, 0, 1 ); |
201 | 210 | ||
202 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); | 211 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); |
212 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); | ||
203 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerUpdate()) ); | 213 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerUpdate()) ); |
204 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); | 214 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); |
205 | } | 215 | } |
206 | 216 | ||
207 | void OIpkgConfigDlg::initDestinationWidget() | 217 | void OIpkgConfigDlg::initDestinationWidget() |
208 | { | 218 | { |
209 | m_destWidget = new QWidget( this ); | 219 | m_destWidget = new QWidget( this ); |
210 | 220 | ||
211 | // Initialize UI | 221 | // Initialize UI |
212 | QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); | 222 | QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); |
213 | QScrollView *sv = new QScrollView( m_destWidget ); | 223 | QScrollView *sv = new QScrollView( m_destWidget ); |
214 | vb->addWidget( sv, 0, 0 ); | 224 | vb->addWidget( sv, 0, 0 ); |
215 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 225 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
216 | sv->setFrameStyle( QFrame::NoFrame ); | 226 | sv->setFrameStyle( QFrame::NoFrame ); |
217 | QWidget *container = new QWidget( sv->viewport() ); | 227 | QWidget *container = new QWidget( sv->viewport() ); |
218 | sv->addChild( container ); | 228 | sv->addChild( container ); |
219 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); | 229 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); |
220 | 230 | ||
221 | m_destList = new QListBox( container ); | 231 | m_destList = new QListBox( container ); |
232 | QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) ); | ||
222 | m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); | 233 | m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); |
223 | connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestEdit(int)) ); | 234 | connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestEdit(int)) ); |
224 | layout->addMultiCellWidget( m_destList, 0, 0, 0, 1 ); | 235 | layout->addMultiCellWidget( m_destList, 0, 0, 0, 1 ); |
225 | 236 | ||
226 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); | 237 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); |
238 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); | ||
227 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); | 239 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); |
228 | layout->addWidget( btn, 1, 0 ); | 240 | layout->addWidget( btn, 1, 0 ); |
229 | 241 | ||
230 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); | 242 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); |
243 | QWhatsThis::add( btn, tr( "Tap here to delete the entry selected above." ) ); | ||
231 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); | 244 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); |
232 | layout->addWidget( btn, 1, 1 ); | 245 | layout->addWidget( btn, 1, 1 ); |
233 | 246 | ||
234 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); | 247 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); |
235 | grpbox->layout()->setSpacing( 2 ); | 248 | grpbox->layout()->setSpacing( 2 ); |
236 | grpbox->layout()->setMargin( 4 ); | 249 | grpbox->layout()->setMargin( 4 ); |
237 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); | 250 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); |
238 | 251 | ||
239 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); | 252 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); |
240 | 253 | ||
241 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); | 254 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); |
255 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | ||
242 | grplayout->addWidget( label, 0, 0 ); | 256 | grplayout->addWidget( label, 0, 0 ); |
243 | m_destName = new QLineEdit( grpbox ); | 257 | m_destName = new QLineEdit( grpbox ); |
258 | QWhatsThis::add( m_destName, tr( "Enter the name of this entry here." ) ); | ||
244 | grplayout->addWidget( m_destName, 0, 1 ); | 259 | grplayout->addWidget( m_destName, 0, 1 ); |
245 | 260 | ||
246 | label = new QLabel( tr( "Address:" ), grpbox ); | 261 | label = new QLabel( tr( "Location:" ), grpbox ); |
262 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); | ||
247 | grplayout->addWidget( label, 1, 0 ); | 263 | grplayout->addWidget( label, 1, 0 ); |
248 | m_destLocation = new QLineEdit( grpbox ); | 264 | m_destLocation = new QLineEdit( grpbox ); |
265 | QWhatsThis::add( m_destLocation, tr( "Enter the absolute directory path of this entry here." ) ); | ||
249 | grplayout->addWidget( m_destLocation, 1, 1 ); | 266 | grplayout->addWidget( m_destLocation, 1, 1 ); |
250 | 267 | ||
251 | m_destActive = new QCheckBox( tr( "Active Server" ), grpbox ); | 268 | m_destActive = new QCheckBox( tr( "Active" ), grpbox ); |
269 | QWhatsThis::add( m_destActive, tr( "Tap here to indicate whether this entry is active or not." ) ); | ||
252 | grplayout->addMultiCellWidget( m_destActive, 2, 2, 0, 1 ); | 270 | grplayout->addMultiCellWidget( m_destActive, 2, 2, 0, 1 ); |
253 | 271 | ||
254 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); | 272 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); |
273 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); | ||
255 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestUpdate()) ); | 274 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestUpdate()) ); |
256 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); | 275 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); |
257 | } | 276 | } |
258 | 277 | ||
259 | void OIpkgConfigDlg::initProxyWidget() | 278 | void OIpkgConfigDlg::initProxyWidget() |
260 | { | 279 | { |
261 | m_proxyWidget = new QWidget( this ); | 280 | m_proxyWidget = new QWidget( this ); |
262 | 281 | ||
263 | // Initialize UI | 282 | // Initialize UI |
264 | QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); | 283 | QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); |
265 | QScrollView *sv = new QScrollView( m_proxyWidget ); | 284 | QScrollView *sv = new QScrollView( m_proxyWidget ); |
266 | vb->addWidget( sv, 0, 0 ); | 285 | vb->addWidget( sv, 0, 0 ); |
267 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 286 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
268 | sv->setFrameStyle( QFrame::NoFrame ); | 287 | sv->setFrameStyle( QFrame::NoFrame ); |
269 | QWidget *container = new QWidget( sv->viewport() ); | 288 | QWidget *container = new QWidget( sv->viewport() ); |
270 | sv->addChild( container ); | 289 | sv->addChild( container ); |
271 | QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); | 290 | QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); |
272 | 291 | ||
273 | // HTTP proxy server configuration | 292 | // HTTP proxy server configuration |
274 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); | 293 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); |
275 | grpbox->layout()->setSpacing( 2 ); | 294 | grpbox->layout()->setSpacing( 2 ); |
276 | grpbox->layout()->setMargin( 4 ); | 295 | grpbox->layout()->setMargin( 4 ); |
277 | layout->addMultiCellWidget( grpbox, 0, 0, 0, 1 ); | 296 | layout->addMultiCellWidget( grpbox, 0, 0, 0, 1 ); |
278 | QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() ); | 297 | QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() ); |
279 | m_proxyHttpServer = new QLineEdit( grpbox ); | 298 | m_proxyHttpServer = new QLineEdit( grpbox ); |
299 | QWhatsThis::add( m_proxyHttpServer, tr( "Enter the URL address of the HTTP proxy server here." ) ); | ||
280 | grplayout->addWidget( m_proxyHttpServer ); | 300 | grplayout->addWidget( m_proxyHttpServer ); |
281 | m_proxyHttpActive = new QCheckBox( tr( "Enabled" ), grpbox ); | 301 | m_proxyHttpActive = new QCheckBox( tr( "Enabled" ), grpbox ); |
302 | QWhatsThis::add( m_proxyHttpActive, tr( "Tap here to enable or disable the HTTP proxy server." ) ); | ||
282 | grplayout->addWidget( m_proxyHttpActive ); | 303 | grplayout->addWidget( m_proxyHttpActive ); |
283 | 304 | ||
284 | // FTP proxy server configuration | 305 | // FTP proxy server configuration |
285 | grpbox = new QGroupBox( 0, Qt::Vertical, tr( "FTP Proxy" ), container ); | 306 | grpbox = new QGroupBox( 0, Qt::Vertical, tr( "FTP Proxy" ), container ); |
286 | grpbox->layout()->setSpacing( 2 ); | 307 | grpbox->layout()->setSpacing( 2 ); |
287 | grpbox->layout()->setMargin( 4 ); | 308 | grpbox->layout()->setMargin( 4 ); |
288 | layout->addMultiCellWidget( grpbox, 1, 1, 0, 1 ); | 309 | layout->addMultiCellWidget( grpbox, 1, 1, 0, 1 ); |
289 | grplayout = new QVBoxLayout( grpbox->layout() ); | 310 | grplayout = new QVBoxLayout( grpbox->layout() ); |
290 | m_proxyFtpServer = new QLineEdit( grpbox ); | 311 | m_proxyFtpServer = new QLineEdit( grpbox ); |
312 | QWhatsThis::add( m_proxyFtpServer, tr( "Enter the URL address of the FTP proxy server here." ) ); | ||
291 | grplayout->addWidget( m_proxyFtpServer ); | 313 | grplayout->addWidget( m_proxyFtpServer ); |
292 | m_proxyFtpActive = new QCheckBox( tr( "Enabled" ), grpbox ); | 314 | m_proxyFtpActive = new QCheckBox( tr( "Enabled" ), grpbox ); |
315 | QWhatsThis::add( m_proxyFtpActive, tr( "Tap here to enable or disable the FTP proxy server." ) ); | ||
293 | grplayout->addWidget( m_proxyFtpActive ); | 316 | grplayout->addWidget( m_proxyFtpActive ); |
294 | 317 | ||
295 | // Proxy server username and password configuration | 318 | // Proxy server username and password configuration |
296 | QLabel *label = new QLabel( tr( "Username:" ), container ); | 319 | QLabel *label = new QLabel( tr( "Username:" ), container ); |
320 | QWhatsThis::add( label, tr( "Enter the username for the proxy servers here." ) ); | ||
297 | layout->addWidget( label, 2, 0 ); | 321 | layout->addWidget( label, 2, 0 ); |
298 | m_proxyUsername = new QLineEdit( container ); | 322 | m_proxyUsername = new QLineEdit( container ); |
323 | QWhatsThis::add( m_proxyUsername, tr( "Enter the username for the proxy servers here." ) ); | ||
299 | layout->addWidget( m_proxyUsername, 2, 1 ); | 324 | layout->addWidget( m_proxyUsername, 2, 1 ); |
300 | 325 | ||
301 | label = new QLabel( tr( "Password:" ), container ); | 326 | label = new QLabel( tr( "Password:" ), container ); |
327 | QWhatsThis::add( label, tr( "Enter the password for the proxy servers here." ) ); | ||
302 | layout->addWidget( label, 3, 0 ); | 328 | layout->addWidget( label, 3, 0 ); |
303 | m_proxyPassword = new QLineEdit( container ); | 329 | m_proxyPassword = new QLineEdit( container ); |
330 | QWhatsThis::add( m_proxyPassword, tr( "Enter the password for the proxy servers here." ) ); | ||
304 | layout->addWidget( m_proxyPassword, 3, 1 ); | 331 | layout->addWidget( m_proxyPassword, 3, 1 ); |
305 | } | 332 | } |
306 | 333 | ||
307 | void OIpkgConfigDlg::initOptionsWidget() | 334 | void OIpkgConfigDlg::initOptionsWidget() |
308 | { | 335 | { |
309 | m_optionsWidget = new QWidget( this ); | 336 | m_optionsWidget = new QWidget( this ); |
310 | 337 | ||
311 | // Initialize UI | 338 | // Initialize UI |
312 | QVBoxLayout *vb = new QVBoxLayout( m_optionsWidget ); | 339 | QVBoxLayout *vb = new QVBoxLayout( m_optionsWidget ); |
313 | QScrollView *sv = new QScrollView( m_optionsWidget ); | 340 | QScrollView *sv = new QScrollView( m_optionsWidget ); |
314 | vb->addWidget( sv, 0, 0 ); | 341 | vb->addWidget( sv, 0, 0 ); |
315 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 342 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
316 | sv->setFrameStyle( QFrame::NoFrame ); | 343 | sv->setFrameStyle( QFrame::NoFrame ); |
317 | QWidget *container = new QWidget( sv->viewport() ); | 344 | QWidget *container = new QWidget( sv->viewport() ); |
318 | sv->addChild( container ); | 345 | sv->addChild( container ); |
319 | QVBoxLayout *layout = new QVBoxLayout( container, 2, 4 ); | 346 | QVBoxLayout *layout = new QVBoxLayout( container, 2, 4 ); |
320 | 347 | ||
321 | m_optForceDepends = new QCheckBox( tr( "Force Depends" ), container ); | 348 | m_optForceDepends = new QCheckBox( tr( "Force Depends" ), container ); |
349 | QWhatsThis::add( m_optForceDepends, tr( "Tap here to enable or disable the '-force-depends' option for Ipkg." ) ); | ||
322 | layout->addWidget( m_optForceDepends ); | 350 | layout->addWidget( m_optForceDepends ); |
323 | 351 | ||
324 | m_optForceReinstall = new QCheckBox( tr( "Force Reinstall" ), container ); | 352 | m_optForceReinstall = new QCheckBox( tr( "Force Reinstall" ), container ); |
353 | QWhatsThis::add( m_optForceReinstall, tr( "Tap here to enable or disable the '-force-reinstall' option for Ipkg." ) ); | ||
325 | layout->addWidget( m_optForceReinstall ); | 354 | layout->addWidget( m_optForceReinstall ); |
326 | 355 | ||
327 | m_optForceRemove = new QCheckBox( tr( "Force Remove" ), container ); | 356 | m_optForceRemove = new QCheckBox( tr( "Force Remove" ), container ); |
357 | QWhatsThis::add( m_optForceRemove, tr( "Tap here to enable or disable the '-force-removal-of-dependent-packages' option for Ipkg." ) ); | ||
328 | layout->addWidget( m_optForceRemove ); | 358 | layout->addWidget( m_optForceRemove ); |
329 | 359 | ||
330 | m_optForceOverwrite = new QCheckBox( tr( "Force Overwrite" ), container ); | 360 | m_optForceOverwrite = new QCheckBox( tr( "Force Overwrite" ), container ); |
361 | QWhatsThis::add( m_optForceOverwrite, tr( "Tap here to enable or disable the '-force-overwrite' option for Ipkg." ) ); | ||
331 | layout->addWidget( m_optForceOverwrite ); | 362 | layout->addWidget( m_optForceOverwrite ); |
332 | 363 | ||
333 | QLabel *l = new QLabel( tr( "Information Level" ), container ); | 364 | QLabel *l = new QLabel( tr( "Information Level" ), container ); |
365 | QWhatsThis::add( l, tr( "Select information level for Ipkg." ) ); | ||
334 | layout->addWidget( l ); | 366 | layout->addWidget( l ); |
335 | 367 | ||
336 | m_optVerboseIpkg = new QComboBox( container ); | 368 | m_optVerboseIpkg = new QComboBox( container ); |
369 | QWhatsThis::add( m_optVerboseIpkg, tr( "Select information level for Ipkg." ) ); | ||
337 | m_optVerboseIpkg->insertItem( tr( "Errors only" ) ); | 370 | m_optVerboseIpkg->insertItem( tr( "Errors only" ) ); |
338 | m_optVerboseIpkg->insertItem( tr( "Normal messages" ) ); | 371 | m_optVerboseIpkg->insertItem( tr( "Normal messages" ) ); |
339 | m_optVerboseIpkg->insertItem( tr( "Informative messages" ) ); | 372 | m_optVerboseIpkg->insertItem( tr( "Informative messages" ) ); |
340 | m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) ); | 373 | m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) ); |
341 | layout->addWidget( m_optVerboseIpkg ); | 374 | layout->addWidget( m_optVerboseIpkg ); |
342 | 375 | ||
343 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); | 376 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); |
344 | } | 377 | } |
345 | 378 | ||
346 | void OIpkgConfigDlg::initData() | 379 | void OIpkgConfigDlg::initData() |
347 | { | 380 | { |
348 | // Read ipkg configuration (server/destination/proxy) information | 381 | // Read ipkg configuration (server/destination/proxy) information |
349 | if ( m_ipkg && !m_installOptions ) | 382 | if ( m_ipkg && !m_installOptions ) |
350 | { | 383 | { |
351 | m_configs = m_ipkg->configItems(); | 384 | m_configs = m_ipkg->configItems(); |
352 | if ( m_configs ) | 385 | if ( m_configs ) |
353 | { | 386 | { |
354 | for ( OConfItemListIterator configIt( *m_configs ); configIt.current(); ++configIt ) | 387 | for ( OConfItemListIterator configIt( *m_configs ); configIt.current(); ++configIt ) |
355 | { | 388 | { |
356 | OConfItem *config = configIt.current(); | 389 | OConfItem *config = configIt.current(); |
357 | 390 | ||
358 | // Add configuration item to the appropriate dialog controls | 391 | // Add configuration item to the appropriate dialog controls |
359 | if ( config ) | 392 | if ( config ) |
360 | { | 393 | { |