author | alwin <alwin> | 2005-03-14 14:57:07 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-14 14:57:07 (UTC) |
commit | 2a1c1ebfe0203d9aa98a966b3571a340f413a624 (patch) (unidiff) | |
tree | 721d87824c7dbb802cd990326c2828554fc49bca | |
parent | 740454f425131a88fbcc973d3ec5cc152aa7fb70 (diff) | |
download | opie-2a1c1ebfe0203d9aa98a966b3571a340f413a624.zip opie-2a1c1ebfe0203d9aa98a966b3571a340f413a624.tar.gz opie-2a1c1ebfe0203d9aa98a966b3571a340f413a624.tar.bz2 |
scrollview - when having a lot of buttons the dialog window is to small
to display them.
-rw-r--r-- | core/settings/button/buttonsettings.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index 779f6ef..a90b4a1 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp | |||
@@ -27,2 +27,6 @@ | |||
27 | 27 | ||
28 | #include "buttonsettings.h" | ||
29 | #include "buttonutils.h" | ||
30 | #include "remapdlg.h" | ||
31 | |||
28 | #include <opie2/odevice.h> | 32 | #include <opie2/odevice.h> |
@@ -34,6 +38,4 @@ | |||
34 | #include <qtimer.h> | 38 | #include <qtimer.h> |
39 | #include <qscrollview.h> | ||
35 | 40 | ||
36 | #include "buttonsettings.h" | ||
37 | #include "buttonutils.h" | ||
38 | #include "remapdlg.h" | ||
39 | 41 | ||
@@ -67,4 +69,12 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
67 | QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); | 69 | QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); |
70 | QScrollView*mainview = new QScrollView(this); | ||
71 | mainview->setResizePolicy( QScrollView::AutoOneFit ); | ||
72 | |||
73 | toplay->addWidget(mainview); | ||
74 | QFrame*framehold=new QFrame(mainview->viewport()); | ||
75 | framehold->setFrameStyle(QFrame::NoFrame|QFrame::Plain); | ||
76 | mainview->addChild(framehold); | ||
77 | toplay = new QVBoxLayout (framehold, 3, 3 ); | ||
68 | 78 | ||
69 | QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); | 79 | QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), framehold ); |
70 | toplay-> addWidget ( l ); | 80 | toplay-> addWidget ( l ); |
@@ -84,3 +94,3 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
84 | if ( it != buttons. begin ( )) { | 94 | if ( it != buttons. begin ( )) { |
85 | QFrame *f = new QFrame ( this ); | 95 | QFrame *f = new QFrame ( framehold ); |
86 | f-> setFrameStyle ( QFrame::Sunken | QFrame::VLine ); | 96 | f-> setFrameStyle ( QFrame::Sunken | QFrame::VLine ); |
@@ -98,3 +108,3 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
98 | 108 | ||
99 | l = new QLabel ( this ); | 109 | l = new QLabel ( framehold ); |
100 | l-> setPixmap (( *it ). pixmap ( )); | 110 | l-> setPixmap (( *it ). pixmap ( )); |
@@ -103,8 +113,8 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
103 | 113 | ||
104 | l = new QLabel ( tr( "Press:" ), this ); | 114 | l = new QLabel ( tr( "Press:" ), framehold ); |
105 | lay-> addWidget ( l, i, 1, AlignLeft | AlignBottom ); | 115 | lay-> addWidget ( l, i, 1, AlignLeft | AlignBottom ); |
106 | l = new QLabel ( tr( "Hold:" ), this ); | 116 | l = new QLabel ( tr( "Hold:" ), framehold ); |
107 | lay-> addWidget ( l, i + 1, 1, AlignLeft | AlignTop ); | 117 | lay-> addWidget ( l, i + 1, 1, AlignLeft | AlignTop ); |
108 | 118 | ||
109 | l = new QLabel ( this ); | 119 | l = new QLabel ( framehold ); |
110 | l-> setFixedSize ( 16, 16 ); | 120 | l-> setFixedSize ( 16, 16 ); |
@@ -113,3 +123,3 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
113 | 123 | ||
114 | l = new QLabel ( this ); | 124 | l = new QLabel ( framehold ); |
115 | l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); | 125 | l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); |
@@ -118,3 +128,3 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
118 | 128 | ||
119 | l = new QLabel ( this ); | 129 | l = new QLabel ( framehold ); |
120 | l-> setFixedSize ( 16, 16 ); | 130 | l-> setFixedSize ( 16, 16 ); |
@@ -123,3 +133,3 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags | |||
123 | 133 | ||
124 | l = new QLabel ( this ); | 134 | l = new QLabel ( framehold ); |
125 | l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); | 135 | l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); |