author | ar <ar> | 2004-05-02 17:31:50 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-02 17:31:50 (UTC) |
commit | a210b9a597ba0c929d95c38ffbaf972916c7b8a7 (patch) (unidiff) | |
tree | ce121d5017eb054222c86e0afb6057a28ea7bf8a /core/settings/button/remapdlg.cpp | |
parent | 18759e9156c96795831120408a9da0d3b4ec71a4 (diff) | |
download | opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.zip opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.gz opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'core/settings/button/remapdlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/button/remapdlg.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp index 4effebc..cadb955 100644 --- a/core/settings/button/remapdlg.cpp +++ b/core/settings/button/remapdlg.cpp | |||
@@ -1,30 +1,36 @@ | |||
1 | |||
2 | #include "remapdlg.h" | ||
3 | #include "buttonutils.h" | ||
4 | |||
5 | /* OPIE */ | ||
6 | #include <opie2/odebug.h> | ||
7 | |||
8 | /* QT */ | ||
1 | #include <qlistview.h> | 9 | #include <qlistview.h> |
2 | #include <qcombobox.h> | 10 | #include <qcombobox.h> |
3 | #include <qtimer.h> | 11 | #include <qtimer.h> |
4 | 12 | ||
5 | #include "remapdlg.h" | ||
6 | #include "buttonutils.h" | ||
7 | 13 | ||
8 | 14 | ||
9 | using namespace Opie::Core; | 15 | using namespace Opie::Core; |
10 | class NoSortItem : public QListViewItem { | 16 | class NoSortItem : public QListViewItem { |
11 | public: | 17 | public: |
12 | NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) | 18 | NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) |
13 | : QListViewItem ( lv, str, s1, s2 ) | 19 | : QListViewItem ( lv, str, s1, s2 ) |
14 | { | 20 | { |
15 | m_key = QString ( QChar ( 'a' + pos )); | 21 | m_key = QString ( QChar ( 'a' + pos )); |
16 | m_def = false; | 22 | m_def = false; |
17 | } | 23 | } |
18 | 24 | ||
19 | void setDefault ( bool b ) | 25 | void setDefault ( bool b ) |
20 | { | 26 | { |
21 | m_def = b; | 27 | m_def = b; |
22 | } | 28 | } |
23 | 29 | ||
24 | virtual QString key ( int /*column*/, bool /*ascending*/ ) const | 30 | virtual QString key ( int /*column*/, bool /*ascending*/ ) const |
25 | { | 31 | { |
26 | return m_key; | 32 | return m_key; |
27 | } | 33 | } |
28 | 34 | ||
29 | virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) | 35 | virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) |
30 | { | 36 | { |
@@ -87,58 +93,58 @@ RemapDlg::~RemapDlg ( ) | |||
87 | } | 93 | } |
88 | 94 | ||
89 | void RemapDlg::delayedInit ( ) | 95 | void RemapDlg::delayedInit ( ) |
90 | { | 96 | { |
91 | bool b = w_list-> viewport ( )-> isUpdatesEnabled ( ); | 97 | bool b = w_list-> viewport ( )-> isUpdatesEnabled ( ); |
92 | w_list-> viewport ( )-> setUpdatesEnabled ( false ); | 98 | w_list-> viewport ( )-> setUpdatesEnabled ( false ); |
93 | 99 | ||
94 | ButtonUtils::inst ( )-> insertAppLnks ( m_map_show ); | 100 | ButtonUtils::inst ( )-> insertAppLnks ( m_map_show ); |
95 | 101 | ||
96 | w_list-> viewport ( )-> setUpdatesEnabled ( b ); | 102 | w_list-> viewport ( )-> setUpdatesEnabled ( b ); |
97 | 103 | ||
98 | m_map_show-> repaint ( ); | 104 | m_map_show-> repaint ( ); |
99 | } | 105 | } |
100 | 106 | ||
101 | void RemapDlg::itemChanged ( QListViewItem *it ) | 107 | void RemapDlg::itemChanged ( QListViewItem *it ) |
102 | { | 108 | { |
103 | bool enabled = false; | 109 | bool enabled = false; |
104 | OQCopMessage m; | 110 | OQCopMessage m; |
105 | 111 | ||
106 | m_current = it; | 112 | m_current = it; |
107 | 113 | ||
108 | if ( it == m_map_none ) | 114 | if ( it == m_map_none ) |
109 | { | 115 | { |
110 | m_msg = m = OQCopMessage ( "ignore", 0 ); | 116 | m_msg = m = OQCopMessage ( "ignore", 0 ); |
111 | qDebug ("***ignoring"); | 117 | odebug << "***ignoring" << oendl; |
112 | } | 118 | } |
113 | else if ( it == m_map_preset ) | 119 | else if ( it == m_map_preset ) |
114 | { | 120 | { |
115 | m_msg = m = m_msg_preset; | 121 | m_msg = m = m_msg_preset; |
116 | qDebug ("***Preset"); | 122 | odebug << "***Preset" << oendl; |
117 | } | 123 | } |
118 | else if ( it && !it-> childCount ( ) ) | 124 | else if ( it && !it-> childCount ( ) ) |
119 | { | 125 | { |
120 | qDebug ("***Custom: %s %s ",it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); | 126 | odebug << "***Custom: " << it-> text ( 1 ). latin1 ( ) << " " << it-> text ( 2 ). latin1 ( ) << oendl; |
121 | enabled = ( it == m_map_custom ); | 127 | enabled = ( it == m_map_custom ); |
122 | m_msg = m = OQCopMessage ( it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); | 128 | m_msg = m = OQCopMessage ( it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); |
123 | } | 129 | } |
124 | 130 | ||
125 | w_channel-> setEnabled ( enabled ); | 131 | w_channel-> setEnabled ( enabled ); |
126 | w_message-> setEnabled ( enabled ); | 132 | w_message-> setEnabled ( enabled ); |
127 | 133 | ||
128 | w_channel-> setEditText ( m. channel ( )); | 134 | w_channel-> setEditText ( m. channel ( )); |
129 | //hack for if user has typed in a message, such as 'suspend()' | 135 | //hack for if user has typed in a message, such as 'suspend()' |
130 | //so raise() is always present | 136 | //so raise() is always present |
131 | if(m. message ( ) != "raise()") | 137 | if(m. message ( ) != "raise()") |
132 | w_message->insertItem("raise()"); | 138 | w_message->insertItem("raise()"); |
133 | w_message-> setEditText ( m. message ( )); | 139 | w_message-> setEditText ( m. message ( )); |
134 | } | 140 | } |
135 | 141 | ||
136 | void RemapDlg::textChanged ( const QString &str ) | 142 | void RemapDlg::textChanged ( const QString &str ) |
137 | { | 143 | { |
138 | if ( !m_current ) | 144 | if ( !m_current ) |
139 | return; | 145 | return; |
140 | 146 | ||
141 | QComboBox *which = (QComboBox *) sender ( ); | 147 | QComboBox *which = (QComboBox *) sender ( ); |
142 | 148 | ||
143 | if ( which == w_channel ) | 149 | if ( which == w_channel ) |
144 | m_current-> setText ( 1, str ); | 150 | m_current-> setText ( 1, str ); |