author | sandman <sandman> | 2002-12-30 04:46:13 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-30 04:46:13 (UTC) |
commit | 67391742b90744379da532fc41e6229660e40df6 (patch) (side-by-side diff) | |
tree | 48b80eca861913e90d3e976beeac29551e41b9cd | |
parent | 44c6258229855c60b0dd813ad60bc3e0b384b207 (diff) | |
download | opie-67391742b90744379da532fc41e6229660e40df6.zip opie-67391742b90744379da532fc41e6229660e40df6.tar.gz opie-67391742b90744379da532fc41e6229660e40df6.tar.bz2 |
minor GUI fix
-rw-r--r-- | core/settings/button/buttonsettings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index 8b0b0a8..eabb779 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp @@ -23,129 +23,129 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qlayout.h> #include <qlabel.h> #include <qtimer.h> #include <qpe/qpeapplication.h> #include <opie/odevice.h> #include "buttonsettings.h" #include "buttonutils.h" #include "remapdlg.h" using namespace Opie; struct buttoninfo { const ODeviceButton *m_button; int m_index; OQCopMessage m_pmsg; QLabel *m_picon; QLabel *m_plabel; OQCopMessage m_hmsg; QLabel *m_hicon; QLabel *m_hlabel; bool m_pdirty : 1; bool m_hdirty : 1; }; ButtonSettings::ButtonSettings ( ) : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) { const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); (void) ButtonUtils::inst ( ); // initialise setCaption ( tr( "Button Settings" )); QVBoxLayout *toplay = new QVBoxLayout ( this, 3, 3 ); QLabel *l = new QLabel ( tr( "<center>Press or hold the button you want to remap.</center>" ), this ); toplay-> addWidget ( l ); QGridLayout *lay = new QGridLayout ( toplay ); lay-> setMargin ( 0 ); lay-> setColStretch ( 0, 0 ); lay-> setColStretch ( 1, 0 ); lay-> setColStretch ( 2, 0 ); lay-> setColStretch ( 3, 10 ); m_infos. setAutoDelete ( true ); int i = 1; int index = 0; for ( QValueList<ODeviceButton>::ConstIterator it = buttons. begin ( ); it != buttons. end ( ); it++ ) { if ( it != buttons. begin ( )) { QFrame *f = new QFrame ( this ); f-> setFrameStyle ( QFrame::Sunken | QFrame::VLine ); - lay-> addMultiCellWidget ( f, i, i, 0, 2 ); + lay-> addMultiCellWidget ( f, i, i, 0, 3 ); i++; } buttoninfo *bi = new buttoninfo ( ); bi-> m_button = &(*it); bi-> m_index = index++; bi-> m_pmsg = (*it). pressedAction ( ); bi-> m_hmsg = (*it). heldAction ( ); bi-> m_pdirty = false; bi-> m_hdirty = false; l = new QLabel ( this ); l-> setPixmap (( *it ). pixmap ( )); lay-> addMultiCellWidget ( l, i, i + 1, 0, 0 ); l = new QLabel ( tr( "Press:" ), this ); lay-> addWidget ( l, i, 1, AlignLeft | AlignBottom ); l = new QLabel ( tr( "Hold:" ), this ); lay-> addWidget ( l, i + 1, 1, AlignLeft | AlignTop ); l = new QLabel ( this ); l-> setFixedSize ( 16, 16 ); lay-> addWidget ( l, i, 2, AlignLeft | AlignBottom ); bi-> m_picon = l; l = new QLabel ( this ); l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); lay-> addWidget ( l, i, 3, AlignLeft | AlignBottom ); bi-> m_plabel = l; l = new QLabel ( this ); l-> setFixedSize ( 16, 16 ); lay-> addWidget ( l, i + 1, 2, AlignLeft | AlignTop ); bi-> m_hicon = l; l = new QLabel ( this ); l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); lay-> addWidget ( l, i + 1, 3, AlignLeft | AlignTop ); bi-> m_hlabel = l; i += 2; m_infos. append ( bi ); } toplay-> addStretch ( 10 ); m_last_button = 0; m_lock = false; m_timer = new QTimer ( this ); connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( keyTimeout ( ))); updateLabels ( ); QPEApplication::grabKeyboard ( ); } ButtonSettings::~ButtonSettings ( ) { QPEApplication::ungrabKeyboard ( ); } |