summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkgconfigdlg.cpp
authordrw <drw>2005-03-10 19:22:02 (UTC)
committer drw <drw>2005-03-10 19:22:02 (UTC)
commitd798f87314392033ad1e18d01927c622aa4d9b02 (patch) (unidiff)
treee6021dbe269c98c9653035aa119e29bcd8f88fc7 /noncore/settings/packagemanager/oipkgconfigdlg.cpp
parent3bf4809c4f2263f0130472c41aa6c85e46e61db9 (diff)
downloadopie-d798f87314392033ad1e18d01927c622aa4d9b02.zip
opie-d798f87314392033ad1e18d01927c622aa4d9b02.tar.gz
opie-d798f87314392033ad1e18d01927c622aa4d9b02.tar.bz2
Some minor UI tweaks
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 5f60990..d234251 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -174,37 +174,40 @@ void OIpkgConfigDlg::initServerWidget()
174 sv->addChild( container ); 174 sv->addChild( container );
175 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); 175 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
176 176
177 m_serverList = new QListBox( container ); 177 m_serverList = new QListBox( container );
178 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." ) ); 178 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." ) );
179 m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); 179 m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
180 connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) ); 180 connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) );
181 layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 ); 181 layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 );
182 182
183 QPixmap pic; 183 QPixmap pic;
184 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 184 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
185 QPushButton *btn = new QPushButton( pic, tr( "New" ), container ); 185 QPushButton *btn = new QPushButton( pic, tr( "New" ), container );
186 btn->setMinimumHeight( AppLnk::smallIconSize() );
186 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); 187 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
187 connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); 188 connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) );
188 layout->addWidget( btn, 1, 0 ); 189 layout->addWidget( btn, 1, 0 );
189 190
190 pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 191 pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
191 m_serverEditBtn = new QPushButton( pic, tr( "Edit" ), container ); 192 m_serverEditBtn = new QPushButton( pic, tr( "Edit" ), container );
193 m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize() );
192 m_serverEditBtn->setEnabled( false ); 194 m_serverEditBtn->setEnabled( false );
193 QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) ); 195 QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) );
194 connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) ); 196 connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) );
195 layout->addWidget( m_serverEditBtn, 1, 1 ); 197 layout->addWidget( m_serverEditBtn, 1, 1 );
196 198
197 pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 199 pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
198 m_serverDeleteBtn = new QPushButton( pic, tr( "Delete" ), container ); 200 m_serverDeleteBtn = new QPushButton( pic, tr( "Delete" ), container );
201 m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() );
199 m_serverDeleteBtn->setEnabled( false ); 202 m_serverDeleteBtn->setEnabled( false );
200 QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); 203 QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
201 connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); 204 connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) );
202 layout->addWidget( m_serverDeleteBtn, 1, 2 ); 205 layout->addWidget( m_serverDeleteBtn, 1, 2 );
203} 206}
204 207
205void OIpkgConfigDlg::initDestinationWidget() 208void OIpkgConfigDlg::initDestinationWidget()
206{ 209{
207 m_destWidget = new QWidget( this ); 210 m_destWidget = new QWidget( this );
208 211
209 // Initialize UI 212 // Initialize UI
210 QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); 213 QVBoxLayout *vb = new QVBoxLayout( m_destWidget );
@@ -216,37 +219,40 @@ void OIpkgConfigDlg::initDestinationWidget()
216 sv->addChild( container ); 219 sv->addChild( container );
217 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); 220 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
218 221
219 m_destList = new QListBox( container ); 222 m_destList = new QListBox( container );
220 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." ) ); 223 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." ) );
221 m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); 224 m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
222 connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) ); 225 connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) );
223 layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 ); 226 layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 );
224 227
225 QPixmap pic; 228 QPixmap pic;
226 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 229 pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
227 QPushButton *btn = new QPushButton( pic, tr( "New" ), container ); 230 QPushButton *btn = new QPushButton( pic, tr( "New" ), container );
231 btn->setMinimumHeight( AppLnk::smallIconSize() );
228 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); 232 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
229 connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); 233 connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) );
230 layout->addWidget( btn, 1, 0 ); 234 layout->addWidget( btn, 1, 0 );
231 235
232 pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 236 pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
233 m_destEditBtn = new QPushButton( pic, tr( "Edit" ), container ); 237 m_destEditBtn = new QPushButton( pic, tr( "Edit" ), container );
238 m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize() );
234 m_destEditBtn->setEnabled( false ); 239 m_destEditBtn->setEnabled( false );
235 QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) ); 240 QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) );
236 connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) ); 241 connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) );
237 layout->addWidget( m_destEditBtn, 1, 1 ); 242 layout->addWidget( m_destEditBtn, 1, 1 );
238 243
239 pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 244 pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
240 m_destDeleteBtn = new QPushButton( pic, tr( "Delete" ), container ); 245 m_destDeleteBtn = new QPushButton( pic, tr( "Delete" ), container );
246 m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() );
241 m_destDeleteBtn->setEnabled( false ); 247 m_destDeleteBtn->setEnabled( false );
242 QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); 248 QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
243 connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); 249 connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) );
244 layout->addWidget( m_destDeleteBtn, 1, 2 ); 250 layout->addWidget( m_destDeleteBtn, 1, 2 );
245} 251}
246 252
247void OIpkgConfigDlg::initProxyWidget() 253void OIpkgConfigDlg::initProxyWidget()
248{ 254{
249 m_proxyWidget = new QWidget( this ); 255 m_proxyWidget = new QWidget( this );
250 256
251 // Initialize UI 257 // Initialize UI
252 QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); 258 QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget );
@@ -645,25 +651,27 @@ OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent )
645 layout->addStretch(); 651 layout->addStretch();
646 652
647 label = new QLabel( tr( "Location:" ), this ); 653 label = new QLabel( tr( "Location:" ), this );
648 QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); 654 QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) );
649 layout->addWidget( label ); 655 layout->addWidget( label );
650 656
651 QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 ); 657 QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 );
652 layout->addLayout( layout2 ); 658 layout->addLayout( layout2 );
653 659
654 m_location = new QLineEdit( this ); 660 m_location = new QLineEdit( this );
655 QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) ); 661 QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) );
656 layout2->addWidget( m_location ); 662 layout2->addWidget( m_location );
657 QPushButton *btn = new QPushButton( Resource::loadPixmap( "folder" ), QString::null, this ); 663 QPixmap pic;
664 pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
665 QPushButton *btn = new QPushButton( pic, QString::null, this );
658 btn->setMaximumWidth( btn->height() ); 666 btn->setMaximumWidth( btn->height() );
659 QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); 667 QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) );
660 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); 668 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) );
661 layout2->addWidget( btn ); 669 layout2->addWidget( btn );
662 670
663 // Populate initial information 671 // Populate initial information
664 if ( m_dest ) 672 if ( m_dest )
665 { 673 {
666 m_name->setText( m_dest->name() ); 674 m_name->setText( m_dest->name() );
667 m_location->setText( m_dest->value() ); 675 m_location->setText( m_dest->value() );
668 m_active->setChecked( m_dest->active() ); 676 m_active->setChecked( m_dest->active() );
669 } 677 }