summaryrefslogtreecommitdiff
path: root/noncore
authordrw <drw>2005-03-10 19:22:02 (UTC)
committer drw <drw>2005-03-10 19:22:02 (UTC)
commitd798f87314392033ad1e18d01927c622aa4d9b02 (patch) (unidiff)
treee6021dbe269c98c9653035aa119e29bcd8f88fc7 /noncore
parent3bf4809c4f2263f0130472c41aa6c85e46e61db9 (diff)
downloadopie-d798f87314392033ad1e18d01927c622aa4d9b02.zip
opie-d798f87314392033ad1e18d01927c622aa4d9b02.tar.gz
opie-d798f87314392033ad1e18d01927c622aa4d9b02.tar.bz2
Some minor UI tweaks
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/entrydlg.cpp74
-rw-r--r--noncore/settings/packagemanager/entrydlg.h45
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp8
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp10
4 files changed, 85 insertions, 52 deletions
diff --git a/noncore/settings/packagemanager/entrydlg.cpp b/noncore/settings/packagemanager/entrydlg.cpp
index fd275e1..3b794b4 100644
--- a/noncore/settings/packagemanager/entrydlg.cpp
+++ b/noncore/settings/packagemanager/entrydlg.cpp
@@ -1,25 +1,25 @@
1/* 1/*
2                This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2004 Dan Williams <drw@handhelds.org> 4 =. Copyright (c) 2004 Dan Williams <drw@handhelds.org>
5             .=l. 5 .=l.
6           .>+-= 6 .>+-=
7 _;:,     .>    :=|. This file is free software; you can 7_;:, .> :=|. This file is free software; you can
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,
@@ -31,3 +31,6 @@
31 31
32#include <opie2/ofiledialog.h>
33
32#include <qpe/qpeapplication.h> 34#include <qpe/qpeapplication.h>
35#include <qpe/resource.h>
33 36
@@ -41,3 +44,3 @@ EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, boo
41{ 44{
42 QVBoxLayout *vbox = new QVBoxLayout( this, 6, 6 ); 45 QGridLayout *layout = new QGridLayout( this, 3, 2, 2, 4 );
43 46
@@ -45,8 +48,18 @@ EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, boo
45 l->setAlignment( AlignLeft | AlignTop | WordBreak ); 48 l->setAlignment( AlignLeft | AlignTop | WordBreak );
46 vbox->addWidget( l ); 49 layout->addMultiCellWidget( l, 0, 0, 0, 1 );
47 50
48 m_entry = new QLineEdit( this ); 51 m_entry = new QLineEdit( this );
49 vbox->addWidget( m_entry ); 52 layout->addWidget( m_entry, 1, 0 );
53 connect( m_entry, SIGNAL(returnPressed()), this, SLOT(slotTryAccept()) );
54
55 QPixmap pic;
56 pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
57 QPushButton *btn = new QPushButton( pic, QString::null, this );
58 btn->setMaximumWidth( btn->height() );
59 connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) );
60 layout->addWidget( btn, 1, 1 );
61
62 layout->setRowStretch( 2, 10 );
50 63
51 connect( m_entry, SIGNAL(returnPressed()), this, SLOT(tryAccept()) ); 64 resize( width(), l->height() + btn->height() + 8 );
52} 65}
@@ -80,3 +93,3 @@ QString EntryDlg::getText( const QString &caption, const QString &label, const Q
80} 93}
81void EntryDlg::tryAccept() 94void EntryDlg::slotTryAccept()
82{ 95{
@@ -85 +98,10 @@ void EntryDlg::tryAccept()
85} 98}
99
100void EntryDlg::slotSelectPath()
101{
102 QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_entry->text() );
103 if ( path.at( path.length() - 1 ) == '/' )
104 path.truncate( path.length() - 1 );
105 if ( !path.isNull() )
106 m_entry->setText( path );
107}
diff --git a/noncore/settings/packagemanager/entrydlg.h b/noncore/settings/packagemanager/entrydlg.h
index 33a7920..012589b 100644
--- a/noncore/settings/packagemanager/entrydlg.h
+++ b/noncore/settings/packagemanager/entrydlg.h
@@ -1,25 +1,25 @@
1/* 1/*
2                This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2004 Dan Williams <drw@handhelds.org> 4 =. Copyright (c) 2004 Dan Williams <drw@handhelds.org>
5             .=l. 5 .=l.
6           .>+-= 6 .>+-=
7 _;:,     .>    :=|. This file is free software; you can 7_;:, .> :=|. This file is free software; you can
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,
@@ -50,3 +50,4 @@ public:
50private slots: 50private slots:
51 void tryAccept(); 51 void slotTryAccept();
52 void slotSelectPath();
52 53
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp
index 36851b0..8aed10d 100644
--- a/noncore/settings/packagemanager/installdlg.cpp
+++ b/noncore/settings/packagemanager/installdlg.cpp
@@ -134,2 +134,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
134 m_btnStart = new QPushButton( pic, tr( "Start" ), this ); 134 m_btnStart = new QPushButton( pic, tr( "Start" ), this );
135 m_btnStart->setMinimumHeight( AppLnk::smallIconSize() );
135 layout->addWidget( m_btnStart, 3, 0 ); 136 layout->addWidget( m_btnStart, 3, 0 );
@@ -139,2 +140,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
139 m_btnOptions = new QPushButton( pic, tr( "Options" ), this ); 140 m_btnOptions = new QPushButton( pic, tr( "Options" ), this );
141 m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() );
140 layout->addWidget( m_btnOptions, 3, 1 ); 142 layout->addWidget( m_btnOptions, 3, 1 );
@@ -223,3 +225,3 @@ void InstallDlg::slotBtnStart()
223 QPixmap pic; 225 QPixmap pic;
224 pic.convertFromImage( Resource::loadImage( "enter" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 226 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
225 m_btnStart->setIconSet( pic ); 227 m_btnStart->setIconSet( pic );
@@ -247,3 +249,3 @@ void InstallDlg::slotBtnStart()
247 QPixmap pic; 249 QPixmap pic;
248 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 250 pic.convertFromImage( Resource::loadImage( "reset" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
249 m_btnStart->setIconSet( pic ); 251 m_btnStart->setIconSet( pic );
@@ -266,3 +268,3 @@ void InstallDlg::slotBtnStart()
266 QPixmap pic; 268 QPixmap pic;
267 pic.convertFromImage( Resource::loadImage( "enter" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 269 pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
268 m_btnStart->setIconSet( pic ); 270 m_btnStart->setIconSet( pic );
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
@@ -185,2 +185,3 @@ void OIpkgConfigDlg::initServerWidget()
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." ) );
@@ -191,2 +192,3 @@ void OIpkgConfigDlg::initServerWidget()
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 );
@@ -198,2 +200,3 @@ void OIpkgConfigDlg::initServerWidget()
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 );
@@ -227,2 +230,3 @@ void OIpkgConfigDlg::initDestinationWidget()
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." ) );
@@ -233,2 +237,3 @@ void OIpkgConfigDlg::initDestinationWidget()
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 );
@@ -240,2 +245,3 @@ void OIpkgConfigDlg::initDestinationWidget()
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 );
@@ -656,3 +662,5 @@ OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent )
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() );