Diffstat (limited to 'core/settings/button/remapdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/remapdlg.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp index 939a6bf..7dabe68 100644 --- a/core/settings/button/remapdlg.cpp +++ b/core/settings/button/remapdlg.cpp | |||
@@ -1,50 +1,49 @@ | |||
1 | #include <qlistview.h> | 1 | #include <qlistview.h> |
2 | #include <qlabel.h> | ||
3 | #include <qcombobox.h> | 2 | #include <qcombobox.h> |
4 | #include <qtimer.h> | 3 | #include <qtimer.h> |
5 | 4 | ||
6 | #include "remapdlg.h" | 5 | #include "remapdlg.h" |
7 | #include "buttonutils.h" | 6 | #include "buttonutils.h" |
8 | 7 | ||
9 | using namespace Opie; | 8 | using namespace Opie; |
10 | 9 | ||
11 | class NoSortItem : public QListViewItem { | 10 | class NoSortItem : public QListViewItem { |
12 | public: | 11 | public: |
13 | NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) | 12 | NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) |
14 | : QListViewItem ( lv, str, s1, s2 ) | 13 | : QListViewItem ( lv, str, s1, s2 ) |
15 | { | 14 | { |
16 | m_key = QString ( QChar ( 'a' + pos )); | 15 | m_key = QString ( QChar ( 'a' + pos )); |
17 | m_def = false; | 16 | m_def = false; |
18 | } | 17 | } |
19 | 18 | ||
20 | void setDefault ( bool b ) | 19 | void setDefault ( bool b ) |
21 | { | 20 | { |
22 | m_def = b; | 21 | m_def = b; |
23 | } | 22 | } |
24 | 23 | ||
25 | virtual QString key ( int /*column*/, bool /*ascending*/ ) const | 24 | virtual QString key ( int /*column*/, bool /*ascending*/ ) const |
26 | { | 25 | { |
27 | return m_key; | 26 | return m_key; |
28 | } | 27 | } |
29 | 28 | ||
30 | virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) | 29 | virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) |
31 | { | 30 | { |
32 | if ( m_def ) { | 31 | if ( m_def ) { |
33 | QFont f ( listView ( )-> font ( )); | 32 | QFont f ( listView ( )-> font ( )); |
34 | f. setBold ( true ); | 33 | f. setBold ( true ); |
35 | p-> setFont ( f ); | 34 | p-> setFont ( f ); |
36 | } | 35 | } |
37 | QListViewItem::paintCell ( p, cg, column, width, align ); | 36 | QListViewItem::paintCell ( p, cg, column, width, align ); |
38 | } | 37 | } |
39 | 38 | ||
40 | private: | 39 | private: |
41 | QString m_key; | 40 | QString m_key; |
42 | bool m_def; | 41 | bool m_def; |
43 | }; | 42 | }; |
44 | 43 | ||
45 | 44 | ||
46 | RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, const char *name ) | 45 | RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, const char *name ) |
47 | : RemapDlgBase ( parent, name, true, WStyle_ContextHelp ) | 46 | : RemapDlgBase ( parent, name, true, WStyle_ContextHelp ) |
48 | { | 47 | { |
49 | setCaption ( tr( "%1 %2", "(hold|press) buttoname" ). arg( hold ? tr( "Held" ) : tr( "Pressed" )). arg ( b-> userText ( ))); | 48 | setCaption ( tr( "%1 %2", "(hold|press) buttoname" ). arg( hold ? tr( "Held" ) : tr( "Pressed" )). arg ( b-> userText ( ))); |
50 | 49 | ||