Diffstat (limited to 'noncore/settings/packagemanager/entrydlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/entrydlg.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/packagemanager/entrydlg.cpp b/noncore/settings/packagemanager/entrydlg.cpp index 5d61342..1e87e64 100644 --- a/noncore/settings/packagemanager/entrydlg.cpp +++ b/noncore/settings/packagemanager/entrydlg.cpp | |||
@@ -22,49 +22,49 @@ | |||
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 | #include "entrydlg.h" | 31 | #include "entrydlg.h" |
32 | 32 | ||
33 | #include <opie2/ofiledialog.h> | 33 | #include <opie2/ofiledialog.h> |
34 | #include <opie2/oresource.h> | ||
34 | 35 | ||
35 | #include <qpe/qpeapplication.h> | 36 | #include <qpe/qpeapplication.h> |
36 | #include <qpe/resource.h> | ||
37 | 37 | ||
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | #include <qlineedit.h> | 40 | #include <qlineedit.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | 42 | ||
43 | EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal ) | 43 | EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal ) |
44 | : QDialog( parent, name, modal ) | 44 | : QDialog( parent, name, modal ) |
45 | { | 45 | { |
46 | QGridLayout *layout = new QGridLayout( this, 3, 2, 2, 4 ); | 46 | QGridLayout *layout = new QGridLayout( this, 3, 2, 2, 4 ); |
47 | 47 | ||
48 | QLabel *l = new QLabel( label, this ); | 48 | QLabel *l = new QLabel( label, this ); |
49 | l->setAlignment( AlignLeft | AlignTop | WordBreak ); | 49 | l->setAlignment( AlignLeft | AlignTop | WordBreak ); |
50 | layout->addMultiCellWidget( l, 0, 0, 0, 1 ); | 50 | layout->addMultiCellWidget( l, 0, 0, 0, 1 ); |
51 | 51 | ||
52 | m_entry = new QLineEdit( this ); | 52 | m_entry = new QLineEdit( this ); |
53 | layout->addWidget( m_entry, 1, 0 ); | 53 | layout->addWidget( m_entry, 1, 0 ); |
54 | connect( m_entry, SIGNAL(returnPressed()), this, SLOT(slotTryAccept()) ); | 54 | connect( m_entry, SIGNAL(returnPressed()), this, SLOT(slotTryAccept()) ); |
55 | 55 | ||
56 | QPixmap pic; | 56 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ), |
57 | pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 57 | QString::null, this ); |
58 | QPushButton *btn = new QPushButton( pic, QString::null, this ); | 58 | btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
59 | btn->setMaximumWidth( btn->height() ); | 59 | btn->setMaximumWidth( btn->height() ); |
60 | connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); | 60 | connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); |
61 | layout->addWidget( btn, 1, 1 ); | 61 | layout->addWidget( btn, 1, 1 ); |
62 | 62 | ||
63 | layout->setRowStretch( 2, 10 ); | 63 | layout->setRowStretch( 2, 10 ); |
64 | 64 | ||
65 | resize( width(), l->height() + btn->height() + 8 ); | 65 | resize( width(), l->height() + btn->height() + 8 ); |
66 | } | 66 | } |
67 | 67 | ||
68 | void EntryDlg::setText( const QString &text ) | 68 | void EntryDlg::setText( const QString &text ) |
69 | { | 69 | { |
70 | m_entry->setText( text ); | 70 | m_entry->setText( text ); |