Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/ablabel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp index 70a66a0..8216d6f 100644 --- a/core/pim/addressbook/ablabel.cpp +++ b/core/pim/addressbook/ablabel.cpp | |||
@@ -11,25 +11,25 @@ | |||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "ablabel.h" | 21 | #include "ablabel.h" |
22 | 22 | ||
23 | 23 | #include <opie2/odebug.h> | |
24 | 24 | ||
25 | AbLabel::AbLabel( QWidget *parent, const char *name ): | 25 | AbLabel::AbLabel( QWidget *parent, const char *name ): |
26 | QTextView( parent, name ), | 26 | QTextView( parent, name ), |
27 | m_empty( false ) | 27 | m_empty( false ) |
28 | { | 28 | { |
29 | } | 29 | } |
30 | 30 | ||
31 | AbLabel::~AbLabel() | 31 | AbLabel::~AbLabel() |
32 | { | 32 | { |
33 | } | 33 | } |
34 | 34 | ||
35 | void AbLabel::setContacts( const Opie::OPimContactAccess::List& viewList ) | 35 | void AbLabel::setContacts( const Opie::OPimContactAccess::List& viewList ) |
@@ -86,50 +86,50 @@ void AbLabel::sync() | |||
86 | { | 86 | { |
87 | QString text = (*m_itCurContact).toRichText(); | 87 | QString text = (*m_itCurContact).toRichText(); |
88 | setText( text ); | 88 | setText( text ); |
89 | } | 89 | } |
90 | 90 | ||
91 | void AbLabel::keyPressEvent( QKeyEvent *e ) | 91 | void AbLabel::keyPressEvent( QKeyEvent *e ) |
92 | { | 92 | { |
93 | 93 | ||
94 | // Commonly handled keys | 94 | // Commonly handled keys |
95 | if ( !m_empty ){ | 95 | if ( !m_empty ){ |
96 | switch( e->key() ) { | 96 | switch( e->key() ) { |
97 | case Qt::Key_Left: | 97 | case Qt::Key_Left: |
98 | qWarning( "Left.."); | 98 | Opie::Core::owarn << "Left.." << oendl; |
99 | case Qt::Key_Right: | 99 | case Qt::Key_Right: |
100 | qWarning( "Right.."); | 100 | Opie::Core::owarn << "Right.." << oendl; |
101 | case Qt::Key_F33: | 101 | case Qt::Key_F33: |
102 | qWarning( "OK.."); | 102 | Opie::Core::owarn << "OK.." << oendl; |
103 | emit signalOkPressed(); | 103 | emit signalOkPressed(); |
104 | break; | 104 | break; |
105 | case Qt::Key_Up: | 105 | case Qt::Key_Up: |
106 | qWarning( "UP.."); | 106 | Opie::Core::owarn << "Up.." << oendl; |
107 | if ( ( visibleHeight() < contentsHeight() ) && | 107 | if ( ( visibleHeight() < contentsHeight() ) && |
108 | ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) ) | 108 | ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) ) |
109 | scrollBy( 0, -(visibleHeight()-20) ); | 109 | scrollBy( 0, -(visibleHeight()-20) ); |
110 | else { | 110 | else { |
111 | --m_itCurContact; | 111 | --m_itCurContact; |
112 | if ( *m_itCurContact != Opie::OPimContact() ) | 112 | if ( *m_itCurContact != Opie::OPimContact() ) |
113 | sync(); | 113 | sync(); |
114 | else | 114 | else |
115 | m_itCurContact = m_viewList.end(); | 115 | m_itCurContact = m_viewList.end(); |
116 | } | 116 | } |
117 | 117 | ||
118 | break; | 118 | break; |
119 | case Qt::Key_Down: | 119 | case Qt::Key_Down: |
120 | qWarning( "DOWN.."); | 120 | Opie::Core::owarn << "Down.." << oendl; |
121 | // qWarning( "visible: %d, content: %d",visibleHeight(),contentsHeight()); | 121 | // Opie::Core::owarn << "Visible: " << visibleHeight() << ", content: " << contentHeight() << oendl; |
122 | // qWarning( "value: %d; barMaxValue: %d", verticalScrollBar()->value() | 122 | // Opie::Core::owarn << "Value: " << verticalScrollBar()->value() |
123 | // , verticalScrollBar()->maxValue() ); | 123 | // << ", barMaxValue: " << verticalScrollBar()->maxValue() << oendl; |
124 | if ( ( visibleHeight() < contentsHeight() ) && | 124 | if ( ( visibleHeight() < contentsHeight() ) && |
125 | ( verticalScrollBar()->value() < verticalScrollBar()->maxValue() ) ) | 125 | ( verticalScrollBar()->value() < verticalScrollBar()->maxValue() ) ) |
126 | scrollBy( 0, visibleHeight()-20 ); | 126 | scrollBy( 0, visibleHeight()-20 ); |
127 | else { | 127 | else { |
128 | ++m_itCurContact; | 128 | ++m_itCurContact; |
129 | if ( *m_itCurContact != Opie::OPimContact() ) | 129 | if ( *m_itCurContact != Opie::OPimContact() ) |
130 | sync(); | 130 | sync(); |
131 | else | 131 | else |
132 | m_itCurContact = m_viewList.begin(); | 132 | m_itCurContact = m_viewList.begin(); |
133 | } | 133 | } |
134 | break; | 134 | break; |
135 | case Qt::Key_Return: // fall through | 135 | case Qt::Key_Return: // fall through |