summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/settings/button/buttonsettings.cpp34
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
@@ -25,6 +25,10 @@
25 25
26*/ 26*/
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>
29 33
30#include <qpe/applnk.h> 34#include <qpe/applnk.h>
@@ -32,10 +36,8 @@
32#include <qlayout.h> 36#include <qlayout.h>
33#include <qlabel.h> 37#include <qlabel.h>
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
40using namespace Opie::Core; 42using namespace Opie::Core;
41 43
@@ -65,8 +67,16 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags
65 setCaption ( tr( "Button Settings" )); 67 setCaption ( tr( "Button Settings" ));
66 68
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 );
71 81
72 QGridLayout *lay = new QGridLayout ( toplay ); 82 QGridLayout *lay = new QGridLayout ( toplay );
@@ -82,7 +92,7 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags
82 int index = 0; 92 int index = 0;
83 for ( QValueList<ODeviceButton>::ConstIterator it = buttons. begin ( ); it != buttons. end ( ); it++ ) { 93 for ( QValueList<ODeviceButton>::ConstIterator it = buttons. begin ( ); it != buttons. end ( ); it++ ) {
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 );
87 lay-> addMultiCellWidget ( f, i, i, 0, 3 ); 97 lay-> addMultiCellWidget ( f, i, i, 0, 3 );
88 i++; 98 i++;
@@ -96,32 +106,32 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *, bool, WFlags
96 bi-> m_pdirty = false; 106 bi-> m_pdirty = false;
97 bi-> m_hdirty = false; 107 bi-> m_hdirty = false;
98 108
99 l = new QLabel ( this ); 109 l = new QLabel ( framehold );
100 l-> setPixmap (( *it ). pixmap ( )); 110 l-> setPixmap (( *it ). pixmap ( ));
101 111
102 lay-> addMultiCellWidget ( l, i, i + 1, 0, 0 ); 112 lay-> addMultiCellWidget ( l, i, i + 1, 0, 0 );
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 );
111 lay-> addWidget ( l, i, 2, AlignLeft | AlignBottom ); 121 lay-> addWidget ( l, i, 2, AlignLeft | AlignBottom );
112 bi-> m_picon = l; 122 bi-> m_picon = l;
113 123
114 l = new QLabel ( this ); 124 l = new QLabel ( framehold );
115 l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); 125 l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine );
116 lay-> addWidget ( l, i, 3, AlignLeft | AlignBottom ); 126 lay-> addWidget ( l, i, 3, AlignLeft | AlignBottom );
117 bi-> m_plabel = l; 127 bi-> m_plabel = l;
118 128
119 l = new QLabel ( this ); 129 l = new QLabel ( framehold );
120 l-> setFixedSize ( 16, 16 ); 130 l-> setFixedSize ( 16, 16 );
121 lay-> addWidget ( l, i + 1, 2, AlignLeft | AlignTop ); 131 lay-> addWidget ( l, i + 1, 2, AlignLeft | AlignTop );
122 bi-> m_hicon = l; 132 bi-> m_hicon = l;
123 133
124 l = new QLabel ( this ); 134 l = new QLabel ( framehold );
125 l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); 135 l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine );
126 lay-> addWidget ( l, i + 1, 3, AlignLeft | AlignTop ); 136 lay-> addWidget ( l, i + 1, 3, AlignLeft | AlignTop );
127 bi-> m_hlabel = l; 137 bi-> m_hlabel = l;