author | ar <ar> | 2004-05-31 15:26:50 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-31 15:26:50 (UTC) |
commit | 27dfc34d411dee76f09f5e516c60b0a64eb35948 (patch) (unidiff) | |
tree | b7f7259497630390e352a1257cac5dc59f5399a6 | |
parent | 27b09fe4f930b96e82cea9fb0eb1a9b87f7ec062 (diff) | |
download | opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.zip opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.gz opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.bz2 |
- convert qWarning to owarn
20 files changed, 1037 insertions, 998 deletions
diff --git a/noncore/apps/opie-write/qrichtext_p.h b/noncore/apps/opie-write/qrichtext_p.h index e368edb..3778feb 100644 --- a/noncore/apps/opie-write/qrichtext_p.h +++ b/noncore/apps/opie-write/qrichtext_p.h | |||
@@ -52,2 +52,5 @@ | |||
52 | 52 | ||
53 | #include <opie2/odebug.h> | ||
54 | using namespace Opie::Core; | ||
55 | |||
53 | #ifndef QT_H | 56 | #ifndef QT_H |
@@ -126,6 +129,6 @@ public: | |||
126 | { | 129 | { |
127 | QTextFormat *format; | 130 | QTextFormat *format; |
128 | QTextCustomItem *custom; | 131 | QTextCustomItem *custom; |
129 | QString anchorName; | 132 | QString anchorName; |
130 | QString anchorHref; | 133 | QString anchorHref; |
131 | }; | 134 | }; |
@@ -135,4 +138,4 @@ public: | |||
135 | union { | 138 | union { |
136 | QTextFormat* format; | 139 | QTextFormat* format; |
137 | CustomData* custom; | 140 | CustomData* custom; |
138 | } d; | 141 | } d; |
@@ -146,4 +149,4 @@ private: | |||
146 | QTextStringChar &operator=( const QTextStringChar & ) { | 149 | QTextStringChar &operator=( const QTextStringChar & ) { |
147 | //abort(); | 150 | //abort(); |
148 | return *this; | 151 | return *this; |
149 | } | 152 | } |
@@ -210,3 +213,3 @@ inline bool QTextString::isBidi() const | |||
210 | if ( bidiDirty ) | 213 | if ( bidiDirty ) |
211 | checkBidi(); | 214 | checkBidi(); |
212 | return bidi; | 215 | return bidi; |
@@ -217,3 +220,3 @@ inline bool QTextString::isRightToLeft() const | |||
217 | if ( bidiDirty ) | 220 | if ( bidiDirty ) |
218 | checkBidi(); | 221 | checkBidi(); |
219 | return rightToLeft; | 222 | return rightToLeft; |
@@ -386,3 +389,3 @@ public: | |||
386 | QTextCustomItem( QTextDocument *p ) | 389 | QTextCustomItem( QTextDocument *p ) |
387 | : xpos(0), ypos(-1), width(-1), height(0), parent( p ) | 390 | : xpos(0), ypos(-1), width(-1), height(0), parent( p ) |
388 | {} | 391 | {} |
@@ -440,3 +443,3 @@ public: | |||
440 | QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, | 443 | QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, |
441 | QMimeSourceFactory &factory ); | 444 | QMimeSourceFactory &factory ); |
442 | virtual ~QTextImage(); | 445 | virtual ~QTextImage(); |
@@ -465,3 +468,3 @@ public: | |||
465 | QTextHorizontalLine( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, | 468 | QTextHorizontalLine( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, |
466 | QMimeSourceFactory &factory ); | 469 | QMimeSourceFactory &factory ); |
467 | virtual ~QTextHorizontalLine(); | 470 | virtual ~QTextHorizontalLine(); |
@@ -534,7 +537,7 @@ public: | |||
534 | QTextTableCell( QTextTable* table, | 537 | QTextTableCell( QTextTable* table, |
535 | int row, int column, | 538 | int row, int column, |
536 | const QMap<QString, QString> &attr, | 539 | const QMap<QString, QString> &attr, |
537 | const QStyleSheetItem* style, | 540 | const QStyleSheetItem* style, |
538 | const QTextFormat& fmt, const QString& context, | 541 | const QTextFormat& fmt, const QString& context, |
539 | QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc ); | 542 | QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc ); |
540 | virtual ~QTextTableCell(); | 543 | virtual ~QTextTableCell(); |
@@ -608,3 +611,3 @@ public: | |||
608 | void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, | 611 | void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, |
609 | const QColorGroup& cg, bool selected ); | 612 | const QColorGroup& cg, bool selected ); |
610 | 613 | ||
@@ -686,5 +689,5 @@ public: | |||
686 | enum SelectionIds { | 689 | enum SelectionIds { |
687 | Standard = 0, | 690 | Standard = 0, |
688 | Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to | 691 | Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to |
689 | // remove multiple lines with removeSelectedText() | 692 | // remove multiple lines with removeSelectedText() |
690 | }; | 693 | }; |
@@ -793,7 +796,7 @@ public: | |||
793 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, | 796 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, |
794 | QPixmap *&doubleBuffer, const QColorGroup &cg, | 797 | QPixmap *&doubleBuffer, const QColorGroup &cg, |
795 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); | 798 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); |
796 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, | 799 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, |
797 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, | 800 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, |
798 | bool resetChanged = TRUE ); | 801 | bool resetChanged = TRUE ); |
799 | 802 | ||
@@ -860,3 +863,3 @@ private: | |||
860 | QTextCustomItem* parseTable( const QMap<QString, QString> &attr, const QTextFormat &fmt, | 863 | QTextCustomItem* parseTable( const QMap<QString, QString> &attr, const QTextFormat &fmt, |
861 | const QChar* doc, int length, int& pos, QTextParagraph *curpar ); | 864 | const QChar* doc, int length, int& pos, QTextParagraph *curpar ); |
862 | bool eatSpace(const QChar* doc, int length, int& pos, bool includeNbsp = FALSE ); | 865 | bool eatSpace(const QChar* doc, int length, int& pos, bool includeNbsp = FALSE ); |
@@ -873,5 +876,5 @@ private: | |||
873 | struct Q_EXPORT Focus { | 876 | struct Q_EXPORT Focus { |
874 | QTextParagraph *parag; | 877 | QTextParagraph *parag; |
875 | int start, len; | 878 | int start, len; |
876 | QString href; | 879 | QString href; |
877 | }; | 880 | }; |
@@ -933,3 +936,3 @@ public: | |||
933 | QTextDeleteCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, | 936 | QTextDeleteCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, |
934 | const QByteArray& oldStyle ); | 937 | const QByteArray& oldStyle ); |
935 | QTextDeleteCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ); | 938 | QTextDeleteCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ); |
@@ -953,6 +956,6 @@ public: | |||
953 | QTextInsertCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, | 956 | QTextInsertCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, |
954 | const QByteArray& oldStyleInfo ) | 957 | const QByteArray& oldStyleInfo ) |
955 | : QTextDeleteCommand( d, i, idx, str, oldStyleInfo ) {} | 958 | : QTextDeleteCommand( d, i, idx, str, oldStyleInfo ) {} |
956 | QTextInsertCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ) | 959 | QTextInsertCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ) |
957 | : QTextDeleteCommand( p, idx, str ) {} | 960 | : QTextDeleteCommand( p, idx, str ) {} |
958 | virtual ~QTextInsertCommand() {} | 961 | virtual ~QTextInsertCommand() {} |
@@ -1013,3 +1016,3 @@ struct Q_EXPORT QTextLineStart | |||
1013 | #ifndef QT_NO_COMPLEXTEXT | 1016 | #ifndef QT_NO_COMPLEXTEXT |
1014 | , bidicontext( 0 ) | 1017 | , bidicontext( 0 ) |
1015 | #endif | 1018 | #endif |
@@ -1017,5 +1020,5 @@ struct Q_EXPORT QTextLineStart | |||
1017 | QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), | 1020 | QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), |
1018 | w( 0 ) | 1021 | w( 0 ) |
1019 | #ifndef QT_NO_COMPLEXTEXT | 1022 | #ifndef QT_NO_COMPLEXTEXT |
1020 | , bidicontext( 0 ) | 1023 | , bidicontext( 0 ) |
1021 | #endif | 1024 | #endif |
@@ -1024,3 +1027,3 @@ struct Q_EXPORT QTextLineStart | |||
1024 | QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0), | 1027 | QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0), |
1025 | status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } | 1028 | status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } |
1026 | #endif | 1029 | #endif |
@@ -1030,4 +1033,4 @@ struct Q_EXPORT QTextLineStart | |||
1030 | #ifndef QT_NO_COMPLEXTEXT | 1033 | #ifndef QT_NO_COMPLEXTEXT |
1031 | if ( bidicontext && bidicontext->deref() ) | 1034 | if ( bidicontext && bidicontext->deref() ) |
1032 | delete bidicontext; | 1035 | delete bidicontext; |
1033 | #endif | 1036 | #endif |
@@ -1037,9 +1040,9 @@ struct Q_EXPORT QTextLineStart | |||
1037 | void setContext( QBidiContext *c ) { | 1040 | void setContext( QBidiContext *c ) { |
1038 | if ( c == bidicontext ) | 1041 | if ( c == bidicontext ) |
1039 | return; | 1042 | return; |
1040 | if ( bidicontext && bidicontext->deref() ) | 1043 | if ( bidicontext && bidicontext->deref() ) |
1041 | delete bidicontext; | 1044 | delete bidicontext; |
1042 | bidicontext = c; | 1045 | bidicontext = c; |
1043 | if ( bidicontext ) | 1046 | if ( bidicontext ) |
1044 | bidicontext->ref(); | 1047 | bidicontext->ref(); |
1045 | } | 1048 | } |
@@ -1185,3 +1188,3 @@ public: | |||
1185 | virtual void paint( QPainter &painter, const QColorGroup &cg, QTextCursor *cursor = 0, bool drawSelections = FALSE, | 1188 | virtual void paint( QPainter &painter, const QColorGroup &cg, QTextCursor *cursor = 0, bool drawSelections = FALSE, |
1186 | int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 ); | 1189 | int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 ); |
1187 | 1190 | ||
@@ -1248,5 +1251,5 @@ protected: | |||
1248 | virtual void drawString( QPainter &painter, const QString &str, int start, int len, int xstart, | 1251 | virtual void drawString( QPainter &painter, const QString &str, int start, int len, int xstart, |
1249 | int y, int baseLine, int w, int h, int selection, | 1252 | int y, int baseLine, int w, int h, int selection, |
1250 | QTextStringChar *formatChar, const QColorGroup& cg, | 1253 | QTextStringChar *formatChar, const QColorGroup& cg, |
1251 | bool rightToLeft ); | 1254 | bool rightToLeft ); |
1252 | 1255 | ||
@@ -1317,6 +1320,6 @@ protected: | |||
1317 | virtual QTextLineStart *formatLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, | 1320 | virtual QTextLineStart *formatLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, |
1318 | QTextStringChar *last, int align = Qt3::AlignAuto, int space = 0 ); | 1321 | QTextStringChar *last, int align = Qt3::AlignAuto, int space = 0 ); |
1319 | #ifndef QT_NO_COMPLEXTEXT | 1322 | #ifndef QT_NO_COMPLEXTEXT |
1320 | virtual QTextLineStart *bidiReorderLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, | 1323 | virtual QTextLineStart *bidiReorderLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, |
1321 | QTextStringChar *last, int align, int space ); | 1324 | QTextStringChar *last, int align, int space ); |
1322 | #endif | 1325 | #endif |
@@ -1381,3 +1384,3 @@ public: | |||
1381 | enum Ids { | 1384 | enum Ids { |
1382 | Standard = 0 | 1385 | Standard = 0 |
1383 | }; | 1386 | }; |
@@ -1401,14 +1404,14 @@ public: | |||
1401 | enum Flags { | 1404 | enum Flags { |
1402 | NoFlags, | 1405 | NoFlags, |
1403 | Bold = 1, | 1406 | Bold = 1, |
1404 | Italic = 2, | 1407 | Italic = 2, |
1405 | Underline = 4, | 1408 | Underline = 4, |
1406 | Family = 8, | 1409 | Family = 8, |
1407 | Size = 16, | 1410 | Size = 16, |
1408 | Color = 32, | 1411 | Color = 32, |
1409 | Misspelled = 64, | 1412 | Misspelled = 64, |
1410 | VAlign = 128, | 1413 | VAlign = 128, |
1411 | StrikeOut= 256, | 1414 | StrikeOut= 256, |
1412 | Font = Bold | Italic | Underline | Family | Size | StrikeOut, | 1415 | Font = Bold | Italic | Underline | Family | Size | StrikeOut, |
1413 | Format = Font | Color | Misspelled | VAlign | 1416 | Format = Font | Color | Misspelled | VAlign |
1414 | }; | 1417 | }; |
@@ -1731,3 +1734,3 @@ inline QString QTextDocument::originalText() const | |||
1731 | if ( oTextValid ) | 1734 | if ( oTextValid ) |
1732 | return oText; | 1735 | return oText; |
1733 | return text(); | 1736 | return text(); |
@@ -1738,3 +1741,3 @@ inline void QTextDocument::setFlow( QTextFlow *f ) | |||
1738 | if ( flow_ ) | 1741 | if ( flow_ ) |
1739 | delete flow_; | 1742 | delete flow_; |
1740 | flow_ = f; | 1743 | flow_ = f; |
@@ -1788,7 +1791,7 @@ inline void QTextFormat::removeRef() | |||
1788 | if ( !collection ) | 1791 | if ( !collection ) |
1789 | return; | 1792 | return; |
1790 | if ( this == collection->defFormat ) | 1793 | if ( this == collection->defFormat ) |
1791 | return; | 1794 | return; |
1792 | if ( ref == 0 ) | 1795 | if ( ref == 0 ) |
1793 | collection->remove( this ); | 1796 | collection->remove( this ); |
1794 | } | 1797 | } |
@@ -1845,5 +1848,5 @@ inline void QTextParagraph::append( const QString &s, bool reallyAtEnd ) | |||
1845 | if ( reallyAtEnd ) | 1848 | if ( reallyAtEnd ) |
1846 | insert( str->length(), s ); | 1849 | insert( str->length(), s ); |
1847 | else | 1850 | else |
1848 | insert( QMAX( str->length() - 1, 0 ), s ); | 1851 | insert( QMAX( str->length() - 1, 0 ), s ); |
1849 | } | 1852 | } |
@@ -1868,3 +1871,3 @@ inline void QTextParagraph::setEndState( int s ) | |||
1868 | if ( s == state ) | 1871 | if ( s == state ) |
1869 | return; | 1872 | return; |
1870 | state = s; | 1873 | state = s; |
@@ -1885,3 +1888,3 @@ inline int QTextParagraph::paragId() const | |||
1885 | if ( id == -1 ) | 1888 | if ( id == -1 ) |
1886 | qWarning( "invalid parag id!!!!!!!! (%p)", (void*)this ); | 1889 | owarn << "invalid parag id!!!!!!!! (" << (void*)this << ")" << oendl; |
1887 | return id; | 1890 | return id; |
@@ -1912,3 +1915,3 @@ inline QTextDocument *QTextParagraph::document() const | |||
1912 | if ( hasdoc ) | 1915 | if ( hasdoc ) |
1913 | return (QTextDocument*) docOrPseudo; | 1916 | return (QTextDocument*) docOrPseudo; |
1914 | return 0; | 1917 | return 0; |
@@ -1919,3 +1922,3 @@ inline QTextParagraphPseudoDocument *QTextParagraph::pseudoDocument() const | |||
1919 | if ( hasdoc ) | 1922 | if ( hasdoc ) |
1920 | return 0; | 1923 | return 0; |
1921 | return (QTextParagraphPseudoDocument*) docOrPseudo; | 1924 | return (QTextParagraphPseudoDocument*) docOrPseudo; |
diff --git a/noncore/apps/tableviewer/browsekeyentry.cpp b/noncore/apps/tableviewer/browsekeyentry.cpp index 04e7902..bab9af6 100644 --- a/noncore/apps/tableviewer/browsekeyentry.cpp +++ b/noncore/apps/tableviewer/browsekeyentry.cpp | |||
@@ -18,5 +18,10 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "browsekeyentry.h" | 20 | #include "browsekeyentry.h" |
21 | 21 | ||
22 | /* OPIE */ | ||
23 | #include <opie2/odebug.h> | ||
24 | using namespace Opie::Core; | ||
25 | |||
26 | /* QT */ | ||
22 | #include <qtoolbutton.h> | 27 | #include <qtoolbutton.h> |
@@ -30,5 +35,2 @@ | |||
30 | 35 | ||
31 | //#include <iostream.h> | ||
32 | #include <qheader.h> | ||
33 | // For qWarning(const char *) | ||
34 | 36 | ||
@@ -44,3 +46,3 @@ | |||
44 | /*! | 46 | /*! |
45 | Constructs the widget | 47 | Constructs the widget |
46 | */ | 48 | */ |
@@ -82,26 +84,26 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
82 | ws->raiseWidget(0); | 84 | ws->raiseWidget(0); |
83 | 85 | ||
84 | // TODO connect slots and signals.... | 86 | // TODO connect slots and signals.... |
85 | connect(changeKeyButton, SIGNAL(clicked()), | 87 | connect(changeKeyButton, SIGNAL(clicked()), |
86 | this, SLOT(changeKeyMenuSlot())); | 88 | this, SLOT(changeKeyMenuSlot())); |
87 | connect(resetButton, SIGNAL(clicked()), | 89 | connect(resetButton, SIGNAL(clicked()), |
88 | this, SLOT(resetKeySlot())); | 90 | this, SLOT(resetKeySlot())); |
89 | 91 | ||
90 | connect(textKey, SIGNAL(textChanged(const QString&)), | 92 | connect(textKey, SIGNAL(textChanged(const QString&)), |
91 | this, SLOT(searchOnText())); | 93 | this, SLOT(searchOnText())); |
92 | 94 | ||
93 | connect(dayKey, SIGNAL(textChanged(const QString&)), | 95 | connect(dayKey, SIGNAL(textChanged(const QString&)), |
94 | this, SLOT(searchOnText())); | 96 | this, SLOT(searchOnText())); |
95 | connect(monthKey, SIGNAL(textChanged(const QString&)), | 97 | connect(monthKey, SIGNAL(textChanged(const QString&)), |
96 | this, SLOT(searchOnText())); | 98 | this, SLOT(searchOnText())); |
97 | connect(yearKey, SIGNAL(textChanged(const QString&)), | 99 | connect(yearKey, SIGNAL(textChanged(const QString&)), |
98 | this, SLOT(searchOnText())); | 100 | this, SLOT(searchOnText())); |
99 | 101 | ||
100 | connect(secondKey, SIGNAL(textChanged(const QString&)), | 102 | connect(secondKey, SIGNAL(textChanged(const QString&)), |
101 | this, SLOT(searchOnText())); | 103 | this, SLOT(searchOnText())); |
102 | connect(minuteKey, SIGNAL(textChanged(const QString&)), | 104 | connect(minuteKey, SIGNAL(textChanged(const QString&)), |
103 | this, SLOT(searchOnText())); | 105 | this, SLOT(searchOnText())); |
104 | connect(hourKey, SIGNAL(textChanged(const QString&)), | 106 | connect(hourKey, SIGNAL(textChanged(const QString&)), |
105 | this, SLOT(searchOnText())); | 107 | this, SLOT(searchOnText())); |
106 | 108 | ||
107 | h_layout->addWidget(ws); | 109 | h_layout->addWidget(ws); |
@@ -112,3 +114,3 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
112 | /*! | 114 | /*! |
113 | Destructs the widget | 115 | Destructs the widget |
114 | */ | 116 | */ |
@@ -138,4 +140,4 @@ void TVBrowseKeyEntry::changeKeySlot(int id_param) | |||
138 | break; | 140 | break; |
139 | default: | 141 | default: |
140 | return; | 142 | return; |
141 | } | 143 | } |
@@ -148,3 +150,3 @@ void TVBrowseKeyEntry::changeKeyMenuSlot() | |||
148 | { | 150 | { |
149 | if(ts) | 151 | if(ts) |
150 | keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0))); | 152 | keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0))); |
@@ -167,3 +169,3 @@ void TVBrowseKeyEntry::setTableState(TableState *t) { | |||
167 | for (i = 0; i < t->kRep->getNumFields(); i++) { | 169 | for (i = 0; i < t->kRep->getNumFields(); i++) { |
168 | keyMenu->insertItem(ts->kRep->getKeyName(i), this, | 170 | keyMenu->insertItem(ts->kRep->getKeyName(i), this, |
169 | SLOT(changeKeySlot(int)), 0, i); | 171 | SLOT(changeKeySlot(int)), 0, i); |
@@ -174,4 +176,4 @@ void TVBrowseKeyEntry::setTableState(TableState *t) { | |||
174 | /*! | 176 | /*! |
175 | Searches on the current value of the key entry provided that the | 177 | Searches on the current value of the key entry provided that the |
176 | current key is of type text WARNING, TODO fix memory leaks | 178 | current key is of type text WARNING, TODO fix memory leaks |
177 | */ | 179 | */ |
@@ -230,4 +232,3 @@ void TVBrowseKeyEntry::searchOnText() | |||
230 | default: | 232 | default: |
231 | qWarning("TVBrowseKeyEntry::searchOnText() " | 233 | owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl; |
232 | "cannot work out data type"); | ||
233 | return; | 234 | return; |
@@ -241,2 +242,2 @@ void TVBrowseKeyEntry::searchOnText() | |||
241 | done searching for the value v. | 242 | done searching for the value v. |
242 | */ | 243 | */ |
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp index b58af85..c35dbea 100644 --- a/noncore/apps/tableviewer/db/common.cpp +++ b/noncore/apps/tableviewer/db/common.cpp | |||
@@ -18,4 +18,4 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "common.h" | 20 | #include "common.h" |
21 | #include "datacache.h" | 21 | #include "datacache.h" |
@@ -90,3 +90,3 @@ int QStringVector::compareItems(Item a, Item b) | |||
90 | QString *qb = (QString *)b; | 90 | QString *qb = (QString *)b; |
91 | 91 | ||
92 | return QString::compare(*qa, *qb); | 92 | return QString::compare(*qa, *qb); |
@@ -96,3 +96,3 @@ int QStringVector::compareItems(Item a, Item b) | |||
96 | \class TVVariant | 96 | \class TVVariant |
97 | A way of abstracting void * and keeping information on | 97 | A way of abstracting void * and keeping information on |
98 | the keytypes and behaviours in one place | 98 | the keytypes and behaviours in one place |
@@ -322,3 +322,3 @@ void TVVariant::load(QDataStream &s ) | |||
322 | default: | 322 | default: |
323 | ofatal << "Unrecognized data type" << oendl; | 323 | ofatal << "Unrecognized data type" << oendl; |
324 | } | 324 | } |
@@ -384,3 +384,3 @@ const QString TVVariant::toString() const | |||
384 | return ((QTime*)d->value.ptr)->toString(); | 384 | return ((QTime*)d->value.ptr)->toString(); |
385 | case Int: | 385 | case Int: |
386 | return QString::number(d->value.i); | 386 | return QString::number(d->value.i); |
@@ -426,3 +426,3 @@ const QDate TVVariant::toDate() const | |||
426 | } | 426 | } |
427 | 427 | ||
428 | 428 | ||
@@ -435,3 +435,3 @@ const QTime TVVariant::toTime() const | |||
435 | return *((QTime *)d->value.ptr); | 435 | return *((QTime *)d->value.ptr); |
436 | 436 | ||
437 | if(d->typ == String) { | 437 | if(d->typ == String) { |
@@ -456,3 +456,3 @@ const QTime TVVariant::toTime() const | |||
456 | return *((Q##f*)d->value.ptr); } | 456 | return *((Q##f*)d->value.ptr); } |
457 | 457 | ||
458 | TV_VARIANT_AS(String) | 458 | TV_VARIANT_AS(String) |
@@ -562,3 +562,3 @@ bool TVVariant::closer(TVVariant n, TVVariant o) | |||
562 | if(d->typ == Invalid) | 562 | if(d->typ == Invalid) |
563 | return FALSE; | 563 | return FALSE; |
564 | 564 | ||
@@ -574,3 +574,3 @@ bool TVVariant::closer(TVVariant n, TVVariant o) | |||
574 | case String: { | 574 | case String: { |
575 | /* case for strings is close is a substring.. closer is | 575 | /* case for strings is close is a substring.. closer is |
576 | * earlier alphabetically */ | 576 | * earlier alphabetically */ |
@@ -584,3 +584,3 @@ bool TVVariant::closer(TVVariant n, TVVariant o) | |||
584 | /* contains sub-str, if later than is not closer */ | 584 | /* contains sub-str, if later than is not closer */ |
585 | if(QString::compare(qs1, qs2) > 0) | 585 | if(QString::compare(qs1, qs2) > 0) |
586 | return FALSE; | 586 | return FALSE; |
@@ -595,9 +595,9 @@ bool TVVariant::closer(TVVariant n, TVVariant o) | |||
595 | int diff1 = (i1 - iv); | 595 | int diff1 = (i1 - iv); |
596 | if (diff1 < 0) | 596 | if (diff1 < 0) |
597 | diff1 = -diff1; | 597 | diff1 = -diff1; |
598 | int diff2 = (i2 - iv); | 598 | int diff2 = (i2 - iv); |
599 | if (diff2 < 0) | 599 | if (diff2 < 0) |
600 | diff2 = -diff2; | 600 | diff2 = -diff2; |
601 | 601 | ||
602 | if (diff1 < diff2) | 602 | if (diff1 < diff2) |
603 | return TRUE; | 603 | return TRUE; |
@@ -612,6 +612,6 @@ bool TVVariant::closer(TVVariant n, TVVariant o) | |||
612 | int diff1 = i1.daysTo(iv); | 612 | int diff1 = i1.daysTo(iv); |
613 | if (diff1 < 0) | 613 | if (diff1 < 0) |
614 | diff1 = -diff1; | 614 | diff1 = -diff1; |
615 | int diff2 = i2.daysTo(iv); | 615 | int diff2 = i2.daysTo(iv); |
616 | if (diff2 < 0) | 616 | if (diff2 < 0) |
617 | diff2 = -diff2; | 617 | diff2 = -diff2; |
@@ -629,6 +629,6 @@ bool TVVariant::closer(TVVariant n, TVVariant o) | |||
629 | int diff1 = i1.msecsTo(iv); | 629 | int diff1 = i1.msecsTo(iv); |
630 | if (diff1 < 0) | 630 | if (diff1 < 0) |
631 | diff1 = -diff1; | 631 | diff1 = -diff1; |
632 | int diff2 = i2.msecsTo(iv); | 632 | int diff2 = i2.msecsTo(iv); |
633 | if (diff2 < 0) | 633 | if (diff2 < 0) |
634 | diff2 = -diff2; | 634 | diff2 = -diff2; |
@@ -651,3 +651,3 @@ bool TVVariant::close(TVVariant n) | |||
651 | if(type() == Invalid) | 651 | if(type() == Invalid) |
652 | return FALSE; | 652 | return FALSE; |
653 | 653 | ||
@@ -659,3 +659,3 @@ bool TVVariant::close(TVVariant n) | |||
659 | case String: { | 659 | case String: { |
660 | /* case for strings is close is a substring.. closer is | 660 | /* case for strings is close is a substring.. closer is |
661 | * earlier alphabetically */ | 661 | * earlier alphabetically */ |
@@ -668,3 +668,3 @@ bool TVVariant::close(TVVariant n) | |||
668 | } | 668 | } |
669 | case Int: | 669 | case Int: |
670 | case Date: | 670 | case Date: |
@@ -683,3 +683,3 @@ bool TVVariant::close(TVVariant n) | |||
683 | \brief document me! | 683 | \brief document me! |
684 | 684 | ||
685 | document me! | 685 | document me! |
@@ -690,3 +690,3 @@ Key::Key() : kname(), kexample(), kflags(0) { } | |||
690 | Key::Key(QString name, TVVariant example, int flags) : | 690 | Key::Key(QString name, TVVariant example, int flags) : |
691 | kname(name), kexample(example), kflags(flags) { } | 691 | kname(name), kexample(example), kflags(flags) { } |
692 | 692 | ||
@@ -699,3 +699,3 @@ Key::Key(const Key &other) | |||
699 | 699 | ||
700 | Key& Key::operator=(const Key& key) | 700 | Key& Key::operator=(const Key& key) |
701 | { | 701 | { |
@@ -779,3 +779,3 @@ void Key::setNewFlag(bool v) | |||
779 | */ | 779 | */ |
780 | KeyList::KeyList() : QIntDict<Key>(20) | 780 | KeyList::KeyList() : QIntDict<Key>(20) |
781 | { | 781 | { |
@@ -785,3 +785,3 @@ KeyList::KeyList() : QIntDict<Key>(20) | |||
785 | /* Should be deep copy, but isn't */ | 785 | /* Should be deep copy, but isn't */ |
786 | KeyList::KeyList(const KeyList &k) : QIntDict<Key>(k) | 786 | KeyList::KeyList(const KeyList &k) : QIntDict<Key>(k) |
787 | { | 787 | { |
@@ -824,3 +824,3 @@ bool KeyList::operator!=(const KeyList &other) | |||
824 | */ | 824 | */ |
825 | int KeyList::getNumFields() const | 825 | int KeyList::getNumFields() const |
826 | { | 826 | { |
@@ -849,12 +849,12 @@ int KeyList::addKey(QString name, TVVariant::KeyType type) | |||
849 | switch(type) { | 849 | switch(type) { |
850 | case TVVariant::String: | 850 | case TVVariant::String: |
851 | return addKey(name, TVVariant("<undefined>").asString()); | 851 | return addKey(name, TVVariant("<undefined>").asString()); |
852 | break; | 852 | break; |
853 | case TVVariant::Date: | 853 | case TVVariant::Date: |
854 | return addKey(name, TVVariant(QDate::currentDate()).asDate()); | 854 | return addKey(name, TVVariant(QDate::currentDate()).asDate()); |
855 | break; | 855 | break; |
856 | case TVVariant::Time: | 856 | case TVVariant::Time: |
857 | return addKey(name, TVVariant(QTime(0,0,0)).toTime()); | 857 | return addKey(name, TVVariant(QTime(0,0,0)).toTime()); |
858 | break; | 858 | break; |
859 | case TVVariant::Int: | 859 | case TVVariant::Int: |
860 | return addKey(name, TVVariant(0).toInt()); | 860 | return addKey(name, TVVariant(0).toInt()); |
@@ -862,4 +862,3 @@ int KeyList::addKey(QString name, TVVariant::KeyType type) | |||
862 | default: | 862 | default: |
863 | qWarning(QObject::tr("KeyList::addKey() Cannot make default " | 863 | owarn << "KeyList::addKey() Cannot make default value for type " << type << ", Key not added." << oendl; |
864 | "value for type %1, Key not added.").arg(type)); | ||
865 | break; | 864 | break; |
@@ -869,3 +868,3 @@ int KeyList::addKey(QString name, TVVariant::KeyType type) | |||
869 | 868 | ||
870 | void KeyList::setKeyFlags(int i, int flag) | 869 | void KeyList::setKeyFlags(int i, int flag) |
871 | { | 870 | { |
@@ -882,3 +881,3 @@ int KeyList::getKeyFlags(int i) const | |||
882 | 881 | ||
883 | bool KeyList::checkNewFlag(int i) const | 882 | bool KeyList::checkNewFlag(int i) const |
884 | { | 883 | { |
@@ -889,3 +888,3 @@ bool KeyList::checkNewFlag(int i) const | |||
889 | 888 | ||
890 | void KeyList::setNewFlag(int i, bool f) | 889 | void KeyList::setNewFlag(int i, bool f) |
891 | { | 890 | { |
@@ -896,3 +895,3 @@ void KeyList::setNewFlag(int i, bool f) | |||
896 | 895 | ||
897 | bool KeyList::checkDeleteFlag(int i) const | 896 | bool KeyList::checkDeleteFlag(int i) const |
898 | { | 897 | { |
@@ -903,3 +902,3 @@ bool KeyList::checkDeleteFlag(int i) const | |||
903 | 902 | ||
904 | void KeyList::setDeleteFlag(int i, bool f) | 903 | void KeyList::setDeleteFlag(int i, bool f) |
905 | { | 904 | { |
@@ -920,3 +919,3 @@ QString KeyList::getKeyName(int i) const | |||
920 | 919 | ||
921 | void KeyList::setKeyName(int i, const QString &n) | 920 | void KeyList::setKeyName(int i, const QString &n) |
922 | { | 921 | { |
@@ -936,3 +935,3 @@ TVVariant::KeyType KeyList::getKeyType(int i) const | |||
936 | 935 | ||
937 | void KeyList::setKeyType(int i, TVVariant::KeyType t) | 936 | void KeyList::setKeyType(int i, TVVariant::KeyType t) |
938 | { | 937 | { |
@@ -1042,5 +1041,5 @@ QDataStream &operator>>( QDataStream &s, KeyList &k) | |||
1042 | /*! | 1041 | /*! |
1043 | Constructs a DataElem. This function needs a container because the | 1042 | Constructs a DataElem. This function needs a container because the |
1044 | size, types of keys and primary key are all defined by the containing | 1043 | size, types of keys and primary key are all defined by the containing |
1045 | database | 1044 | database |
1046 | */ | 1045 | */ |
@@ -1088,3 +1087,3 @@ QDataStream &operator>>( QDataStream &s, DataElem &d) | |||
1088 | if (size != d.getNumFields()) { | 1087 | if (size != d.getNumFields()) { |
1089 | owarn << "DataSize mis-match" << oendl; | 1088 | owarn << "DataSize mis-match" << oendl; |
1090 | return s; /* sanity check failed.. don't load */ | 1089 | return s; /* sanity check failed.. don't load */ |
@@ -1111,3 +1110,3 @@ KeyList DataElem::getKeys() const | |||
1111 | 1110 | ||
1112 | /*! | 1111 | /*! |
1113 | This function determines whether field index i of the element has been | 1112 | This function determines whether field index i of the element has been |
@@ -1115,4 +1114,4 @@ KeyList DataElem::getKeys() const | |||
1115 | 1114 | ||
1116 | \return A boolean value that is TRUE if the specfied field of this | 1115 | \return A boolean value that is TRUE if the specfied field of this |
1117 | element has been set and FALSE if the field has not yet been set | 1116 | element has been set and FALSE if the field has not yet been set |
1118 | */ | 1117 | */ |
@@ -1122,3 +1121,3 @@ bool DataElem::hasValidValue(int i) const | |||
1122 | return FALSE; | 1121 | return FALSE; |
1123 | if(!contained->getKeys()->validIndex(i)) | 1122 | if(!contained->getKeys()->validIndex(i)) |
1124 | return FALSE; | 1123 | return FALSE; |
@@ -1127,3 +1126,3 @@ bool DataElem::hasValidValue(int i) const | |||
1127 | 1126 | ||
1128 | /*! | 1127 | /*! |
1129 | This function determines whether field name qs of the element has been | 1128 | This function determines whether field name qs of the element has been |
@@ -1131,6 +1130,6 @@ bool DataElem::hasValidValue(int i) const | |||
1131 | 1130 | ||
1132 | \return A boolean value that is TRUE if the specfied field of this | 1131 | \return A boolean value that is TRUE if the specfied field of this |
1133 | element has been set and FALSE if the field has not yet been set | 1132 | element has been set and FALSE if the field has not yet been set |
1134 | */ | 1133 | */ |
1135 | bool DataElem::hasValidValue(QString qs) const | 1134 | bool DataElem::hasValidValue(QString qs) const |
1136 | { | 1135 | { |
@@ -1141,3 +1140,3 @@ bool DataElem::hasValidValue(QString qs) const | |||
1141 | /*! returns the type of the field specified by index i */ | 1140 | /*! returns the type of the field specified by index i */ |
1142 | TVVariant::KeyType DataElem::getFieldType(int i) const | 1141 | TVVariant::KeyType DataElem::getFieldType(int i) const |
1143 | { | 1142 | { |
@@ -1153,5 +1152,5 @@ TVVariant::KeyType DataElem::getFieldType(QString qs) const | |||
1153 | 1152 | ||
1154 | /*! | 1153 | /*! |
1155 | returns a pointer to the data stored in field index i for this | 1154 | returns a pointer to the data stored in field index i for this |
1156 | data element, (value may not be valid) | 1155 | data element, (value may not be valid) |
1157 | */ | 1156 | */ |
@@ -1164,5 +1163,5 @@ TVVariant DataElem::getField(int i) const | |||
1164 | 1163 | ||
1165 | /*! | 1164 | /*! |
1166 | returns a pointer to the data stored in field name qs for this | 1165 | returns a pointer to the data stored in field name qs for this |
1167 | data element, (value may not be valid) | 1166 | data element, (value may not be valid) |
1168 | */ | 1167 | */ |
@@ -1181,3 +1180,3 @@ TVVariant DataElem::getField(QString qs) const | |||
1181 | */ | 1180 | */ |
1182 | void DataElem::setField(int i, QString q) | 1181 | void DataElem::setField(int i, QString q) |
1183 | { | 1182 | { |
@@ -1210,5 +1209,3 @@ void DataElem::setField(int i, QString q) | |||
1210 | default: | 1209 | default: |
1211 | qWarning( | 1210 | owarn << "DataElem::setField(" << i << ", " << q << ") No valid type found" << oendl; |
1212 | QObject::tr("DataElem::setField(%1, %2) No valid type found").arg(i).arg(q) | ||
1213 | ); | ||
1214 | } | 1211 | } |
@@ -1221,5 +1218,5 @@ void DataElem::setField(int i, QString q) | |||
1221 | \param i index of the field to set | 1218 | \param i index of the field to set |
1222 | \param value a pointer to the (already allocated) value to set | 1219 | \param value a pointer to the (already allocated) value to set |
1223 | */ | 1220 | */ |
1224 | void DataElem::setField(int i, TVVariant value) | 1221 | void DataElem::setField(int i, TVVariant value) |
1225 | { | 1222 | { |
@@ -1238,3 +1235,3 @@ void DataElem::setField(int i, TVVariant value) | |||
1238 | */ | 1235 | */ |
1239 | void DataElem::setField(QString qs, QString q) | 1236 | void DataElem::setField(QString qs, QString q) |
1240 | { | 1237 | { |
@@ -1250,3 +1247,3 @@ void DataElem::setField(QString qs, QString q) | |||
1250 | \param qs name of the field to set | 1247 | \param qs name of the field to set |
1251 | \param value a pointer to the (already allocated) value to set | 1248 | \param value a pointer to the (already allocated) value to set |
1252 | */ | 1249 | */ |
@@ -1269,3 +1266,3 @@ void DataElem::unsetField(QString qs) | |||
1269 | /*! | 1266 | /*! |
1270 | Converts the data element to a Rich Text QString | 1267 | Converts the data element to a Rich Text QString |
1271 | */ | 1268 | */ |
@@ -1292,3 +1289,3 @@ QString DataElem::toQString() const | |||
1292 | /*! formats individual fields to strings so can be displayed */ | 1289 | /*! formats individual fields to strings so can be displayed */ |
1293 | QString DataElem::toQString(int i) const | 1290 | QString DataElem::toQString(int i) const |
1294 | { | 1291 | { |
@@ -1300,3 +1297,3 @@ QString DataElem::toQString(int i) const | |||
1300 | /*! formats individual fields to strings so can be sorted by QListView */ | 1297 | /*! formats individual fields to strings so can be sorted by QListView */ |
1301 | QString DataElem::toSortableQString(int i) const | 1298 | QString DataElem::toSortableQString(int i) const |
1302 | { | 1299 | { |
@@ -1315,3 +1312,3 @@ QString DataElem::toSortableQString(int i) const | |||
1315 | static QDate epochD(1800, 1, 1); | 1312 | static QDate epochD(1800, 1, 1); |
1316 | scratch.sprintf("%08d", | 1313 | scratch.sprintf("%08d", |
1317 | epochD.daysTo(getField(i).toDate())); | 1314 | epochD.daysTo(getField(i).toDate())); |
@@ -1321,3 +1318,3 @@ QString DataElem::toSortableQString(int i) const | |||
1321 | static QTime epochT(0, 0, 0); | 1318 | static QTime epochT(0, 0, 0); |
1322 | scratch.sprintf("%08d", | 1319 | scratch.sprintf("%08d", |
1323 | epochT.msecsTo(getField(i).toTime())); | 1320 | epochT.msecsTo(getField(i).toTime())); |
@@ -1382,3 +1379,3 @@ bool DataElem::contains(int i, TVVariant v) const | |||
1382 | /* meaningless for dates */ | 1379 | /* meaningless for dates */ |
1383 | case TVVariant::Int: | 1380 | case TVVariant::Int: |
1384 | case TVVariant::Time: | 1381 | case TVVariant::Time: |
@@ -1387,3 +1384,3 @@ bool DataElem::contains(int i, TVVariant v) const | |||
1387 | default: | 1384 | default: |
1388 | owarn << "Tried to compare unknown data type" << oendl; | 1385 | owarn << "Tried to compare unknown data type" << oendl; |
1389 | } | 1386 | } |
@@ -1408,3 +1405,3 @@ bool DataElem::startsWith(int i, TVVariant v) const | |||
1408 | /* meaningless for dates */ | 1405 | /* meaningless for dates */ |
1409 | case TVVariant::Int: | 1406 | case TVVariant::Int: |
1410 | case TVVariant::Time: | 1407 | case TVVariant::Time: |
@@ -1413,3 +1410,3 @@ bool DataElem::startsWith(int i, TVVariant v) const | |||
1413 | default: | 1410 | default: |
1414 | owarn << "Tried to compare unknown data type" << oendl; | 1411 | owarn << "Tried to compare unknown data type" << oendl; |
1415 | } | 1412 | } |
@@ -1434,3 +1431,3 @@ bool DataElem::endsWith(int i, TVVariant v) const | |||
1434 | /* meaningless for dates */ | 1431 | /* meaningless for dates */ |
1435 | case TVVariant::Int: | 1432 | case TVVariant::Int: |
1436 | case TVVariant::Time: | 1433 | case TVVariant::Time: |
@@ -1439,3 +1436,3 @@ bool DataElem::endsWith(int i, TVVariant v) const | |||
1439 | default: | 1436 | default: |
1440 | owarn << "Tried to compare unknown data type" << oendl; | 1437 | owarn << "Tried to compare unknown data type" << oendl; |
1441 | } | 1438 | } |
@@ -1448,5 +1445,5 @@ bool DataElem::endsWith(int i, TVVariant v) const | |||
1448 | 1445 | ||
1449 | \return | 1446 | \return |
1450 | <UL> | 1447 | <UL> |
1451 | <LI>TRUE if the first element is a closer match to the target than the | 1448 | <LI>TRUE if the first element is a closer match to the target than the |
1452 | second element</LI> | 1449 | second element</LI> |
@@ -1458,3 +1455,3 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) | |||
1458 | { | 1455 | { |
1459 | int type; | 1456 | int type; |
1460 | 1457 | ||
@@ -1471,3 +1468,3 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) | |||
1471 | /* can't do compare */ | 1468 | /* can't do compare */ |
1472 | owarn << "Tried to compare two incompatable types" << oendl; | 1469 | owarn << "Tried to compare two incompatable types" << oendl; |
1473 | return FALSE; | 1470 | return FALSE; |
@@ -1475,3 +1472,3 @@ bool DataElem::closer(DataElem*d1, DataElem *d2, TVVariant target, int column) | |||
1475 | return target.closer(d1->getField(column), d2->getField(column)); | 1472 | return target.closer(d1->getField(column), d2->getField(column)); |
1476 | } | 1473 | } |
1477 | return target.close(d1->getField(column)); | 1474 | return target.close(d1->getField(column)); |
diff --git a/noncore/apps/tableviewer/db/datacache.cpp b/noncore/apps/tableviewer/db/datacache.cpp index 6380e1b..de57961 100644 --- a/noncore/apps/tableviewer/db/datacache.cpp +++ b/noncore/apps/tableviewer/db/datacache.cpp | |||
@@ -18,3 +18,3 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | /* | 20 | /* |
@@ -65,6 +65,6 @@ DBStore::DBStore() | |||
65 | 65 | ||
66 | //TODO | 66 | //TODO |
67 | /*! | 67 | /*! |
68 | Reinitializes the table to empty (include a resize of the master table, | 68 | Reinitializes the table to empty (include a resize of the master table, |
69 | which should free some memory) | 69 | which should free some memory) |
70 | */ | 70 | */ |
@@ -95,3 +95,3 @@ DBStore::~DBStore() | |||
95 | /*! | 95 | /*! |
96 | This function opens the given xml file, loads it and sets up the | 96 | This function opens the given xml file, loads it and sets up the |
97 | appropriate data structures. | 97 | appropriate data structures. |
@@ -103,3 +103,3 @@ bool DBStore::openSource(QIODevice *inDev, const QString &source) { | |||
103 | 103 | ||
104 | /* first check if db is already open, if contains data.. then clear */ | 104 | /* first check if db is already open, if contains data.. then clear */ |
105 | if(number_elems > 0) { | 105 | if(number_elems > 0) { |
@@ -111,5 +111,5 @@ bool DBStore::openSource(QIODevice *inDev, const QString &source) { | |||
111 | } else if (source == "text/csv") { | 111 | } else if (source == "text/csv") { |
112 | archive = new DBCsv(this); | 112 | archive = new DBCsv(this); |
113 | } else | 113 | } else |
114 | return false; | 114 | return false; |
115 | 115 | ||
@@ -118,3 +118,3 @@ bool DBStore::openSource(QIODevice *inDev, const QString &source) { | |||
118 | 118 | ||
119 | bool DBStore::saveSource(QIODevice *outDev, const QString &source) | 119 | bool DBStore::saveSource(QIODevice *outDev, const QString &source) |
120 | { | 120 | { |
@@ -124,6 +124,6 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) | |||
124 | archive = new DBXml(this); | 124 | archive = new DBXml(this); |
125 | } else if (source == "text/x-xml-tableviewer") { | 125 | } else if (source == "text/x-xml-tableviewer") { |
126 | archive = new DBCsv(this); | 126 | archive = new DBCsv(this); |
127 | } else | 127 | } else |
128 | return false; | 128 | return false; |
129 | } | 129 | } |
@@ -135,6 +135,6 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) | |||
135 | archive = new DBXml(this); | 135 | archive = new DBXml(this); |
136 | } else if (source == "text/x-xml-tableviewer") { | 136 | } else if (source == "text/x-xml-tableviewer") { |
137 | archive = new DBCsv(this); | 137 | archive = new DBCsv(this); |
138 | } else | 138 | } else |
139 | return false; | 139 | return false; |
140 | } | 140 | } |
@@ -144,3 +144,3 @@ bool DBStore::saveSource(QIODevice *outDev, const QString &source) | |||
144 | 144 | ||
145 | /*! | 145 | /*! |
146 | This function is used to add new elements to the database. If the database | 146 | This function is used to add new elements to the database. If the database |
@@ -158,5 +158,5 @@ void DBStore::addItemInternal(DataElem *delem) | |||
158 | { | 158 | { |
159 | /* if already full, don't over fill, do a qWarning though */ | 159 | /* if already full, don't over fill, do a owarn though */ |
160 | if (full) { | 160 | if (full) { |
161 | owarn << "Attempted to add items to already full table" << oendl; | 161 | owarn << "Attempted to add items to already full table" << oendl; |
162 | return; | 162 | return; |
@@ -187,9 +187,9 @@ void DBStore::removeItem(DataElem *r) | |||
187 | int position = master_table.findRef(r); | 187 | int position = master_table.findRef(r); |
188 | if(position != -1) { | 188 | if(position != -1) { |
189 | /* there is at least one item, this is it */ | 189 | /* there is at least one item, this is it */ |
190 | /* replace this with the last element, decrease the element count */ | 190 | /* replace this with the last element, decrease the element count */ |
191 | master_table.insert(position, master_table.at(--number_elems)); | 191 | master_table.insert(position, master_table.at(--number_elems)); |
192 | master_table.remove(number_elems); | 192 | master_table.remove(number_elems); |
193 | delete r; | 193 | delete r; |
194 | } | 194 | } |
195 | } | 195 | } |
@@ -203,3 +203,3 @@ void DBStore::setName(const QString &n) | |||
203 | { | 203 | { |
204 | name = n; | 204 | name = n; |
205 | } | 205 | } |
@@ -213,3 +213,3 @@ QString DBStore::getName() | |||
213 | { | 213 | { |
214 | return name; | 214 | return name; |
215 | } | 215 | } |
@@ -217,3 +217,3 @@ QString DBStore::getName() | |||
217 | /*! | 217 | /*! |
218 | Retrieves a pointer to the key representation of the database for | 218 | Retrieves a pointer to the key representation of the database for |
219 | other classes to use as reference. | 219 | other classes to use as reference. |
@@ -237,3 +237,3 @@ void DBStore::setKeys(KeyList *k) | |||
237 | /*! | 237 | /*! |
238 | Sets the current element to the first element of the database | 238 | Sets the current element to the first element of the database |
239 | */ | 239 | */ |
@@ -245,3 +245,3 @@ void DBStore::first() | |||
245 | /*! | 245 | /*! |
246 | Sets the current element to the last element of the database | 246 | Sets the current element to the last element of the database |
247 | */ | 247 | */ |
@@ -259,3 +259,3 @@ bool DBStore::next() | |||
259 | unsigned int new_current_elem = current_elem + 1; | 259 | unsigned int new_current_elem = current_elem + 1; |
260 | if (current_elem < number_elems) | 260 | if (current_elem < number_elems) |
261 | /* was valid before inc (it is possible but unlikely that inc current | 261 | /* was valid before inc (it is possible but unlikely that inc current |
@@ -280,3 +280,3 @@ bool DBStore::previous() | |||
280 | if (new_current_elem < number_elems) { | 280 | if (new_current_elem < number_elems) { |
281 | /* still is (if was 0, then now -1, but as is unsigned will wrap | 281 | /* still is (if was 0, then now -1, but as is unsigned will wrap |
282 | and hence be invalid */ | 282 | and hence be invalid */ |
@@ -290,3 +290,3 @@ bool DBStore::previous() | |||
290 | Returns the current data element in the database. Which element is current | 290 | Returns the current data element in the database. Which element is current |
291 | is affected by newly added items, findItem, next, previous, first and | 291 | is affected by newly added items, findItem, next, previous, first and |
292 | last functions | 292 | last functions |
@@ -295,5 +295,5 @@ bool DBStore::previous() | |||
295 | */ | 295 | */ |
296 | DataElem *DBStore::getCurrentData() | 296 | DataElem *DBStore::getCurrentData() |
297 | { | 297 | { |
298 | if (current_elem >= number_elems) | 298 | if (current_elem >= number_elems) |
299 | return NULL; | 299 | return NULL; |
diff --git a/noncore/apps/tableviewer/db/datacache.h b/noncore/apps/tableviewer/db/datacache.h index c5dc637..e38050c 100644 --- a/noncore/apps/tableviewer/db/datacache.h +++ b/noncore/apps/tableviewer/db/datacache.h | |||
@@ -29,5 +29,11 @@ | |||
29 | 29 | ||
30 | #include "common.h" | ||
31 | |||
32 | /* OPIE */ | ||
33 | #include <opie2/odebug.h> | ||
34 | using namespace Opie::Core; | ||
35 | |||
36 | /* QT */ | ||
30 | #include <qstring.h> | 37 | #include <qstring.h> |
31 | #include <qvector.h> | 38 | #include <qvector.h> |
32 | #include "common.h" | ||
33 | 39 | ||
@@ -47,3 +53,3 @@ public: | |||
47 | virtual bool openSource(QIODevice *) { | 53 | virtual bool openSource(QIODevice *) { |
48 | qWarning("DBAccess::openSource not yet implemented"); | 54 | owarn << "DBAccess::openSource not yet implemented" << oendl; |
49 | return false; | 55 | return false; |
@@ -52,3 +58,3 @@ public: | |||
52 | virtual bool saveSource(QIODevice *) { | 58 | virtual bool saveSource(QIODevice *) { |
53 | qWarning("DBAccess::saveSource(QString) not yet implemented"); | 59 | owarn << "DBAccess::saveSource(QString) not yet implemented" << oendl; |
54 | return false; | 60 | return false; |
@@ -72,3 +78,3 @@ public: | |||
72 | void addItemInternal(DataElem *); | 78 | void addItemInternal(DataElem *); |
73 | void removeItem(DataElem *); | 79 | void removeItem(DataElem *); |
74 | 80 | ||
@@ -108,6 +114,6 @@ public: | |||
108 | 114 | ||
109 | bool next(); | 115 | bool next(); |
110 | bool previous(); | 116 | bool previous(); |
111 | 117 | ||
112 | DataElem* getCurrentData(); | 118 | DataElem* getCurrentData(); |
113 | 119 | ||
@@ -116,3 +122,3 @@ private: | |||
116 | void freeTable(); | 122 | void freeTable(); |
117 | QString name; | 123 | QString name; |
118 | 124 | ||
@@ -125,3 +131,3 @@ private: | |||
125 | unsigned int table_size; /* should always be a power of 2 */ | 131 | unsigned int table_size; /* should always be a power of 2 */ |
126 | bool full; /* since because we are using an int for indexing there is | 132 | bool full; /* since because we are using an int for indexing there is |
127 | an upper limit on the number of items we can store. */ | 133 | an upper limit on the number of items we can store. */ |
diff --git a/noncore/apps/tableviewer/ui/browsekeyentry.cpp b/noncore/apps/tableviewer/ui/browsekeyentry.cpp index 42e24dd..6b78437 100644 --- a/noncore/apps/tableviewer/ui/browsekeyentry.cpp +++ b/noncore/apps/tableviewer/ui/browsekeyentry.cpp | |||
@@ -18,3 +18,3 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "browsekeyentry.h" | 20 | #include "browsekeyentry.h" |
@@ -22,2 +22,5 @@ | |||
22 | 22 | ||
23 | #include <opie2/odebug.h> | ||
24 | using namespace Opie::Core; | ||
25 | |||
23 | #include <qtoolbutton.h> | 26 | #include <qtoolbutton.h> |
@@ -31,5 +34,2 @@ | |||
31 | 34 | ||
32 | #include <qheader.h> | ||
33 | // For qWarning(const char *) | ||
34 | |||
35 | /*! | 35 | /*! |
@@ -44,3 +44,3 @@ | |||
44 | /*! | 44 | /*! |
45 | Constructs the widget | 45 | Constructs the widget |
46 | */ | 46 | */ |
@@ -75,14 +75,14 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
75 | ws->raiseWidget(TVVariant::String); | 75 | ws->raiseWidget(TVVariant::String); |
76 | 76 | ||
77 | // TODO connect slots and signals.... | 77 | // TODO connect slots and signals.... |
78 | connect(changeKeyButton, SIGNAL(clicked()), | 78 | connect(changeKeyButton, SIGNAL(clicked()), |
79 | this, SLOT(changeKeyMenuSlot())); | 79 | this, SLOT(changeKeyMenuSlot())); |
80 | 80 | ||
81 | connect(resetButton, SIGNAL(clicked()), | 81 | connect(resetButton, SIGNAL(clicked()), |
82 | textKey, SLOT(clear())); | 82 | textKey, SLOT(clear())); |
83 | connect(resetButton, SIGNAL(clicked()), | 83 | connect(resetButton, SIGNAL(clicked()), |
84 | intKey, SLOT(clear())); | 84 | intKey, SLOT(clear())); |
85 | connect(resetButton, SIGNAL(clicked()), | 85 | connect(resetButton, SIGNAL(clicked()), |
86 | dateKey, SLOT(clear())); | 86 | dateKey, SLOT(clear())); |
87 | connect(resetButton, SIGNAL(clicked()), | 87 | connect(resetButton, SIGNAL(clicked()), |
88 | timeKey, SLOT(clear())); | 88 | timeKey, SLOT(clear())); |
@@ -93,9 +93,9 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
93 | 93 | ||
94 | connect(textKey, SIGNAL(textChanged(const QString&)), | 94 | connect(textKey, SIGNAL(textChanged(const QString&)), |
95 | this, SLOT(searchOnText())); | 95 | this, SLOT(searchOnText())); |
96 | connect(intKey, SIGNAL(valueChanged(int)), | 96 | connect(intKey, SIGNAL(valueChanged(int)), |
97 | this, SLOT(searchOnText())); | 97 | this, SLOT(searchOnText())); |
98 | connect(dateKey, SIGNAL(valueChanged(const QDate&)), | 98 | connect(dateKey, SIGNAL(valueChanged(const QDate&)), |
99 | this, SLOT(searchOnText())); | 99 | this, SLOT(searchOnText())); |
100 | connect(timeKey, SIGNAL(valueChanged(const QTime&)), | 100 | connect(timeKey, SIGNAL(valueChanged(const QTime&)), |
101 | this, SLOT(searchOnText())); | 101 | this, SLOT(searchOnText())); |
@@ -104,3 +104,3 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
104 | /*! | 104 | /*! |
105 | Destructs the widget | 105 | Destructs the widget |
106 | */ | 106 | */ |
@@ -128,3 +128,3 @@ void TVBrowseKeyEntry::changeKeyMenuSlot() | |||
128 | { | 128 | { |
129 | if(ts) | 129 | if(ts) |
130 | keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0))); | 130 | keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0))); |
@@ -148,3 +148,3 @@ void TVBrowseKeyEntry::rebuildKeys() { | |||
148 | for (i = 0; i < ts->kRep->getNumFields(); i++) { | 148 | for (i = 0; i < ts->kRep->getNumFields(); i++) { |
149 | keyMenu->insertItem(it.current()->name(), this, | 149 | keyMenu->insertItem(it.current()->name(), this, |
150 | SLOT(changeKeySlot(int)), 0, i); | 150 | SLOT(changeKeySlot(int)), 0, i); |
@@ -165,4 +165,4 @@ void TVBrowseKeyEntry::reset() | |||
165 | /*! | 165 | /*! |
166 | Searches on the current value of the key entry provided that the | 166 | Searches on the current value of the key entry provided that the |
167 | current key is of type text WARNING, TODO fix memory leaks | 167 | current key is of type text WARNING, TODO fix memory leaks |
168 | */ | 168 | */ |
@@ -191,7 +191,6 @@ void TVBrowseKeyEntry::searchOnText() | |||
191 | } | 191 | } |
192 | case TVVariant::Invalid: | 192 | case TVVariant::Invalid: |
193 | break; | 193 | break; |
194 | default: | 194 | default: |
195 | qWarning("TVBrowseKeyEntry::searchOnText() " | 195 | owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl; |
196 | "cannot work out data type"); | ||
197 | return; | 196 | return; |
@@ -205,2 +204,2 @@ void TVBrowseKeyEntry::searchOnText() | |||
205 | done searching for the value v. | 204 | done searching for the value v. |
206 | */ | 205 | */ |
diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.cpp b/noncore/apps/tableviewer/ui/filterkeyentry.cpp index d108fbd..4d74d6b 100644 --- a/noncore/apps/tableviewer/ui/filterkeyentry.cpp +++ b/noncore/apps/tableviewer/ui/filterkeyentry.cpp | |||
@@ -18,3 +18,3 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "filterkeyentry.h" | 20 | #include "filterkeyentry.h" |
@@ -22,2 +22,7 @@ | |||
22 | 22 | ||
23 | /* OPIE */ | ||
24 | #include <opie2/odebug.h> | ||
25 | using namespace Opie::Core; | ||
26 | |||
27 | /* QT */ | ||
23 | #include <qwidgetstack.h> | 28 | #include <qwidgetstack.h> |
@@ -100,9 +105,9 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
100 | /* connect the signals down */ | 105 | /* connect the signals down */ |
101 | connect(textKey, SIGNAL(textChanged(const QString&)), | 106 | connect(textKey, SIGNAL(textChanged(const QString&)), |
102 | this, SIGNAL(valueChanged())); | 107 | this, SIGNAL(valueChanged())); |
103 | connect(intKey, SIGNAL(valueChanged(int)), | 108 | connect(intKey, SIGNAL(valueChanged(int)), |
104 | this, SIGNAL(valueChanged())); | 109 | this, SIGNAL(valueChanged())); |
105 | connect(dateKey, SIGNAL(valueChanged(const QDate&)), | 110 | connect(dateKey, SIGNAL(valueChanged(const QDate&)), |
106 | this, SIGNAL(valueChanged())); | 111 | this, SIGNAL(valueChanged())); |
107 | connect(timeKey, SIGNAL(valueChanged(const QTime&)), | 112 | connect(timeKey, SIGNAL(valueChanged(const QTime&)), |
108 | this, SIGNAL(valueChanged())); | 113 | this, SIGNAL(valueChanged())); |
@@ -121,3 +126,3 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
121 | /*! | 126 | /*! |
122 | Destructs the widget | 127 | Destructs the widget |
123 | */ | 128 | */ |
@@ -127,3 +132,3 @@ TVFilterKeyEntry::~TVFilterKeyEntry() | |||
127 | 132 | ||
128 | void TVFilterKeyEntry::setKey(int i) | 133 | void TVFilterKeyEntry::setKey(int i) |
129 | { | 134 | { |
@@ -185,16 +190,16 @@ TVVariant TVFilterKeyEntry::getCompareValue() | |||
185 | switch(current_type) { | 190 | switch(current_type) { |
186 | case TVVariant::String: | 191 | case TVVariant::String: |
187 | sendkey = TVVariant(QString(textKey->text())); | 192 | sendkey = TVVariant(QString(textKey->text())); |
188 | break; | 193 | break; |
189 | case TVVariant::Int: { | 194 | case TVVariant::Int: { |
190 | sendkey = TVVariant(intKey->value()); | 195 | sendkey = TVVariant(intKey->value()); |
191 | break; | 196 | break; |
192 | } | 197 | } |
193 | case TVVariant::Time: { | 198 | case TVVariant::Time: { |
194 | sendkey = TVVariant(QTime(timeKey->time())); | 199 | sendkey = TVVariant(QTime(timeKey->time())); |
195 | break; | 200 | break; |
196 | } | 201 | } |
197 | case TVVariant::Date: { | 202 | case TVVariant::Date: { |
198 | sendkey = TVVariant(QDate(dateKey->date())); | 203 | sendkey = TVVariant(QDate(dateKey->date())); |
199 | break; | 204 | break; |
200 | } | 205 | } |
@@ -202,4 +207,3 @@ TVVariant TVFilterKeyEntry::getCompareValue() | |||
202 | sendkey = TVVariant(0); | 207 | sendkey = TVVariant(0); |
203 | qWarning("TVFilterKeyEntry::getCompareValue() " | 208 | owarn << "TVFilterKeyEntry::getCompareValue() cannot work out data type" << oendl; |
204 | "cannot work out data type"); | ||
205 | } | 209 | } |
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp index 22f1fb7..198c8b5 100644 --- a/noncore/apps/tableviewer/ui/tvfilterview.cpp +++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp | |||
@@ -20,2 +20,9 @@ | |||
20 | #include "tvfilterview.h" | 20 | #include "tvfilterview.h" |
21 | |||
22 | /* OPIE */ | ||
23 | #include <opie2/odebug.h> | ||
24 | #include <qpe/qpeapplication.h> | ||
25 | using namespace Opie::Core; | ||
26 | |||
27 | /* QT */ | ||
21 | #include <qtoolbutton.h> | 28 | #include <qtoolbutton.h> |
@@ -28,3 +35,2 @@ | |||
28 | 35 | ||
29 | #include <qpe/qpeapplication.h> | ||
30 | 36 | ||
@@ -33,4 +39,4 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent, | |||
33 | { | 39 | { |
34 | if ( !name ) | 40 | if ( !name ) |
35 | setName( "Filter View" ); | 41 | setName( "Filter View" ); |
36 | 42 | ||
@@ -90,4 +96,4 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent, | |||
90 | 96 | ||
91 | connect(display, SIGNAL(selectionChanged(QListViewItem*)), this, | 97 | connect(display, SIGNAL(selectionChanged(QListViewItem*)), this, |
92 | SLOT(setTerm(QListViewItem*))); | 98 | SLOT(setTerm(QListViewItem*))); |
93 | 99 | ||
@@ -104,3 +110,3 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent, | |||
104 | /*! | 110 | /*! |
105 | Destroys the TVFilterView widget | 111 | Destroys the TVFilterView widget |
106 | */ | 112 | */ |
@@ -120,3 +126,3 @@ void TVFilterView::reset() | |||
120 | 126 | ||
121 | void TVFilterView::rebuildKeys() | 127 | void TVFilterView::rebuildKeys() |
122 | { | 128 | { |
@@ -127,3 +133,3 @@ void TVFilterView::rebuildKeys() | |||
127 | keyEntry->setTableState(ts); | 133 | keyEntry->setTableState(ts); |
128 | 134 | ||
129 | /* set up the list of keys that can be compared on */ | 135 | /* set up the list of keys that can be compared on */ |
@@ -134,8 +140,8 @@ void TVFilterView::rebuildKeys() | |||
134 | while(it.current()) { | 140 | while(it.current()) { |
135 | if(ts->kRep->validIndex(it.currentKey())) { | 141 | if(ts->kRep->validIndex(it.currentKey())) { |
136 | keyNameCombo->insertItem(it.current()->name()); | 142 | keyNameCombo->insertItem(it.current()->name()); |
137 | keyIds.insert(i, it.currentKey()); | 143 | keyIds.insert(i, it.currentKey()); |
138 | ++i; | 144 | ++i; |
139 | } | 145 | } |
140 | ++it; | 146 | ++it; |
141 | } | 147 | } |
@@ -148,3 +154,3 @@ bool TVFilterView::passesFilter(DataElem *d) { | |||
148 | FilterTerm *t; | 154 | FilterTerm *t; |
149 | 155 | ||
150 | for (t = terms.first(); t != 0; t = terms.next() ) { | 156 | for (t = terms.first(); t != 0; t = terms.next() ) { |
@@ -177,4 +183,3 @@ bool TVFilterView::passesFilter(DataElem *d) { | |||
177 | default: | 183 | default: |
178 | qWarning("TVFilterView::passesFilter() " | 184 | owarn << "TVFilterView::passesFilter() unrecognized filter type" << oendl; |
179 | "unrecognized filter type"); | ||
180 | return false; | 185 | return false; |
@@ -196,3 +201,3 @@ bool TVFilterView::filterActive() const | |||
196 | /* SLOTS */ | 201 | /* SLOTS */ |
197 | void TVFilterView::newTerm() | 202 | void TVFilterView::newTerm() |
198 | { | 203 | { |
@@ -214,3 +219,3 @@ void TVFilterView::newTerm() | |||
214 | 219 | ||
215 | void TVFilterView::updateTerm() | 220 | void TVFilterView::updateTerm() |
216 | { | 221 | { |
@@ -233,3 +238,3 @@ void TVFilterView::updateTerm() | |||
233 | term->value = keyEntry->getCompareValue(); | 238 | term->value = keyEntry->getCompareValue(); |
234 | 239 | ||
235 | keyString = keyNameCombo->currentText(); | 240 | keyString = keyNameCombo->currentText(); |
@@ -262,3 +267,3 @@ void TVFilterView::updateTerm() | |||
262 | /* remove old view */ | 267 | /* remove old view */ |
263 | if (term->view) | 268 | if (term->view) |
264 | delete(term->view); | 269 | delete(term->view); |
@@ -269,3 +274,3 @@ void TVFilterView::updateTerm() | |||
269 | /* deletes current term */ | 274 | /* deletes current term */ |
270 | void TVFilterView::deleteTerm() | 275 | void TVFilterView::deleteTerm() |
271 | { | 276 | { |
@@ -286,3 +291,3 @@ void TVFilterView::deleteTerm() | |||
286 | /* clears all terminations */ | 291 | /* clears all terminations */ |
287 | void TVFilterView::clearTerms() | 292 | void TVFilterView::clearTerms() |
288 | { | 293 | { |
@@ -294,3 +299,3 @@ void TVFilterView::setTerm(QListViewItem *target) | |||
294 | { | 299 | { |
295 | /* Iterate through the list to find item with view=target.. | 300 | /* Iterate through the list to find item with view=target.. |
296 | * set as current, delete */ | 301 | * set as current, delete */ |
@@ -303,3 +308,3 @@ void TVFilterView::setTerm(QListViewItem *target) | |||
303 | if (!current) { | 308 | if (!current) { |
304 | current = term; | 309 | current = term; |
305 | } | 310 | } |
diff --git a/noncore/apps/tinykate/libkate/kateconfig.cpp b/noncore/apps/tinykate/libkate/kateconfig.cpp index 782b629..4b8ce78 100644 --- a/noncore/apps/tinykate/libkate/kateconfig.cpp +++ b/noncore/apps/tinykate/libkate/kateconfig.cpp | |||
@@ -26,2 +26,3 @@ | |||
26 | #include <qpe/global.h> | 26 | #include <qpe/global.h> |
27 | using namespace Opie::Core; | ||
27 | 28 | ||
@@ -558,4 +559,3 @@ void KateConfig::write( const QString &fn ) | |||
558 | if ( rename( strNewFile, filename ) < 0 ) { | 559 | if ( rename( strNewFile, filename ) < 0 ) { |
559 | qWarning( "problem renaming the file %s to %s", strNewFile.latin1(), | 560 | owarn << "problem renaming the file " << strNewFile.latin1() << " to " << filename.latin1() << oendl; |
560 | filename.latin1() ); | ||
561 | QFile::remove( strNewFile ); | 561 | QFile::remove( strNewFile ); |
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 4fe319b..5f48f77 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp | |||
@@ -10,2 +10,8 @@ | |||
10 | #include "zsafe.h" | 10 | #include "zsafe.h" |
11 | |||
12 | /* OPIE */ | ||
13 | #include <opie2/odebug.h> | ||
14 | using namespace Opie::Core; | ||
15 | |||
16 | /* QT */ | ||
11 | #ifdef DESKTOP | 17 | #ifdef DESKTOP |
@@ -15,2 +21,4 @@ | |||
15 | #endif | 21 | #endif |
22 | |||
23 | /* STD */ | ||
16 | #include <stdio.h> | 24 | #include <stdio.h> |
@@ -60,6 +68,6 @@ int main( int argc, char ** argv ) | |||
60 | #else | 68 | #else |
61 | int w, h; | 69 | int w, h; |
62 | sscanf (argv[1], "%d", &w); | 70 | sscanf (argv[1], "%d", &w); |
63 | sscanf (argv[2], "%d", &h); | 71 | sscanf (argv[2], "%d", &h); |
64 | DeskW = w; | 72 | DeskW = w; |
65 | DeskH = h; | 73 | DeskH = h; |
@@ -76,5 +84,3 @@ int main( int argc, char ** argv ) | |||
76 | 84 | ||
77 | char buf[128]; | 85 | owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; |
78 | sprintf (buf, "Width: %d Height: %d\n", DeskW, DeskH); | ||
79 | qWarning (buf); | ||
80 | 86 | ||
@@ -83,3 +89,3 @@ int main( int argc, char ** argv ) | |||
83 | #else | 89 | #else |
84 | if (DeskW > 240) | 90 | if (DeskW > 240) |
85 | { | 91 | { |
@@ -87,4 +93,3 @@ int main( int argc, char ** argv ) | |||
87 | DeskH += 25; | 93 | DeskH += 25; |
88 | sprintf (buf, "Changed width: %d Height: %d\n", DeskW, DeskH); | 94 | owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; |
89 | qWarning (buf); | ||
90 | } | 95 | } |
diff --git a/noncore/apps/zsafe/zlistview.cpp b/noncore/apps/zsafe/zlistview.cpp index ba02a15..7d0b8c2 100644 --- a/noncore/apps/zsafe/zlistview.cpp +++ b/noncore/apps/zsafe/zlistview.cpp | |||
@@ -5,5 +5,10 @@ | |||
5 | #include "zlistview.h" | 5 | #include "zlistview.h" |
6 | #include <stdio.h> | ||
7 | #include "zsafe.h" | 6 | #include "zsafe.h" |
8 | 7 | ||
8 | /* OPIE */ | ||
9 | //#include <opie2/odebug.h> | ||
10 | |||
11 | /* STD */ | ||
12 | #include <stdio.h> | ||
13 | |||
9 | ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id) | 14 | ZListView::ZListView (ZSafe *zsafe, const char *id) : QListView(zsafe, id) |
@@ -20,5 +25,3 @@ void ZListView::keyPressEvent ( QKeyEvent *e ) | |||
20 | /* | 25 | /* |
21 | char buf[64]; | 26 | owarn << "key: " << e->key() << oendl; |
22 | sprintf (buf, "key: %d\n", e->key()); | ||
23 | qWarning (buf); | ||
24 | */ | 27 | */ |
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp index 6ff05ac..ca3ff52 100644 --- a/noncore/apps/zsafe/zsafe.cpp +++ b/noncore/apps/zsafe/zsafe.cpp | |||
@@ -883,3 +883,3 @@ void ZSafe::findPwd() | |||
883 | comment = dialog->CommentField->text(); | 883 | comment = dialog->CommentField->text(); |
884 | qWarning (name); | 884 | owarn << name << oendl; |
885 | } | 885 | } |
@@ -929,3 +929,3 @@ void ZSafe::findPwd() | |||
929 | { | 929 | { |
930 | qWarning (i->text(0)); | 930 | owarn << i->text(0) << oendl; |
931 | i->setSelected(FALSE); | 931 | i->setSelected(FALSE); |
@@ -943,3 +943,3 @@ void ZSafe::findPwd() | |||
943 | { | 943 | { |
944 | qWarning (si->text(0)); | 944 | owarn << si->text(0) << oendl; |
945 | if (si->isSelected()) | 945 | if (si->isSelected()) |
@@ -960,3 +960,3 @@ void ZSafe::findPwd() | |||
960 | { | 960 | { |
961 | qWarning ("Found"); | 961 | owarn << "Found" << oendl; |
962 | selectedItem = si; | 962 | selectedItem = si; |
@@ -1230,4 +1230,3 @@ void ZSafe::removeAsciiFile() | |||
1230 | { | 1230 | { |
1231 | qWarning( QString("Could not remove file %1").arg(fn), | 1231 | owarn << "Could not remove file " << fn << oendl; |
1232 | 2000 ); | ||
1233 | QMessageBox::critical( 0, tr("ZSafe"), | 1232 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1280,4 +1279,3 @@ void ZSafe::writeAllEntries() | |||
1280 | if ( !f.open( IO_WriteOnly ) ) { | 1279 | if ( !f.open( IO_WriteOnly ) ) { |
1281 | qWarning( QString("Could not write to file %1").arg(fn), | 1280 | owarn << "Could not write to file " << fn << oendl; |
1282 | 2000 ); | ||
1283 | QMessageBox::critical( 0, "ZSafe", | 1281 | QMessageBox::critical( 0, "ZSafe", |
@@ -1324,6 +1322,6 @@ void ZSafe::writeAllEntries() | |||
1324 | oneEntry += "\""; | 1322 | oneEntry += "\""; |
1325 | // qWarning (oneEntry); | 1323 | // owarn << oneEntry << oendl; |
1326 | t << oneEntry << endl; | 1324 | t << oneEntry << endl; |
1327 | 1325 | ||
1328 | // qWarning (si->text(0)); | 1326 | // owarn << si->text(0) << oendl; |
1329 | } | 1327 | } |
@@ -1375,4 +1373,3 @@ void ZSafe::readAllEntries() | |||
1375 | { | 1373 | { |
1376 | qWarning( QString("Could not read file %1").arg(fn), | 1374 | owarn << "Could not read file " << fn << oendl; |
1377 | 2000 ); | ||
1378 | QMessageBox::critical( 0, "ZSafe", | 1375 | QMessageBox::critical( 0, "ZSafe", |
@@ -1405,3 +1402,3 @@ void ZSafe::readAllEntries() | |||
1405 | 1402 | ||
1406 | qWarning ("ReadAllEntries(): "); | 1403 | owarn << "ReadAllEntries(): " << oendl; |
1407 | 1404 | ||
@@ -1556,4 +1553,3 @@ void ZSafe::writeAllEntries() | |||
1556 | if ( !f.open( IO_WriteOnly ) ) { | 1553 | if ( !f.open( IO_WriteOnly ) ) { |
1557 | qWarning( QString("Could not write to file %1").arg(fn), | 1554 | owarn << "Could not write to file " << fn << oendl; |
1558 | 2000 ); | ||
1559 | QMessageBox::critical( 0, tr("ZSafe"), | 1555 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1595,6 +1591,6 @@ void ZSafe::writeAllEntries() | |||
1595 | oneEntry += "\""; | 1591 | oneEntry += "\""; |
1596 | // qWarning (oneEntry); | 1592 | // owarn << oneEntry << oendl; |
1597 | t << oneEntry << endl; | 1593 | t << oneEntry << endl; |
1598 | 1594 | ||
1599 | // qWarning (si->text(0)); | 1595 | // owarn << si->text(0) << oendl; |
1600 | } | 1596 | } |
@@ -1610,4 +1606,3 @@ void ZSafe::readAllEntries() | |||
1610 | { | 1606 | { |
1611 | qWarning( QString("Could not read file %1").arg(fn), | 1607 | owarn << "Could not read file " << fn << oendl; |
1612 | 2000 ); | ||
1613 | QMessageBox::critical( 0, tr("ZSafe"), | 1608 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1640,3 +1635,3 @@ void ZSafe::readAllEntries() | |||
1640 | 1635 | ||
1641 | qWarning ("ReadAllEntries(): "); | 1636 | owarn << "ReadAllEntries(): " << oendl; |
1642 | 1637 | ||
@@ -1764,3 +1759,3 @@ void ZSafe::resume(int) | |||
1764 | { | 1759 | { |
1765 | qWarning ("Resume"); | 1760 | owarn << "Resume" << oendl; |
1766 | // hide the main window | 1761 | // hide the main window |
@@ -1820,3 +1815,3 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1820 | { | 1815 | { |
1821 | qWarning ("Wrong password"); | 1816 | owarn << "Wrong password" << oendl; |
1822 | QMessageBox::critical( 0, tr("ZSafe"), | 1817 | QMessageBox::critical( 0, tr("ZSafe"), |
@@ -1829,3 +1824,3 @@ bool ZSafe::openDocument(const char* _filename, const char* ) | |||
1829 | { | 1824 | { |
1830 | qWarning ("Error loading Document"); | 1825 | owarn << "Error loading Document" << oendl; |
1831 | return false; | 1826 | return false; |
@@ -2303,3 +2298,3 @@ void ZSafe::getDocPassword(QString title) | |||
2303 | { | 2298 | { |
2304 | qWarning ("getDocPassword"); | 2299 | owarn << "getDocPassword" << oendl; |
2305 | // open the 'Password' dialog | 2300 | // open the 'Password' dialog |
@@ -2482,3 +2477,3 @@ void ZSafe::quitMe () | |||
2482 | { | 2477 | { |
2483 | qWarning ("QUIT..."); | 2478 | owarn << "QUIT..." << oendl; |
2484 | 2479 | ||
@@ -2686,3 +2681,3 @@ void ZSafe::addCategory() | |||
2686 | 2681 | ||
2687 | qWarning (category); | 2682 | owarn << category << oendl; |
2688 | 2683 | ||
@@ -3194,3 +3189,3 @@ void ZSafe::editCategory() | |||
3194 | { | 3189 | { |
3195 | qWarning (category); | 3190 | owarn << category << oendl; |
3196 | catItem->setText( 0, tr( category ) ); | 3191 | catItem->setText( 0, tr( category ) ); |
@@ -3595,3 +3590,3 @@ void ZSafe::resizeEvent ( QResizeEvent * ) | |||
3595 | { | 3590 | { |
3596 | // qWarning ("resizeEvent"); | 3591 | // owarn << "resizeEvent" << oendl; |
3597 | #ifndef DESKTOP | 3592 | #ifndef DESKTOP |
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index d61433f..837fcc5 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp | |||
@@ -27,5 +27,5 @@ const int endianTest = 1; | |||
27 | (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ | 27 | (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ |
28 | (((l) & 0x00ff0000) >> 8) | \ | 28 | (((l) & 0x00ff0000) >> 8) | \ |
29 | (((l) & 0x0000ff00) << 8) | \ | 29 | (((l) & 0x0000ff00) << 8) | \ |
30 | (((l) & 0x000000ff) << 24)) : (l)) | 30 | (((l) & 0x000000ff) << 24)) : (l)) |
31 | 31 | ||
@@ -142,3 +142,3 @@ void KRFBDecoder::sendClientInit() | |||
142 | // Wait for server init | 142 | // Wait for server init |
143 | owarn << "Waiting for server init" << oendl; | 143 | owarn << "Waiting for server init" << oendl; |
144 | 144 | ||
@@ -154,3 +154,3 @@ void KRFBDecoder::gotServerInit() | |||
154 | { | 154 | { |
155 | owarn << "Got server init" << oendl; | 155 | owarn << "Got server init" << oendl; |
156 | disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) ); | 156 | disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) ); |
@@ -188,9 +188,8 @@ void KRFBDecoder::gotServerInit() | |||
188 | 188 | ||
189 | owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl; | 189 | owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl; |
190 | qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d", | 190 | owarn << "Bpp = " << info->bpp << ", Depth = " << info->depth << ", Big = " << info->bigEndian |
191 | info->bpp, info->depth, info->bigEndian, info->trueColor ); | 191 | << ", True = " << info->trueColor << oendl; |
192 | qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", | 192 | owarn << "RedMax = " << info->redMax << ", GreenMax = " << info->greenMax << ", BlueMax = " << info->blueMax << oendl; |
193 | info->redMax, info->greenMax, info->blueMax ); | 193 | owarn << "RedShift = " << info->redShift << ", GreenShift = " << info->greenShift |
194 | qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", | 194 | << ", BlueShift = " << info-> blueShift << oendl; |
195 | info->redShift, info->greenShift,info-> blueShift ); | ||
196 | 195 | ||
@@ -199,3 +198,3 @@ void KRFBDecoder::gotServerInit() | |||
199 | // Wait for desktop name | 198 | // Wait for desktop name |
200 | owarn << "Waiting for desktop name" << oendl; | 199 | owarn << "Waiting for desktop name" << oendl; |
201 | 200 | ||
@@ -214,6 +213,6 @@ void KRFBDecoder::gotDesktopName() | |||
214 | 213 | ||
215 | owarn << "Got desktop name" << oendl; | 214 | owarn << "Got desktop name" << oendl; |
216 | 215 | ||
217 | disconnect( con, SIGNAL( gotEnoughData() ), | 216 | disconnect( con, SIGNAL( gotEnoughData() ), |
218 | this, SLOT( gotDesktopName() ) ); | 217 | this, SLOT( gotDesktopName() ) ); |
219 | 218 | ||
@@ -226,3 +225,3 @@ void KRFBDecoder::gotDesktopName() | |||
226 | 225 | ||
227 | owarn << "Desktop: " << info->name.latin1() << "" << oendl; | 226 | owarn << "Desktop: " << info->name.latin1() << "" << oendl; |
228 | 227 | ||
@@ -266,8 +265,5 @@ void KRFBDecoder::decidePixelFormat() | |||
266 | 265 | ||
267 | qWarning( "Screen depth=%d, server depth=%d, best depth=%d, " \ | 266 | owarn << "Screen depth=" << screenDepth << ", server depth=" << info->depth |
268 | "eight bit %d, chosenDepth=%d", | 267 | << ", best depth=" << bestDepth << "eight bit " << con->options()->colors256 |
269 | screenDepth, | 268 | << ", chosenDepth=" << chosenDepth << oendl; |
270 | info->depth, | ||
271 | bestDepth, | ||
272 | con->options()->colors256, chosenDepth ); | ||
273 | 269 | ||
@@ -378,6 +374,6 @@ void KRFBDecoder::gotUpdateHeader() | |||
378 | 374 | ||
379 | // owarn << "Got update header" << oendl; | 375 | // owarn << "Got update header" << oendl; |
380 | 376 | ||
381 | disconnect( con, SIGNAL( gotEnoughData() ), | 377 | disconnect( con, SIGNAL( gotEnoughData() ), |
382 | this, SLOT( gotUpdateHeader() ) ); | 378 | this, SLOT( gotUpdateHeader() ) ); |
383 | 379 | ||
@@ -413,3 +409,3 @@ void KRFBDecoder::gotUpdateHeader() | |||
413 | 409 | ||
414 | // owarn << "Expecting " << noRects << " rects" << oendl; | 410 | // owarn << "Expecting " << noRects << " rects" << oendl; |
415 | 411 | ||
@@ -425,6 +421,6 @@ void KRFBDecoder::gotRectHeader() | |||
425 | 421 | ||
426 | // owarn << "Got rect header" << oendl; | 422 | // owarn << "Got rect header" << oendl; |
427 | 423 | ||
428 | disconnect( con, SIGNAL( gotEnoughData() ), | 424 | disconnect( con, SIGNAL( gotEnoughData() ), |
429 | this, SLOT( gotRectHeader() ) ); | 425 | this, SLOT( gotRectHeader() ) ); |
430 | 426 | ||
@@ -443,4 +439,4 @@ void KRFBDecoder::gotRectHeader() | |||
443 | // CARD32 encodingLocal = Swap32IfLE( encoding ); | 439 | // CARD32 encodingLocal = Swap32IfLE( encoding ); |
444 | // qWarning( "Rect: x=%d, y= %d, w=%d, h=%d, encoding=%ld", | 440 | // owarn << "Rect: x=" << x << ", y= " << y << ", w=" << w << ", h=" << h |
445 | // x, y, w, h, encodingLocal ); | 441 | // << ", encoding= " << encodingLocal << oendl; |
446 | 442 | ||
@@ -453,3 +449,3 @@ void KRFBDecoder::gotRectHeader() | |||
453 | if ( encoding == RawEncoding ) { | 449 | if ( encoding == RawEncoding ) { |
454 | // owarn << "Raw encoding" << oendl; | 450 | // owarn << "Raw encoding" << oendl; |
455 | handleRawRect(); | 451 | handleRawRect(); |
@@ -457,3 +453,3 @@ void KRFBDecoder::gotRectHeader() | |||
457 | else if ( encoding == CopyRectEncoding ) { | 453 | else if ( encoding == CopyRectEncoding ) { |
458 | // owarn << "CopyRect encoding" << oendl; | 454 | // owarn << "CopyRect encoding" << oendl; |
459 | handleCopyRect(); | 455 | handleCopyRect(); |
@@ -461,3 +457,3 @@ void KRFBDecoder::gotRectHeader() | |||
461 | else if ( encoding == RreEncoding ) { | 457 | else if ( encoding == RreEncoding ) { |
462 | owarn << "RRE encoding" << oendl; | 458 | owarn << "RRE encoding" << oendl; |
463 | handleRRERect(); | 459 | handleRRERect(); |
@@ -465,3 +461,3 @@ void KRFBDecoder::gotRectHeader() | |||
465 | else if ( encoding == CorreEncoding ) { | 461 | else if ( encoding == CorreEncoding ) { |
466 | owarn << "CoRRE encoding" << oendl; | 462 | owarn << "CoRRE encoding" << oendl; |
467 | handleCoRRERect(); | 463 | handleCoRRERect(); |
@@ -469,3 +465,3 @@ void KRFBDecoder::gotRectHeader() | |||
469 | else if ( encoding == HexTileEncoding ) { | 465 | else if ( encoding == HexTileEncoding ) { |
470 | owarn << "HexTile encoding" << oendl; | 466 | owarn << "HexTile encoding" << oendl; |
471 | handleHexTileRect(); | 467 | handleHexTileRect(); |
@@ -475,5 +471,5 @@ void KRFBDecoder::gotRectHeader() | |||
475 | QString protocolError = tr( "Protocol Error: An unknown encoding was " | 471 | QString protocolError = tr( "Protocol Error: An unknown encoding was " |
476 | "used by the server %1" ).arg( msg ); | 472 | "used by the server %1" ).arg( msg ); |
477 | currentState = Error; | 473 | currentState = Error; |
478 | owarn << "Unknown encoding, " << msg << "" << oendl; | 474 | owarn << "Unknown encoding, " << msg << "" << oendl; |
479 | emit error( protocolError ); | 475 | emit error( protocolError ); |
@@ -493,3 +489,3 @@ void KRFBDecoder::handleRawRect() | |||
493 | 489 | ||
494 | // owarn << "Handling a raw rect chunk" << oendl; | 490 | // owarn << "Handling a raw rect chunk" << oendl; |
495 | 491 | ||
@@ -516,3 +512,3 @@ void KRFBDecoder::getRawRectChunk( int lines ) | |||
516 | // Wait for server init | 512 | // Wait for server init |
517 | // owarn << "Waiting for raw rect chunk, " << count << "" << oendl; | 513 | // owarn << "Waiting for raw rect chunk, " << count << "" << oendl; |
518 | 514 | ||
@@ -530,3 +526,3 @@ void KRFBDecoder::gotRawRectChunk() | |||
530 | 526 | ||
531 | // owarn << "Got raw rect chunk" << oendl; | 527 | // owarn << "Got raw rect chunk" << oendl; |
532 | 528 | ||
@@ -553,3 +549,3 @@ void KRFBDecoder::gotRawRectChunk() | |||
553 | 549 | ||
554 | // owarn << "There are " << noRects << " rects left" << oendl; | 550 | // owarn << "There are " << noRects << " rects left" << oendl; |
555 | 551 | ||
@@ -597,3 +593,3 @@ void KRFBDecoder::gotCopyRectPos() | |||
597 | 593 | ||
598 | // owarn << "There are " << noRects << " rects left" << oendl; | 594 | // owarn << "There are " << noRects << " rects left" << oendl; |
599 | 595 | ||
@@ -610,3 +606,3 @@ void KRFBDecoder::handleRRERect() | |||
610 | { | 606 | { |
611 | owarn << "RRE not implemented" << oendl; | 607 | owarn << "RRE not implemented" << oendl; |
612 | } | 608 | } |
@@ -615,3 +611,3 @@ void KRFBDecoder::handleCoRRERect() | |||
615 | { | 611 | { |
616 | owarn << "CoRRE not implemented" << oendl; | 612 | owarn << "CoRRE not implemented" << oendl; |
617 | } | 613 | } |
@@ -620,3 +616,3 @@ void KRFBDecoder::handleHexTileRect() | |||
620 | { | 616 | { |
621 | owarn << "HexTile not implemented" << oendl; | 617 | owarn << "HexTile not implemented" << oendl; |
622 | } | 618 | } |
@@ -646,5 +642,5 @@ void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) | |||
646 | 642 | ||
647 | // HACK: Scaling | 643 | // HACK: Scaling |
648 | CARD16 x = Swap16IfLE( e->x() * con->options()->scaleFactor ); | 644 | CARD16 x = Swap16IfLE( e->x() * con->options()->scaleFactor ); |
649 | CARD16 y = Swap16IfLE( e->y() *con->options()->scaleFactor ); | 645 | CARD16 y = Swap16IfLE( e->y() * con->options()->scaleFactor ); |
650 | 646 | ||
@@ -680,3 +676,3 @@ void KRFBDecoder::gotServerCut() | |||
680 | { | 676 | { |
681 | owarn << "Got server cut" << oendl; | 677 | owarn << "Got server cut" << oendl; |
682 | 678 | ||
@@ -728,3 +724,3 @@ void KRFBDecoder::gotServerCutText() | |||
728 | * from within keypebble's mass of signals and slots | 724 | * from within keypebble's mass of signals and slots |
729 | owarn << "Server cut: " << cutbuf << "" << oendl; | 725 | owarn << "Server cut: " << cutbuf << "" << oendl; |
730 | 726 | ||
@@ -745,3 +741,3 @@ void KRFBDecoder::gotServerCutText() | |||
745 | else { | 741 | else { |
746 | owarn << "Async handled in weird state" << oendl; | 742 | owarn << "Async handled in weird state" << oendl; |
747 | currentState = oldState; | 743 | currentState = oldState; |
@@ -752,3 +748,3 @@ void KRFBDecoder::gotBell() | |||
752 | { | 748 | { |
753 | owarn << "Got server bell" << oendl; | 749 | owarn << "Got server bell" << oendl; |
754 | buf->soundBell(); | 750 | buf->soundBell(); |
@@ -765,3 +761,3 @@ void KRFBDecoder::gotBell() | |||
765 | else { | 761 | else { |
766 | owarn << "Async handled in weird state" << oendl; | 762 | owarn << "Async handled in weird state" << oendl; |
767 | currentState = oldState; | 763 | currentState = oldState; |
@@ -821,7 +817,7 @@ int KRFBDecoder::toKeySym( QKeyEvent *k ) | |||
821 | if ((k->key() >= Qt::Key_Escape) && (k->key() <= Qt::Key_F12)) { | 817 | if ((k->key() >= Qt::Key_Escape) && (k->key() <= Qt::Key_F12)) { |
822 | for(int i = 0; keyMap[i].keycode != 0; i++) { | 818 | for(int i = 0; keyMap[i].keycode != 0; i++) { |
823 | if (k->key() == keyMap[i].keycode) { | 819 | if (k->key() == keyMap[i].keycode) { |
824 | return keyMap[i].keysym; | 820 | return keyMap[i].keysym; |
825 | } | 821 | } |
826 | } | 822 | } |
827 | } | 823 | } |
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 6c5f5ea..211314b 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp | |||
@@ -112,5 +112,5 @@ namespace { | |||
112 | inline QPixmap* IconViewItem::pixmap()const { | 112 | inline QPixmap* IconViewItem::pixmap()const { |
113 | // qWarning( "Name is " + m_path.right( 15 ) + " rect is %d %d %d %d | %d %d", | 113 | // owarn << "Name is " << m_path.right( 15 ) << " rect is " << rect().x() << " " << rect().y() |
114 | // rect().x(),rect().y(),rect().width(),rect().height(), | 114 | // << " " << rect().width() << " " << rect().height() << " | " << iconView()->contentsX() |
115 | // iconView()->contentsX(), iconView()->contentsY()); | 115 | // << " " << iconView()->contentsY() << oendl; |
116 | 116 | ||
diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp index 36e5dcf..aa15d31 100644 --- a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp +++ b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp | |||
@@ -2,4 +2,7 @@ | |||
2 | 2 | ||
3 | /* OPIE */ | ||
3 | #include <opie2/odebug.h> | 4 | #include <opie2/odebug.h> |
5 | using namespace Opie::Core; | ||
4 | 6 | ||
7 | /* QT */ | ||
5 | #include <qtoolbar.h> | 8 | #include <qtoolbar.h> |
@@ -42,3 +45,3 @@ void ViewModeButton::slotChange( int i ) { | |||
42 | 45 | ||
43 | qWarning("foo %d" +name, i ); | 46 | owarn << "foo " << name << oendl; |
44 | setIconSet( Resource::loadIconSet( name ) ); | 47 | setIconSet( Resource::loadIconSet( name ) ); |
diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc index 04c50d9..f81066e 100644 --- a/noncore/net/opietooth/lib/device.cc +++ b/noncore/net/opietooth/lib/device.cc | |||
@@ -1,7 +1,12 @@ | |||
1 | 1 | ||
2 | #include <signal.h> | 2 | #include "device.h" |
3 | 3 | ||
4 | /* OPIE */ | ||
4 | #include <opie2/oprocess.h> | 5 | #include <opie2/oprocess.h> |
6 | #include <opie2/odebug.h> | ||
7 | using namespace Opie::Core; | ||
8 | |||
9 | /* STD */ | ||
10 | #include <signal.h> | ||
5 | 11 | ||
6 | #include "device.h" | ||
7 | 12 | ||
@@ -16,6 +21,6 @@ namespace { | |||
16 | for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ | 21 | for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ |
17 | qWarning("parsePID: %s", (*it).latin1() ); | 22 | owarn << "parsePID: " << (*it).latin1() << oendl; |
18 | if( !(*it).startsWith("CSR") ){ | 23 | if( !(*it).startsWith("CSR") ){ |
19 | id = (*it).toInt(); | 24 | id = (*it).toInt(); |
20 | break; | 25 | break; |
21 | } | 26 | } |
@@ -29,3 +34,3 @@ Device::Device(const QString &device, const QString &mode, const QString &speed | |||
29 | 34 | ||
30 | qWarning("OpieTooth::Device create" ); | 35 | owarn << "OpieTooth::Device create" << oendl; |
31 | m_hci = 0; | 36 | m_hci = 0; |
@@ -42,6 +47,6 @@ Device::~Device(){ | |||
42 | void Device::attach(){ | 47 | void Device::attach(){ |
43 | qWarning("attaching %s %s %s", m_device.latin1(), m_mode.latin1(), m_speed.latin1() ); | 48 | owarn << "attaching " << m_device.latin1() << " " << m_mode.latin1() << " " << m_speed.latin1() << oendl; |
44 | if(m_process == 0 ){ | 49 | if(m_process == 0 ){ |
45 | m_output.resize(0); | 50 | m_output.resize(0); |
46 | qWarning("new process to create" ); | 51 | owarn << "new process to create" << oendl; |
47 | m_process = new OProcess(); | 52 | m_process = new OProcess(); |
@@ -57,3 +62,3 @@ void Device::attach(){ | |||
57 | if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ | 62 | if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ |
58 | qWarning("Could not start" ); | 63 | owarn << "Could not start" << oendl; |
59 | delete m_process; | 64 | delete m_process; |
@@ -69,6 +74,6 @@ void Device::detach(){ | |||
69 | //kill the pid | 74 | //kill the pid |
70 | qWarning( "killing" ); | 75 | warn << "killing" << oendl; |
71 | kill(pid, 9); | 76 | kill(pid, 9); |
72 | } | 77 | } |
73 | qWarning("detached" ); | 78 | owarn << "detached" << oendl; |
74 | } | 79 | } |
@@ -82,30 +87,30 @@ void Device::slotExited( OProcess* proc) | |||
82 | { | 87 | { |
83 | qWarning("prcess exited" ); | 88 | owarn << "prcess exited" << oendl; |
84 | if(proc== m_process ){ | 89 | if(proc== m_process ){ |
85 | qWarning("proc == m_process" ); | 90 | owarn << "proc == m_process" << oendl; |
86 | if( m_process->normalExit() ){ // normal exit | 91 | if( m_process->normalExit() ){ // normal exit |
87 | qWarning("normalExit" ); | 92 | owarn << "normalExit" << oendl; |
88 | int ret = m_process->exitStatus(); | 93 | int ret = m_process->exitStatus(); |
89 | if( ret == 0 ){ // attached | 94 | if( ret == 0 ){ // attached |
90 | qWarning("attached" ); | 95 | owarn << "attached" << oendl; |
91 | qWarning("Output: %s", m_output.data() ); | 96 | owarn << "Output: " << m_output.data() << oendl; |
92 | pid = parsePid( m_output ); | 97 | pid = parsePid( m_output ); |
93 | qWarning("Pid = %d", pid ); | 98 | owarn << "Pid = " << pid << oendl; |
94 | // now hciconfig hci0 up ( determine hciX FIXME) | 99 | // now hciconfig hci0 up ( determine hciX FIXME) |
95 | // and call hciconfig hci0 up | 100 | // and call hciconfig hci0 up |
96 | // FIXME hardcoded to hci0 now :( | 101 | // FIXME hardcoded to hci0 now :( |
97 | m_hci = new OProcess( ); | 102 | m_hci = new OProcess( ); |
98 | *m_hci << "hciconfig"; | 103 | *m_hci << "hciconfig"; |
99 | *m_hci << "hci0 up"; | 104 | *m_hci << "hci0 up"; |
100 | connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), | 105 | connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), |
101 | this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); | 106 | this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); |
102 | if(!m_hci->start() ){ | 107 | if(!m_hci->start() ){ |
103 | qWarning("could not start" ); | 108 | owarn << "could not start" << oendl; |
104 | m_attached = false; | 109 | m_attached = false; |
105 | emit device("hci0", false ); | 110 | emit device("hci0", false ); |
106 | } | 111 | } |
107 | }else{ | 112 | }else{ |
108 | qWarning("crass" ); | 113 | owarn << "crass" << oendl; |
109 | m_attached = false; | 114 | m_attached = false; |
110 | emit device("hci0", false ); | 115 | emit device("hci0", false ); |
111 | 116 | ||
@@ -116,14 +121,14 @@ void Device::slotExited( OProcess* proc) | |||
116 | }else if(proc== m_hci ){ | 121 | }else if(proc== m_hci ){ |
117 | qWarning("M HCI exited" ); | 122 | owarn << "M HCI exited" << oendl; |
118 | if( m_hci->normalExit() ){ | 123 | if( m_hci->normalExit() ){ |
119 | qWarning("normal exit" ); | 124 | owarn << "normal exit" << oendl; |
120 | int ret = m_hci->exitStatus(); | 125 | int ret = m_hci->exitStatus(); |
121 | if( ret == 0 ){ | 126 | if( ret == 0 ){ |
122 | qWarning("attached really really attached" ); | 127 | owarn << "attached really really attached" << oendl; |
123 | m_attached = true; | 128 | m_attached = true; |
124 | emit device("hci0", true ); | 129 | emit device("hci0", true ); |
125 | }else{ | 130 | }else{ |
126 | qWarning( "failed" ); | 131 | owarn << "failed" << oendl; |
127 | emit device("hci0", false ); | 132 | emit device("hci0", false ); |
128 | m_attached = false; | 133 | m_attached = false; |
129 | } | 134 | } |
@@ -136,5 +141,5 @@ void Device::slotStdOut(OProcess* proc, char* chars, int len) | |||
136 | { | 141 | { |
137 | qWarning("std out" ); | 142 | owarn << "std out" << oendl; |
138 | if( len <1 ){ | 143 | if( len <1 ){ |
139 | qWarning( "len < 1 " ); | 144 | owarn << "len < 1 " << oendl; |
140 | return; | 145 | return; |
@@ -143,3 +148,3 @@ void Device::slotStdOut(OProcess* proc, char* chars, int len) | |||
143 | QCString string( chars, len+1 ); // \0 == +1 | 148 | QCString string( chars, len+1 ); // \0 == +1 |
144 | qWarning("output: %s", string.data() ); | 149 | owarn << "output: " << string.data() << oendl; |
145 | m_output.append( string.data() ); | 150 | m_output.append( string.data() ); |
@@ -149,3 +154,3 @@ void Device::slotStdErr(OProcess* proc, char* chars, int len) | |||
149 | { | 154 | { |
150 | qWarning("std err" ); | 155 | owarn << "std err" << oendl; |
151 | slotStdOut( proc, chars, len ); | 156 | slotStdOut( proc, chars, len ); |
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index 18e1df9..76d9127 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc | |||
@@ -1,5 +1,2 @@ | |||
1 | 1 | ||
2 | |||
3 | #include <opie2/oprocess.h> | ||
4 | |||
5 | #include "parser.h" | 2 | #include "parser.h" |
@@ -7,2 +4,6 @@ | |||
7 | 4 | ||
5 | #include <opie2/oprocess.h> | ||
6 | #include <opie2/odebug.h> | ||
7 | using namespace Opie::Core; | ||
8 | |||
8 | 9 | ||
@@ -14,3 +15,3 @@ Manager::Manager( const QString& dev ) | |||
14 | { | 15 | { |
15 | qWarning("created"); | 16 | owarn << "created" << oendl; |
16 | m_device = dev; | 17 | m_device = dev; |
@@ -59,3 +60,3 @@ void Manager::isAvailable( Device* /*dev*/ ){ | |||
59 | void Manager::searchDevices( const QString& device ){ | 60 | void Manager::searchDevices( const QString& device ){ |
60 | qWarning("search devices"); | 61 | owarn << "search devices" << oendl; |
61 | OProcess* hcitool = new OProcess(); | 62 | OProcess* hcitool = new OProcess(); |
@@ -68,3 +69,3 @@ void Manager::searchDevices( const QString& device ){ | |||
68 | if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 69 | if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
69 | qWarning("could not start"); | 70 | owarn << "could not start" << oendl; |
70 | RemoteDevice::ValueList list; | 71 | RemoteDevice::ValueList list; |
@@ -109,3 +110,3 @@ void Manager::searchServices( const QString& remDevice ){ | |||
109 | m_sdp->setName( remDevice.latin1() ); | 110 | m_sdp->setName( remDevice.latin1() ); |
110 | qWarning("search Services for %s", remDevice.latin1() ); | 111 | owarn << "search Services for " << remDevice.latin1() << oendl; |
111 | connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ), | 112 | connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ), |
@@ -115,3 +116,3 @@ void Manager::searchServices( const QString& remDevice ){ | |||
115 | if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 116 | if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
116 | qWarning("could not start sdptool" ); | 117 | owarn << "could not start sdptool" << oendl; |
117 | delete m_sdp; | 118 | delete m_sdp; |
@@ -142,3 +143,3 @@ void Manager::slotSDPOut(OProcess* proc, char* ch, int len) | |||
142 | QCString str(ch, len+1 ); | 143 | QCString str(ch, len+1 ); |
143 | qWarning("SDP:%s", str.data() ); | 144 | owarn << "SDP:" << str.data() << oendl; |
144 | QMap<QString, QString>::Iterator it; | 145 | QMap<QString, QString>::Iterator it; |
@@ -155,3 +156,3 @@ void Manager::slotSDPExited( OProcess* proc) | |||
155 | { | 156 | { |
156 | qWarning("proc name %s", proc->name() ); | 157 | owarn << "proc name " << proc->name() << oendl; |
157 | Services::ValueList list; | 158 | Services::ValueList list; |
@@ -160,3 +161,3 @@ void Manager::slotSDPExited( OProcess* proc) | |||
160 | if ( it != m_out.end() ) { | 161 | if ( it != m_out.end() ) { |
161 | qWarning("found process" ); | 162 | owarn << "found process" << oendl; |
162 | list = parseSDPOutput( it.data() ); | 163 | list = parseSDPOutput( it.data() ); |
@@ -170,3 +171,3 @@ Services::ValueList Manager::parseSDPOutput( const QString& out ) { | |||
170 | Services::ValueList list; | 171 | Services::ValueList list; |
171 | qWarning("parsing output" ); | 172 | owarn << "parsing output" << oendl; |
172 | Parser parser( out ); | 173 | Parser parser( out ); |
@@ -177,9 +178,9 @@ Services::ValueList Manager::parseSDPOutput( const QString& out ) { | |||
177 | void Manager::slotHCIExited(OProcess* proc ) { | 178 | void Manager::slotHCIExited(OProcess* proc ) { |
178 | qWarning("process exited"); | 179 | owarn << "process exited" << oendl; |
179 | RemoteDevice::ValueList list; | 180 | RemoteDevice::ValueList list; |
180 | if (proc->normalExit() ) { | 181 | if (proc->normalExit() ) { |
181 | qWarning("normalExit %s", proc->name() ); | 182 | owarn << "normalExit " << proc->name() << oendl; |
182 | QMap<QString, QString>::Iterator it = m_devices.find(proc->name() ); | 183 | QMap<QString, QString>::Iterator it = m_devices.find(proc->name() ); |
183 | if (it != m_devices.end() ) { | 184 | if (it != m_devices.end() ) { |
184 | qWarning("!= end ;)"); | 185 | owarn << "!= end ;)" << oendl; |
185 | list = parseHCIOutput( it.data() ); | 186 | list = parseHCIOutput( it.data() ); |
@@ -193,9 +194,9 @@ void Manager::slotHCIOut(OProcess* proc, char* ch, int len) { | |||
193 | QCString str( ch, len+1 ); | 194 | QCString str( ch, len+1 ); |
194 | qWarning("hci: %s", str.data() ); | 195 | owarn << "hci: " << str.data() oendl; |
195 | QMap<QString, QString>::Iterator it; | 196 | QMap<QString, QString>::Iterator it; |
196 | it = m_devices.find( proc->name() ); | 197 | it = m_devices.find( proc->name() ); |
197 | qWarning("proc->name %s", proc->name() ); | 198 | owarn << "proc->name " << proc->name() << oendl; |
198 | QString string; | 199 | QString string; |
199 | if (it != m_devices.end() ) { | 200 | if (it != m_devices.end() ) { |
200 | qWarning("slotHCIOut "); | 201 | owarn << "slotHCIOut " << oendl; |
201 | string = it.data(); | 202 | string = it.data(); |
@@ -207,3 +208,3 @@ void Manager::slotHCIOut(OProcess* proc, char* ch, int len) { | |||
207 | RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { | 208 | RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { |
208 | qWarning("parseHCI %s", output.latin1() ); | 209 | owarn << "parseHCI " << output.latin1() << oendl; |
209 | RemoteDevice::ValueList list; | 210 | RemoteDevice::ValueList list; |
@@ -214,3 +215,3 @@ RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { | |||
214 | str = (*it).stripWhiteSpace(); | 215 | str = (*it).stripWhiteSpace(); |
215 | qWarning("OpieTooth %s", str.latin1() ); | 216 | owarn << "OpieTooth " << str.latin1() << oendl; |
216 | int pos = str.findRev(':' ); | 217 | int pos = str.findRev(':' ); |
@@ -219,4 +220,4 @@ RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { | |||
219 | str.remove( 0, 17 ); | 220 | str.remove( 0, 17 ); |
220 | qWarning("mac %s", mac.latin1() ); | 221 | owarn << "mac " << mac.latin1() << oendl; |
221 | qWarning("rest:%s", str.latin1() ); | 222 | owarn << "rest: " << str.latin1() << oendl; |
222 | RemoteDevice rem( mac , str.stripWhiteSpace() ); | 223 | RemoteDevice rem( mac , str.stripWhiteSpace() ); |
@@ -245,3 +246,3 @@ void Manager::connectTo( const QString& mac) { | |||
245 | void Manager::searchConnections() { | 246 | void Manager::searchConnections() { |
246 | qWarning("searching connections?"); | 247 | owarn << "searching connections?" << oendl; |
247 | OProcess* proc = new OProcess(); | 248 | OProcess* proc = new OProcess(); |
@@ -283,11 +284,11 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) { | |||
283 | QStringList value = QStringList::split(' ', row ); | 284 | QStringList value = QStringList::split(' ', row ); |
284 | qWarning("0: %s", value[0].latin1() ); | 285 | owan << "0: %s" << value[0].latin1() << oendl; |
285 | qWarning("1: %s", value[1].latin1() ); | 286 | owan << "1: %s" << value[1].latin1() << oendl; |
286 | qWarning("2: %s", value[2].latin1() ); | 287 | owan << "2: %s" << value[2].latin1() << oendl; |
287 | qWarning("3: %s", value[3].latin1() ); | 288 | owan << "3: %s" << value[3].latin1() << oendl; |
288 | qWarning("4: %s", value[4].latin1() ); | 289 | owan << "4: %s" << value[4].latin1() << oendl; |
289 | qWarning("5: %s", value[5].latin1() ); | 290 | owan << "5: %s" << value[5].latin1() << oendl; |
290 | qWarning("6: %s", value[6].latin1() ); | 291 | owan << "6: %s" << value[6].latin1() << oendl; |
291 | qWarning("7: %s", value[7].latin1() ); | 292 | owan << "7: %s" << value[7].latin1() << oendl; |
292 | qWarning("8: %s", value[8].latin1() ); | 293 | owan << "8: %s" << value[8].latin1() << oendl; |
293 | ConnectionState con; | 294 | ConnectionState con; |
diff --git a/noncore/net/opietooth/lib/parser.cc b/noncore/net/opietooth/lib/parser.cc index 8baf284..7e95907 100644 --- a/noncore/net/opietooth/lib/parser.cc +++ b/noncore/net/opietooth/lib/parser.cc | |||
@@ -1,5 +1,11 @@ | |||
1 | 1 | ||
2 | #include "parser.h" | ||
3 | |||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | using namespace Opie::Core; | ||
7 | |||
8 | /* QT */ | ||
2 | #include <qstringlist.h> | 9 | #include <qstringlist.h> |
3 | 10 | ||
4 | #include "parser.h" | ||
5 | 11 | ||
@@ -15,3 +21,3 @@ namespace { | |||
15 | int convert( const QString& line, QString& ret ) { | 21 | int convert( const QString& line, QString& ret ) { |
16 | // qWarning("called"); | 22 | // owarn << "called" << oendl; |
17 | ret = QString::null; | 23 | ret = QString::null; |
@@ -21,9 +27,9 @@ int convert( const QString& line, QString& ret ) { | |||
21 | ret = line.left(pos ).stripWhiteSpace(); | 27 | ret = line.left(pos ).stripWhiteSpace(); |
22 | // qWarning("ret: %s", ret.latin1() ); | 28 | // owarn << "ret: " << ret.latin1() << oendl; |
23 | ret = ret.replace(QRegExp("[\"]"), ""); | 29 | ret = ret.replace(QRegExp("[\"]"), ""); |
24 | //qWarning("ret: %s", ret.latin1() ); | 30 | //owarn << "ret: " << ret.latin1() << oendl; |
25 | QString dummy = line.mid(pos + 5 ); | 31 | QString dummy = line.mid(pos + 5 ); |
26 | //qWarning("dummy: %s", dummy.latin1() ); | 32 | //owarn << "dummy: " << dummy.latin1() << oendl; |
27 | dummy = dummy.replace(QRegExp("[)]"), ""); | 33 | dummy = dummy.replace(QRegExp("[)]"), ""); |
28 | //qWarning("dummy: %s", dummy.latin1() ); | 34 | //owarn << "dummy: " << dummy.latin1() << oendl; |
29 | // dummy = dummy.remove( dummy.length() -2, 1 ); // remove the ) | 35 | // dummy = dummy.remove( dummy.length() -2, 1 ); // remove the ) |
@@ -32,8 +38,8 @@ int convert( const QString& line, QString& ret ) { | |||
32 | //if (ok ) { | 38 | //if (ok ) { |
33 | // qWarning("converted %d", i); | 39 | // owarn << "converted " << i << oendl; |
34 | //}else qWarning("failed" ); | 40 | //}else owarn << "failed" << oendl; |
35 | //qWarning("exiting"); | 41 | //owarn << "exiting" << oendl; |
36 | return i; | 42 | return i; |
37 | } | 43 | } |
38 | //qWarning("output %d", i ); | 44 | //owarn << "output " << i << oendl; |
39 | return i; | 45 | return i; |
@@ -59,3 +65,3 @@ void Parser::parse( const QString& string) { | |||
59 | for (it = list.begin(); it != list.end(); ++it ) { | 65 | for (it = list.begin(); it != list.end(); ++it ) { |
60 | //qWarning("line:%s:line", (*it).latin1() ); | 66 | //owarn << "line:" << (*it).latin1() << oendl; |
61 | if ( (*it).startsWith("Browsing") ) continue; | 67 | if ( (*it).startsWith("Browsing") ) continue; |
@@ -63,3 +69,3 @@ void Parser::parse( const QString& string) { | |||
63 | if ( (*it).stripWhiteSpace().isEmpty() ) { // line is empty because a new Service begins | 69 | if ( (*it).stripWhiteSpace().isEmpty() ) { // line is empty because a new Service begins |
64 | qWarning("could add"); | 70 | owarn << "could add" << oendl; |
65 | // now see if complete and add | 71 | // now see if complete and add |
@@ -82,3 +88,3 @@ void Parser::parse( const QString& string) { | |||
82 | if (m_complete) { | 88 | if (m_complete) { |
83 | // qWarning("adding"); | 89 | // owarn << "adding" << oendl; |
84 | if (!m_item.serviceName().isEmpty() ) | 90 | if (!m_item.serviceName().isEmpty() ) |
@@ -89,5 +95,5 @@ void Parser::parse( const QString& string) { | |||
89 | if (m_list.isEmpty() ) | 95 | if (m_list.isEmpty() ) |
90 | qWarning("m_list is empty"); | 96 | owarn << "m_list is empty" << oendl; |
91 | for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { | 97 | for (it2 = m_list.begin(); it2 != m_list.end(); ++it2 ) { |
92 | qWarning("name %s", (*it2).serviceName().latin1() ); | 98 | owarn << "name " << (*it2).serviceName().latin1() << oendl; |
93 | } | 99 | } |
@@ -97,3 +103,3 @@ bool Parser::parseName( const QString& str) { | |||
97 | m_item.setServiceName( str.mid(13).stripWhiteSpace() ); | 103 | m_item.setServiceName( str.mid(13).stripWhiteSpace() ); |
98 | qWarning(m_item.serviceName() ); | 104 | owarn << m_item.serviceName() << oendl; |
99 | return true; | 105 | return true; |
@@ -105,3 +111,3 @@ bool Parser::parseRecHandle( const QString& str) { | |||
105 | QString out = str.mid(18 ).stripWhiteSpace(); | 111 | QString out = str.mid(18 ).stripWhiteSpace(); |
106 | qWarning("out %s", out.latin1() ); | 112 | owarn << "out " << out.latin1() << oendl; |
107 | int value = out.mid(2).toInt(&m_ok, 16 ); | 113 | int value = out.mid(2).toInt(&m_ok, 16 ); |
@@ -111,3 +117,3 @@ bool Parser::parseRecHandle( const QString& str) { | |||
111 | m_complete = false; | 117 | m_complete = false; |
112 | qWarning("rec handle %d", value); | 118 | owarn << "rec handle " << value << oendl; |
113 | m_item.setRecHandle( value ); | 119 | m_item.setRecHandle( value ); |
@@ -120,4 +126,4 @@ bool Parser::parseClassId( const QString& str) { | |||
120 | if (str.startsWith("Service Class ID List:") ) { | 126 | if (str.startsWith("Service Class ID List:") ) { |
121 | qWarning("found class id" ); | 127 | owarn << "found class id" << oendl; |
122 | qWarning("line:%s", str.latin1() ); | 128 | owarn << "line: " << str.latin1() << oendl; |
123 | m_classOver = true; | 129 | m_classOver = true; |
@@ -125,4 +131,4 @@ bool Parser::parseClassId( const QString& str) { | |||
125 | }else if ( m_classOver && str.startsWith(" " ) ){ // ok now are the informations in place | 131 | }else if ( m_classOver && str.startsWith(" " ) ){ // ok now are the informations in place |
126 | qWarning("line with class id" ); | 132 | owarn << "line with class id" << oendl; |
127 | qWarning("%s",str.latin1() ); | 133 | owarn << str.latin1() << oendl; |
128 | 134 | ||
@@ -135,3 +141,3 @@ bool Parser::parseClassId( const QString& str) { | |||
135 | ids = convert( str, classes ); | 141 | ids = convert( str, classes ); |
136 | qWarning("ids %d", ids ); | 142 | owarn << "ids " << ids << oendl; |
137 | m_item.insertClassId( ids, classes ); | 143 | m_item.insertClassId( ids, classes ); |
@@ -140,3 +146,3 @@ bool Parser::parseClassId( const QString& str) { | |||
140 | }else{ | 146 | }else{ |
141 | qWarning("Else %d", m_classOver ); | 147 | owarn << "Else " << m_classOver << oendl; |
142 | m_classOver = false; | 148 | m_classOver = false; |
@@ -152,3 +158,3 @@ bool Parser::parseProtocol( const QString& str) { | |||
152 | }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) | 158 | }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) |
153 | qWarning("double protocol filter"); | 159 | owarn << "double protocol filter" << oendl; |
154 | 160 | ||
@@ -164,3 +170,3 @@ bool Parser::parseProtocol( const QString& str) { | |||
164 | }else if (m_protocolOver && str.startsWith(" ") ) { | 170 | }else if (m_protocolOver && str.startsWith(" ") ) { |
165 | qWarning("tripple protocol filter"); | 171 | owarn << "tripple protocol filter" << oendl; |
166 | m_protocolAdded = true; | 172 | m_protocolAdded = true; |
@@ -189,3 +195,3 @@ bool Parser::parseProfile( const QString& str) { | |||
189 | int dummy = str.mid(pos+1 ).stripWhiteSpace().toInt(); | 195 | int dummy = str.mid(pos+1 ).stripWhiteSpace().toInt(); |
190 | qWarning("dummyInt:%d", dummy ); | 196 | owarn << "dummyInt: " << dummy << oendl; |
191 | Services::ProfileDescriptor desc( m_profName, m_profId, dummy ); | 197 | Services::ProfileDescriptor desc( m_profName, m_profId, dummy ); |
diff --git a/noncore/settings/mediummount/mediumglobal.cc b/noncore/settings/mediummount/mediumglobal.cc index ab0b3af..0c6cf12 100644 --- a/noncore/settings/mediummount/mediumglobal.cc +++ b/noncore/settings/mediummount/mediumglobal.cc | |||
@@ -1,3 +1,10 @@ | |||
1 | 1 | ||
2 | #include "mediumglobal.h" | ||
3 | |||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | using namespace Opie::Core; | ||
7 | #include <qpe/config.h> | ||
2 | 8 | ||
9 | /* QT */ | ||
3 | #include <qlineedit.h> | 10 | #include <qlineedit.h> |
@@ -11,5 +18,3 @@ | |||
11 | 18 | ||
12 | #include <qpe/config.h> | ||
13 | 19 | ||
14 | #include "mediumglobal.h" | ||
15 | 20 | ||
@@ -154,3 +159,3 @@ void MediumGlobalWidget::slotGlobalChanged() | |||
154 | mode = GLOBAL_DISABLED; | 159 | mode = GLOBAL_DISABLED; |
155 | qWarning("enabled = %d", enabled ); | 160 | owarn << "enabled = " << enabled << oendl; |
156 | m_all->setEnabled ( enabled ); | 161 | m_all->setEnabled ( enabled ); |
diff --git a/noncore/styles/theme/othemebase.h b/noncore/styles/theme/othemebase.h index e691692..5519798 100644 --- a/noncore/styles/theme/othemebase.h +++ b/noncore/styles/theme/othemebase.h | |||
@@ -20,2 +20,7 @@ | |||
20 | 20 | ||
21 | /* OPIE */ | ||
22 | #include <opie2/odebug.h> | ||
23 | using namespace Opie::Core; | ||
24 | |||
25 | /* QT */ | ||
21 | #include <qdatetime.h> | 26 | #include <qdatetime.h> |
@@ -41,19 +46,19 @@ class OThemePixmap : public QPixmap | |||
41 | public: | 46 | public: |
42 | enum BorderType{Top = 0, Bottom, Left, Right, TopLeft, TopRight, BottomLeft, | 47 | enum BorderType{Top = 0, Bottom, Left, Right, TopLeft, TopRight, BottomLeft, |
43 | BottomRight}; | 48 | BottomRight}; |
44 | 49 | ||
45 | OThemePixmap( bool timer = true ); | 50 | OThemePixmap( bool timer = true ); |
46 | OThemePixmap( const OThemePixmap &p ); | 51 | OThemePixmap( const OThemePixmap &p ); |
47 | ~OThemePixmap(); | 52 | ~OThemePixmap(); |
48 | QPixmap* border( BorderType type ); | 53 | QPixmap* border( BorderType type ); |
49 | void setBorder( BorderType type, const QPixmap &p ); | 54 | void setBorder( BorderType type, const QPixmap &p ); |
50 | void updateAccessed(); | 55 | void updateAccessed(); |
51 | bool isOld(); | 56 | bool isOld(); |
52 | protected: | 57 | protected: |
53 | QTime *t; | 58 | QTime *t; |
54 | QPixmap *b[ 8 ]; | 59 | QPixmap *b[ 8 ]; |
55 | 60 | ||
56 | private: | 61 | private: |
57 | class OThemePixmapPrivate; | 62 | class OThemePixmapPrivate; |
58 | OThemePixmapPrivate *d; | 63 | OThemePixmapPrivate *d; |
59 | }; | 64 | }; |
@@ -62,3 +67,3 @@ inline QPixmap* OThemePixmap::border( BorderType type ) | |||
62 | { | 67 | { |
63 | return ( b[ type ] ); | 68 | return ( b[ type ] ); |
64 | } | 69 | } |
@@ -67,7 +72,7 @@ inline void OThemePixmap::setBorder( BorderType type, const QPixmap &p ) | |||
67 | { | 72 | { |
68 | if ( b[ type ] ) { | 73 | if ( b[ type ] ) { |
69 | qWarning( "OThemePixmap: Overwriting existing border!" ); | 74 | owarn << "OThemePixmap: Overwriting existing border!" << oendl; |
70 | delete( b[ type ] ); | 75 | delete( b[ type ] ); |
71 | } | 76 | } |
72 | b[ type ] = new QPixmap( p ); | 77 | b[ type ] = new QPixmap( p ); |
73 | } | 78 | } |
@@ -76,4 +81,4 @@ inline void OThemePixmap::updateAccessed() | |||
76 | { | 81 | { |
77 | if (t) | 82 | if (t) |
78 | t->start(); | 83 | t->start(); |
79 | } | 84 | } |
@@ -82,3 +87,3 @@ inline bool OThemePixmap::isOld() | |||
82 | { | 87 | { |
83 | return ( t ? t->elapsed() >= 300000 : false ); | 88 | return ( t ? t->elapsed() >= 300000 : false ); |
84 | } | 89 | } |
@@ -108,68 +113,68 @@ class OThemeCache : public QObject | |||
108 | { | 113 | { |
109 | Q_OBJECT | 114 | Q_OBJECT |
110 | public: | 115 | public: |
111 | /** | 116 | /** |
112 | * The scale hints supported by the cache. Note that Tiled is not here | 117 | * The scale hints supported by the cache. Note that Tiled is not here |
113 | * since tiled pixmaps are kept only once in OThemeBase. | 118 | * since tiled pixmaps are kept only once in OThemeBase. |
114 | */ | 119 | */ |
115 | enum ScaleHint{FullScale, HorizontalScale, VerticalScale}; | 120 | enum ScaleHint{FullScale, HorizontalScale, VerticalScale}; |
116 | /** | 121 | /** |
117 | * The constructor. | 122 | * The constructor. |
118 | * | 123 | * |
119 | * @param maxSize The maximum size of the cache in kilobytes. | 124 | * @param maxSize The maximum size of the cache in kilobytes. |
120 | */ | 125 | */ |
121 | OThemeCache( int maxSize, QObject *parent = 0, const char *name = 0 ); | 126 | OThemeCache( int maxSize, QObject *parent = 0, const char *name = 0 ); |
122 | /** | 127 | /** |
123 | * Inserts a new pixmap into the cache. | 128 | * Inserts a new pixmap into the cache. |
124 | * | 129 | * |
125 | * @param pixmap The pixmap to insert. | 130 | * @param pixmap The pixmap to insert. |
126 | * @param scale The scaling type of the pixmap. | 131 | * @param scale The scaling type of the pixmap. |
127 | * @param widgetID The widget ID of the pixmap, usually from OThemeBase's | 132 | * @param widgetID The widget ID of the pixmap, usually from OThemeBase's |
128 | * WidgetType enum. | 133 | * WidgetType enum. |
129 | * | 134 | * |
130 | * @return True if the insert was successful, false otherwise. | 135 | * @return True if the insert was successful, false otherwise. |
131 | */ | 136 | */ |
132 | bool insert( OThemePixmap *pixmap, ScaleHint scale, int widgetID, | 137 | bool insert( OThemePixmap *pixmap, ScaleHint scale, int widgetID, |
133 | bool border = false, bool mask = false ); | 138 | bool border = false, bool mask = false ); |
134 | /** | 139 | /** |
135 | * Returns a fully scaled pixmap. | 140 | * Returns a fully scaled pixmap. |
136 | * | 141 | * |
137 | * @param w The pixmap width to search for. | 142 | * @param w The pixmap width to search for. |
138 | * @param h The pixmap height to search for. | 143 | * @param h The pixmap height to search for. |
139 | * @param widgetID The widget ID to search for. | 144 | * @param widgetID The widget ID to search for. |
140 | * | 145 | * |
141 | * @return True if a pixmap matching the width, height, and widget ID of | 146 | * @return True if a pixmap matching the width, height, and widget ID of |
142 | * the pixmap exists, NULL otherwise. | 147 | * the pixmap exists, NULL otherwise. |
143 | */ | 148 | */ |
144 | OThemePixmap* pixmap( int w, int h, int widgetID, bool border = false, | 149 | OThemePixmap* pixmap( int w, int h, int widgetID, bool border = false, |
145 | bool mask = false ); | 150 | bool mask = false ); |
146 | /** | 151 | /** |
147 | * Returns a horizontally scaled pixmap. | 152 | * Returns a horizontally scaled pixmap. |
148 | * | 153 | * |
149 | * @param w The pixmap width to search for. | 154 | * @param w The pixmap width to search for. |
150 | * @param widgetID The widget ID to search for. | 155 | * @param widgetID The widget ID to search for. |
151 | * | 156 | * |
152 | * @return True if a pixmap matching the width and widget ID of | 157 | * @return True if a pixmap matching the width and widget ID of |
153 | * the pixmap exists, NULL otherwise. | 158 | * the pixmap exists, NULL otherwise. |
154 | */ | 159 | */ |
155 | OThemePixmap* horizontalPixmap( int w, int widgetID ); | 160 | OThemePixmap* horizontalPixmap( int w, int widgetID ); |
156 | /** | 161 | /** |
157 | * Returns a vertically scaled pixmap. | 162 | * Returns a vertically scaled pixmap. |
158 | * | 163 | * |
159 | * @param h The pixmap height to search for. | 164 | * @param h The pixmap height to search for. |
160 | * @param widgetID The widget ID to search for. | 165 | * @param widgetID The widget ID to search for. |
161 | * | 166 | * |
162 | * @return True if a pixmap matching the height and widget ID of | 167 | * @return True if a pixmap matching the height and widget ID of |
163 | * the pixmap exists, NULL otherwise. | 168 | * the pixmap exists, NULL otherwise. |
164 | */ | 169 | */ |
165 | OThemePixmap* verticalPixmap( int h, int widgetID ); | 170 | OThemePixmap* verticalPixmap( int h, int widgetID ); |
166 | protected slots: | 171 | protected slots: |
167 | void flushTimeout(); | 172 | void flushTimeout(); |
168 | protected: | 173 | protected: |
169 | QIntCache<OThemePixmap> cache; | 174 | QIntCache<OThemePixmap> cache; |
170 | QTimer flushTimer; | 175 | QTimer flushTimer; |
171 | 176 | ||
172 | private: | 177 | private: |
173 | class OThemeCachePrivate; | 178 | class OThemeCachePrivate; |
174 | OThemeCachePrivate *d; | 179 | OThemeCachePrivate *d; |
175 | }; | 180 | }; |
@@ -191,377 +196,377 @@ class OThemeBase: public QWindowsStyle | |||
191 | { | 196 | { |
192 | Q_OBJECT | 197 | Q_OBJECT |
193 | public: | 198 | public: |
194 | /** | 199 | /** |
195 | * Constructs a new OThemeBase object. | 200 | * Constructs a new OThemeBase object. |
196 | */ | 201 | */ |
197 | OThemeBase( const QString &configFile ); | 202 | OThemeBase( const QString &configFile ); |
198 | ~OThemeBase(); | 203 | ~OThemeBase(); |
199 | /** | 204 | /** |
200 | * Describes if a pixmap should be scaled fully, horizontally, vertically, | 205 | * Describes if a pixmap should be scaled fully, horizontally, vertically, |
201 | * or not at all and tiled. | 206 | * or not at all and tiled. |
202 | */ | 207 | */ |
203 | enum ScaleHint{FullScale, HorizontalScale, VerticalScale, TileScale}; | 208 | enum ScaleHint{FullScale, HorizontalScale, VerticalScale, TileScale}; |
204 | /** | 209 | /** |
205 | * The default arrow types. | 210 | * The default arrow types. |
206 | */ | 211 | */ |
207 | enum ArrowStyle{MotifArrow, LargeArrow, SmallArrow}; | 212 | enum ArrowStyle{MotifArrow, LargeArrow, SmallArrow}; |
208 | /** | 213 | /** |
209 | * The default frame shading styles. | 214 | * The default frame shading styles. |
210 | */ | 215 | */ |
211 | enum ShadeStyle{Motif, Windows, Next, KDE}; | 216 | enum ShadeStyle{Motif, Windows, Next, KDE}; |
212 | /** | 217 | /** |
213 | * The default scrollbar button layout. BottomLeft is like what Next | 218 | * The default scrollbar button layout. BottomLeft is like what Next |
214 | * uses, BottomRight is like Platinum, and Opposite it like Windows and | 219 | * uses, BottomRight is like Platinum, and Opposite it like Windows and |
215 | * Motif. | 220 | * Motif. |
216 | */ | 221 | */ |
217 | enum SButton{SBBottomLeft, SBBottomRight, SBOpposite}; | 222 | enum SButton{SBBottomLeft, SBBottomRight, SBOpposite}; |
218 | /** | 223 | /** |
219 | * The gradient types. Horizontal is left to right, Vertical is top to | 224 | * The gradient types. Horizontal is left to right, Vertical is top to |
220 | * bottom, and diagonal is upper-left to bottom-right. | 225 | * bottom, and diagonal is upper-left to bottom-right. |
221 | */ | 226 | */ |
222 | enum Gradient{GrNone, GrHorizontal, GrVertical, GrDiagonal, GrPyramid, | 227 | enum Gradient{GrNone, GrHorizontal, GrVertical, GrDiagonal, GrPyramid, |
223 | GrRectangle, GrElliptic, GrReverseBevel}; | 228 | GrRectangle, GrElliptic, GrReverseBevel}; |
224 | /** | 229 | /** |
225 | * This provides a list of widget types that OThemeBase recognizes. | 230 | * This provides a list of widget types that OThemeBase recognizes. |
226 | */ | 231 | */ |
227 | /* Internal note: The order here is important. Some widgets inherit | 232 | /* Internal note: The order here is important. Some widgets inherit |
228 | * properties. This is usually for when you have two settings for the | 233 | * properties. This is usually for when you have two settings for the |
229 | * same widget, ie: on(sunken), and off. The on settings will inherit | 234 | * same widget, ie: on(sunken), and off. The on settings will inherit |
230 | * the properties of the off one when nothing is specified in the config. | 235 | * the properties of the off one when nothing is specified in the config. |
231 | * | 236 | * |
232 | * In order to be able to handle this while still having everything in | 237 | * In order to be able to handle this while still having everything in |
233 | * one group that is easy to loop from we have the following order: | 238 | * one group that is easy to loop from we have the following order: |
234 | * unsunked(off) items, sunken(on)items, and then the ones that don't | 239 | * unsunked(off) items, sunken(on)items, and then the ones that don't |
235 | * matter. INHERIT_ITEMS define the number of widgets that have inheritence | 240 | * matter. INHERIT_ITEMS define the number of widgets that have inheritence |
236 | * so if 0 == PushButtonOff then INHERIT_ITEMS should == PushButtonOn | 241 | * so if 0 == PushButtonOff then INHERIT_ITEMS should == PushButtonOn |
237 | * and so on. WIDGETS define the total number of widgets. | 242 | * and so on. WIDGETS define the total number of widgets. |
238 | */ | 243 | */ |
239 | enum WidgetType{ | 244 | enum WidgetType{ |
240 | // Off (unsunken widgets) | 245 | // Off (unsunken widgets) |
241 | PushButton = 0, ComboBox, HScrollBarSlider, VScrollBarSlider, Bevel, | 246 | PushButton = 0, ComboBox, HScrollBarSlider, VScrollBarSlider, Bevel, |
242 | ToolButton, ScrollButton, HScrollDeco, VScrollDeco, | 247 | ToolButton, ScrollButton, HScrollDeco, VScrollDeco, |
243 | ComboDeco, MenuItem, InactiveTab, ArrowUp, ArrowDown, ArrowLeft, | 248 | ComboDeco, MenuItem, InactiveTab, ArrowUp, ArrowDown, ArrowLeft, |
244 | ArrowRight, | 249 | ArrowRight, |
245 | // On (sunken widgets) | 250 | // On (sunken widgets) |
246 | PushButtonDown, ComboBoxDown, HScrollBarSliderDown, | 251 | PushButtonDown, ComboBoxDown, HScrollBarSliderDown, |
247 | VScrollBarSliderDown, BevelDown, ToolButtonDown, ScrollButtonDown, | 252 | VScrollBarSliderDown, BevelDown, ToolButtonDown, ScrollButtonDown, |
248 | HScrollDecoDown, VScrollDecoDown, ComboDecoDown, MenuItemDown, | 253 | HScrollDecoDown, VScrollDecoDown, ComboDecoDown, MenuItemDown, |
249 | ActiveTab, SunkenArrowUp, SunkenArrowDown, SunkenArrowLeft, | 254 | ActiveTab, SunkenArrowUp, SunkenArrowDown, SunkenArrowLeft, |
250 | SunkenArrowRight, | 255 | SunkenArrowRight, |
251 | // Everything else (indicators must have separate settings) | 256 | // Everything else (indicators must have separate settings) |
252 | HScrollGroove, VScrollGroove, Slider, SliderGroove, IndicatorOn, | 257 | HScrollGroove, VScrollGroove, Slider, SliderGroove, IndicatorOn, |
253 | IndicatorOff, ExIndicatorOn, ExIndicatorOff, HBarHandle, VBarHandle, | 258 | IndicatorOff, ExIndicatorOn, ExIndicatorOff, HBarHandle, VBarHandle, |
254 | ToolBar, Splitter, CheckMark, MenuBar, DisArrowUp, DisArrowDown, | 259 | ToolBar, Splitter, CheckMark, MenuBar, DisArrowUp, DisArrowDown, |
255 | DisArrowLeft, DisArrowRight, ProgressBar, ProgressBg, MenuBarItem, | 260 | DisArrowLeft, DisArrowRight, ProgressBar, ProgressBg, MenuBarItem, |
256 | Background}; | 261 | Background}; |
257 | 262 | ||
258 | /** | 263 | /** |
259 | * The scaling type specified by the Config file. | 264 | * The scaling type specified by the Config file. |
260 | * | 265 | * |
261 | * @param widget A Widgets enum value. | 266 | * @param widget A Widgets enum value. |
262 | * | 267 | * |
263 | * @return A ScaleHint enum value. | 268 | * @return A ScaleHint enum value. |
264 | */ | 269 | */ |
265 | ScaleHint scaleHint( WidgetType widget ) const; | 270 | ScaleHint scaleHint( WidgetType widget ) const; |
266 | /** | 271 | /** |
267 | * The gradient type specified by the KConfig file. | 272 | * The gradient type specified by the KConfig file. |
268 | * | 273 | * |
269 | * @param widget A Widgets enum value. | 274 | * @param widget A Widgets enum value. |
270 | * | 275 | * |
271 | * @return A Gradient enum value. | 276 | * @return A Gradient enum value. |
272 | */ | 277 | */ |
273 | Gradient gradientHint( WidgetType widget ) const; | 278 | Gradient gradientHint( WidgetType widget ) const; |
274 | /** | 279 | /** |
275 | * The color group specified for a given widget. | 280 | * The color group specified for a given widget. |
276 | * If a color group is set in the theme configuration | 281 | * If a color group is set in the theme configuration |
277 | * that is used, otherwise defaultColor is returned. | 282 | * that is used, otherwise defaultColor is returned. |
278 | * | 283 | * |
279 | * @param defaultColor The colorGroup to set if one is available. | 284 | * @param defaultColor The colorGroup to set if one is available. |
280 | * | 285 | * |
281 | * @param widget The widget whose color group to retrieve. | 286 | * @param widget The widget whose color group to retrieve. |
282 | * | 287 | * |
283 | */ | 288 | */ |
284 | const QColorGroup* colorGroup( const QColorGroup &defaultGroup, | 289 | const QColorGroup* colorGroup( const QColorGroup &defaultGroup, |
285 | WidgetType widget ) const; | 290 | WidgetType widget ) const; |
286 | 291 | ||
287 | QBrush pixmapBrush( const QColorGroup &group, QColorGroup::ColorRole role, | 292 | QBrush pixmapBrush( const QColorGroup &group, QColorGroup::ColorRole role, |
288 | int w, int h, WidgetType widget ); | 293 | int w, int h, WidgetType widget ); |
289 | /** | 294 | /** |
290 | * True if the widget has a pixmap or gradient specified. | 295 | * True if the widget has a pixmap or gradient specified. |
291 | */ | 296 | */ |
292 | bool isPixmap( WidgetType widget ) const; | 297 | bool isPixmap( WidgetType widget ) const; |
293 | /** | 298 | /** |
294 | * True if the widget has a color group specified. | 299 | * True if the widget has a color group specified. |
295 | */ | 300 | */ |
296 | bool isColor( WidgetType widget ) const; | 301 | bool isColor( WidgetType widget ) const; |
297 | /** | 302 | /** |
298 | * True if the user specified a 3D focus rectangle | 303 | * True if the user specified a 3D focus rectangle |
299 | */ | 304 | */ |
300 | bool is3DFocus() const; | 305 | bool is3DFocus() const; |
301 | /** | 306 | /** |
302 | * If the user specified a 3D focus rectangle, they may also specify an | 307 | * If the user specified a 3D focus rectangle, they may also specify an |
303 | * offset from the default rectangle to use when drawing it. This returns | 308 | * offset from the default rectangle to use when drawing it. This returns |
304 | * the specified offset. | 309 | * the specified offset. |
305 | */ | 310 | */ |
306 | int focusOffset() const; | 311 | int focusOffset() const; |
307 | /** | 312 | /** |
308 | * The border width of the specified widget. | 313 | * The border width of the specified widget. |
309 | */ | 314 | */ |
310 | int borderWidth( WidgetType widget ) const; | 315 | int borderWidth( WidgetType widget ) const; |
311 | /** | 316 | /** |
312 | * Pixmap border width of the specified widget. | 317 | * Pixmap border width of the specified widget. |
313 | */ | 318 | */ |
314 | int pixBorderWidth( WidgetType widget ) const; | 319 | int pixBorderWidth( WidgetType widget ) const; |
315 | /** | 320 | /** |
316 | * Returns the border pixmap if enabled for the specified widget. This | 321 | * Returns the border pixmap if enabled for the specified widget. This |
317 | * will contain the originial pixmap, plus the edges separated in | 322 | * will contain the originial pixmap, plus the edges separated in |
318 | * OThemePixmap::border() if valid. If invalid it will return NULL. | 323 | * OThemePixmap::border() if valid. If invalid it will return NULL. |
319 | */ | 324 | */ |
320 | OThemePixmap* borderPixmap( WidgetType widget ); | 325 | OThemePixmap* borderPixmap( WidgetType widget ); |
321 | /** | 326 | /** |
322 | * The highlight width of the specified widget. | 327 | * The highlight width of the specified widget. |
323 | */ | 328 | */ |
324 | int highlightWidth( WidgetType widget ) const; | 329 | int highlightWidth( WidgetType widget ) const; |
325 | /** | 330 | /** |
326 | * The border plus highlight width of the widget. | 331 | * The border plus highlight width of the widget. |
327 | */ | 332 | */ |
328 | int decoWidth( WidgetType widget ) const; | 333 | int decoWidth( WidgetType widget ) const; |
329 | /** | 334 | /** |
330 | * The extent (width for vertical, height for horizontal) requested | 335 | * The extent (width for vertical, height for horizontal) requested |
331 | * for the scrollbars. | 336 | * for the scrollbars. |
332 | */ | 337 | */ |
333 | int getSBExtent() const; | 338 | int getSBExtent() const; |
334 | /** | 339 | /** |
335 | * The scrollbar button layout. | 340 | * The scrollbar button layout. |
336 | */ | 341 | */ |
337 | SButton scrollBarLayout() const; | 342 | SButton scrollBarLayout() const; |
338 | /** | 343 | /** |
339 | * The arrow type. | 344 | * The arrow type. |
340 | */ | 345 | */ |
341 | ArrowStyle arrowType() const; | 346 | ArrowStyle arrowType() const; |
342 | /** | 347 | /** |
343 | * The shading type. | 348 | * The shading type. |
344 | */ | 349 | */ |
345 | ShadeStyle shade() const; | 350 | ShadeStyle shade() const; |
346 | /** | 351 | /** |
347 | * The frame width. | 352 | * The frame width. |
348 | */ | 353 | */ |
349 | int frameWidth() const; | 354 | int frameWidth() const; |
350 | /** | 355 | /** |
351 | * The splitter width. | 356 | * The splitter width. |
352 | */ | 357 | */ |
353 | int splitWidth() const; | 358 | int splitWidth() const; |
354 | /** | 359 | /** |
355 | * The contrast for some bevel effects such as reverse gradient. | 360 | * The contrast for some bevel effects such as reverse gradient. |
356 | */ | 361 | */ |
357 | int bevelContrast( WidgetType widget ) const; | 362 | int bevelContrast( WidgetType widget ) const; |
358 | /** | 363 | /** |
359 | * The button text X shift. | 364 | * The button text X shift. |
360 | */ | 365 | */ |
361 | int buttonXShift() const; | 366 | int buttonXShift() const; |
362 | /** | 367 | /** |
363 | * The button text Y shift. | 368 | * The button text Y shift. |
364 | */ | 369 | */ |
365 | int buttonYShift() const; | 370 | int buttonYShift() const; |
366 | /** | 371 | /** |
367 | * Returns either the slider length of the slider pixmap if available, | 372 | * Returns either the slider length of the slider pixmap if available, |
368 | * otherwise the length specified in the config file. | 373 | * otherwise the length specified in the config file. |
369 | */ | 374 | */ |
370 | int sliderButtonLength() const; | 375 | int sliderButtonLength() const; |
371 | /** | 376 | /** |
372 | * True if rounded buttons are requested. | 377 | * True if rounded buttons are requested. |
373 | */ | 378 | */ |
374 | bool roundButton() const; | 379 | bool roundButton() const; |
375 | /** | 380 | /** |
376 | * True if rounded comboboxes are requested. | 381 | * True if rounded comboboxes are requested. |
377 | */ | 382 | */ |
378 | bool roundComboBox() const; | 383 | bool roundComboBox() const; |
379 | /** | 384 | /** |
380 | * True if rounded slider grooves are requested. | 385 | * True if rounded slider grooves are requested. |
381 | */ | 386 | */ |
382 | bool roundSlider() const; | 387 | bool roundSlider() const; |
383 | /** | 388 | /** |
384 | * True if a line should be drawn on the bottom of active tabs. | 389 | * True if a line should be drawn on the bottom of active tabs. |
385 | */ | 390 | */ |
386 | bool activeTabLine() const; | 391 | bool activeTabLine() const; |
387 | /** | 392 | /** |
388 | * True if a line should be drawn on the bottom of inactive tabs. | 393 | * True if a line should be drawn on the bottom of inactive tabs. |
389 | */ | 394 | */ |
390 | bool inactiveTabLine() const; | 395 | bool inactiveTabLine() const; |
391 | /** | 396 | /** |
392 | * Returns the current uncached pixmap for the given widget. This will | 397 | * Returns the current uncached pixmap for the given widget. This will |
393 | * usually be either the last scaled or gradient pixmap if those have | 398 | * usually be either the last scaled or gradient pixmap if those have |
394 | * been specified in the config file, the original pixmap if not, or NULL | 399 | * been specified in the config file, the original pixmap if not, or NULL |
395 | * if no pixmap has been specified. | 400 | * if no pixmap has been specified. |
396 | */ | 401 | */ |
397 | OThemePixmap* uncached( WidgetType widget ) const; | 402 | OThemePixmap* uncached( WidgetType widget ) const; |
398 | /** | 403 | /** |
399 | * Returns the pixmap for the given widget at the specified width and | 404 | * Returns the pixmap for the given widget at the specified width and |
400 | * height. This will return NULL if no pixmap or gradient is specified. | 405 | * height. This will return NULL if no pixmap or gradient is specified. |
401 | * It may also return a different sized pixmap if the scaling | 406 | * It may also return a different sized pixmap if the scaling |
402 | * is set to Tiled. When using this method, you should call it using | 407 | * is set to Tiled. When using this method, you should call it using |
403 | * the needed width and height then use QPainter::drawTiledPixmap to | 408 | * the needed width and height then use QPainter::drawTiledPixmap to |
404 | * paint it. Doing this, if the pixmap is scaled it will be the proper | 409 | * paint it. Doing this, if the pixmap is scaled it will be the proper |
405 | * size, otherwise it will be tiled. | 410 | * size, otherwise it will be tiled. |
406 | * | 411 | * |
407 | * @param w Requested width. | 412 | * @param w Requested width. |
408 | * @param h Requested height. | 413 | * @param h Requested height. |
409 | * @param widget Widget type. | 414 | * @param widget Widget type. |
410 | * @return The pixmap or NULL if one is not specified. | 415 | * @return The pixmap or NULL if one is not specified. |
411 | */ | 416 | */ |
412 | virtual OThemePixmap *scalePixmap( int w, int h, WidgetType widget ); | 417 | virtual OThemePixmap *scalePixmap( int w, int h, WidgetType widget ); |
413 | /** | 418 | /** |
414 | * This method reads a configuration file and applies it to the user's | 419 | * This method reads a configuration file and applies it to the user's |
415 | * kstylerc file. It does not signal applications to reload via the | 420 | * kstylerc file. It does not signal applications to reload via the |
416 | * KDEChangeGeneral atom, if you want to do this you must do so yourself. | 421 | * KDEChangeGeneral atom, if you want to do this you must do so yourself. |
417 | * See kcmdisplay's general.cpp for an example. | 422 | * See kcmdisplay's general.cpp for an example. |
418 | * | 423 | * |
419 | * @param file The configuration file to apply. | 424 | * @param file The configuration file to apply. |
420 | */ | 425 | */ |
421 | static void applyConfigFile( const QString &file ); | 426 | static void applyConfigFile( const QString &file ); |
422 | protected: | 427 | protected: |
423 | /** | 428 | /** |
424 | * Returns a QImage for the given widget if the widget is scaled, NULL | 429 | * Returns a QImage for the given widget if the widget is scaled, NULL |
425 | * otherwise. QImages of the original pixmap are stored for scaled | 430 | * otherwise. QImages of the original pixmap are stored for scaled |
426 | * widgets in order to facilitate fast and accurate smooth-scaling. This | 431 | * widgets in order to facilitate fast and accurate smooth-scaling. This |
427 | * also saves us a conversion from a pixmap to an image then back again. | 432 | * also saves us a conversion from a pixmap to an image then back again. |
428 | */ | 433 | */ |
429 | QImage* image( WidgetType widget ) const; | 434 | QImage* image( WidgetType widget ) const; |
430 | /** | 435 | /** |
431 | * Returns the gradient high color if one is specified, NULL otherwise. | 436 | * Returns the gradient high color if one is specified, NULL otherwise. |
432 | */ | 437 | */ |
433 | QColor* gradientHigh( WidgetType widget ) const; | 438 | QColor* gradientHigh( WidgetType widget ) const; |
434 | /** | 439 | /** |
435 | * Returns the gradient low color if one is specified, NULL otherwise. | 440 | * Returns the gradient low color if one is specified, NULL otherwise. |
436 | */ | 441 | */ |
437 | QColor* gradientLow( WidgetType widget ) const; | 442 | QColor* gradientLow( WidgetType widget ) const; |
438 | /** | 443 | /** |
439 | * Reads in all the configuration file entries supported. | 444 | * Reads in all the configuration file entries supported. |
440 | * | 445 | * |
441 | * @param colorStyle The style for the color groups. In KDE, colors were | 446 | * @param colorStyle The style for the color groups. In KDE, colors were |
442 | * calculated a little differently for Motif vs Windows styles. This | 447 | * calculated a little differently for Motif vs Windows styles. This |
443 | * is obsolete. | 448 | * is obsolete. |
444 | */ | 449 | */ |
445 | void readConfig( Qt::GUIStyle colorStyle = Qt::WindowsStyle ); | 450 | void readConfig( Qt::GUIStyle colorStyle = Qt::WindowsStyle ); |
446 | void readWidgetConfig( int i, Config *config, QString *pixnames, | 451 | void readWidgetConfig( int i, Config *config, QString *pixnames, |
447 | QString *brdnames, bool *loadArray ); | 452 | QString *brdnames, bool *loadArray ); |
448 | void copyWidgetConfig( int sourceID, int destID, QString *pixnames, | 453 | void copyWidgetConfig( int sourceID, int destID, QString *pixnames, |
449 | QString *brdnames ); | 454 | QString *brdnames ); |
450 | /** | 455 | /** |
451 | * Makes a full color group based on the given foreground and background | 456 | * Makes a full color group based on the given foreground and background |
452 | * colors. This is the same code used by KDE (kapp.cpp) in previous | 457 | * colors. This is the same code used by KDE (kapp.cpp) in previous |
453 | * versions. | 458 | * versions. |
454 | */ | 459 | */ |
455 | QColorGroup* makeColorGroup( QColor &fg, QColor &bg, | 460 | QColorGroup* makeColorGroup( QColor &fg, QColor &bg, |
456 | Qt::GUIStyle style = Qt::WindowsStyle ); | 461 | Qt::GUIStyle style = Qt::WindowsStyle ); |
457 | OThemePixmap* scale( int w, int h, WidgetType widget ); | 462 | OThemePixmap* scale( int w, int h, WidgetType widget ); |
458 | OThemePixmap* scaleBorder( int w, int h, WidgetType type ); | 463 | OThemePixmap* scaleBorder( int w, int h, WidgetType type ); |
459 | OThemePixmap* gradient( int w, int h, WidgetType widget ); | 464 | OThemePixmap* gradient( int w, int h, WidgetType widget ); |
460 | OThemePixmap* blend( WidgetType widget ); | 465 | OThemePixmap* blend( WidgetType widget ); |
461 | void generateBorderPix( int i ); | 466 | void generateBorderPix( int i ); |
462 | void applyResourceGroup( Config *config, int i, QString *copyfrom, QString *pixnames, QString *brdnames ); | 467 | void applyResourceGroup( Config *config, int i, QString *copyfrom, QString *pixnames, QString *brdnames ); |
463 | void applyMiscResourceGroup( Config *config ); | 468 | void applyMiscResourceGroup( Config *config ); |
464 | void readResourceGroup( int i, QString *copyfrom, QString *pixnames, QString *brdnames, | 469 | void readResourceGroup( int i, QString *copyfrom, QString *pixnames, QString *brdnames, |
465 | bool *loadArray ); | 470 | bool *loadArray ); |
466 | void readMiscResourceGroup(); | 471 | void readMiscResourceGroup(); |
467 | /** | 472 | /** |
468 | * Attempts to load a pixmap from the default OThemeBase locations. | 473 | * Attempts to load a pixmap from the default OThemeBase locations. |
469 | */ | 474 | */ |
470 | OThemePixmap* loadPixmap( QString &name ); | 475 | OThemePixmap* loadPixmap( QString &name ); |
471 | /** | 476 | /** |
472 | * Attempts to load a image from the default OThemeBase locations. | 477 | * Attempts to load a image from the default OThemeBase locations. |
473 | */ | 478 | */ |
474 | QImage* loadImage( QString &name ); | 479 | QImage* loadImage( QString &name ); |
475 | private: | 480 | private: |
476 | SButton sbPlacement; | 481 | SButton sbPlacement; |
477 | ArrowStyle arrowStyle; | 482 | ArrowStyle arrowStyle; |
478 | ShadeStyle shading; | 483 | ShadeStyle shading; |
479 | int defaultFrame; | 484 | int defaultFrame; |
480 | int btnXShift, btnYShift; | 485 | int btnXShift, btnYShift; |
481 | int sliderLen; | 486 | int sliderLen; |
482 | int splitterWidth; | 487 | int splitterWidth; |
483 | int focus3DOffset; | 488 | int focus3DOffset; |
484 | int sbExtent; | 489 | int sbExtent; |
485 | bool smallGroove; | 490 | bool smallGroove; |
486 | bool roundedButton, roundedCombo, roundedSlider; | 491 | bool roundedButton, roundedCombo, roundedSlider; |
487 | bool aTabLine, iTabLine; | 492 | bool aTabLine, iTabLine; |
488 | bool focus3D; | 493 | bool focus3D; |
489 | OThemeCache *cache; | 494 | OThemeCache *cache; |
490 | int cacheSize; | 495 | int cacheSize; |
491 | QString configFileName; | 496 | QString configFileName; |
492 | QString configFilePath; | 497 | QString configFilePath; |
493 | 498 | ||
494 | protected: | 499 | protected: |
495 | QColor fgcolor, bgcolor, selfgcolor, selbgcolor, winfgcolor, winbgcolor; | 500 | QColor fgcolor, bgcolor, selfgcolor, selbgcolor, winfgcolor, winbgcolor; |
496 | 501 | ||
497 | private: | 502 | private: |
498 | /** | 503 | /** |
499 | * The theme pixmaps. Many of these may be NULL if no pixmap is specified. | 504 | * The theme pixmaps. Many of these may be NULL if no pixmap is specified. |
500 | * There may also be duplicate pixmap pointers if more than one widget | 505 | * There may also be duplicate pixmap pointers if more than one widget |
501 | * uses the same tiled pixmap. If a pixmap is tiled, it is kept here and | 506 | * uses the same tiled pixmap. If a pixmap is tiled, it is kept here and |
502 | * this acts as a cache. Otherwise this will hold whatever the last scaled | 507 | * this acts as a cache. Otherwise this will hold whatever the last scaled |
503 | * pixmap was. | 508 | * pixmap was. |
504 | */ | 509 | */ |
505 | OThemePixmap *pixmaps[ WIDGETS ]; | 510 | OThemePixmap *pixmaps[ WIDGETS ]; |
506 | /** | 511 | /** |
507 | * The theme images. These are for scaled images and are kept in order | 512 | * The theme images. These are for scaled images and are kept in order |
508 | * to maintain fast smoothscaling. | 513 | * to maintain fast smoothscaling. |
509 | */ | 514 | */ |
510 | QImage *images[ WIDGETS ]; | 515 | QImage *images[ WIDGETS ]; |
511 | /** | 516 | /** |
512 | * The border widths | 517 | * The border widths |
513 | */ | 518 | */ |
514 | unsigned char borders[ WIDGETS ]; | 519 | unsigned char borders[ WIDGETS ]; |
515 | /** | 520 | /** |
516 | * The highlight widths | 521 | * The highlight widths |
517 | */ | 522 | */ |
518 | unsigned char highlights[ WIDGETS ]; | 523 | unsigned char highlights[ WIDGETS ]; |
519 | /** | 524 | /** |
520 | * The scale hints for pixmaps and gradients. | 525 | * The scale hints for pixmaps and gradients. |
521 | */ | 526 | */ |
522 | ScaleHint scaleHints[ WIDGETS ]; | 527 | ScaleHint scaleHints[ WIDGETS ]; |
523 | /** | 528 | /** |
524 | * All the color groups. | 529 | * All the color groups. |
525 | */ | 530 | */ |
526 | QColorGroup *colors[ WIDGETS ]; | 531 | QColorGroup *colors[ WIDGETS ]; |
527 | /** | 532 | /** |
528 | * Gradient low colors (or blend background). | 533 | * Gradient low colors (or blend background). |
529 | */ | 534 | */ |
530 | QColor *grLowColors[ WIDGETS ]; | 535 | QColor *grLowColors[ WIDGETS ]; |
531 | /** | 536 | /** |
532 | * Gradient high colors. | 537 | * Gradient high colors. |
533 | */ | 538 | */ |
534 | QColor *grHighColors[ WIDGETS ]; | 539 | QColor *grHighColors[ WIDGETS ]; |
535 | /** | 540 | /** |
536 | * Gradient types. | 541 | * Gradient types. |
537 | */ | 542 | */ |
538 | Gradient gradients[ WIDGETS ]; | 543 | Gradient gradients[ WIDGETS ]; |
539 | /** | 544 | /** |
540 | * Blend intensity factors | 545 | * Blend intensity factors |
541 | */ | 546 | */ |
542 | float blends[ WIDGETS ]; | 547 | float blends[ WIDGETS ]; |
543 | /** | 548 | /** |
544 | * Bevel contrasts | 549 | * Bevel contrasts |
545 | */ | 550 | */ |
546 | unsigned char bContrasts[ WIDGETS ]; | 551 | unsigned char bContrasts[ WIDGETS ]; |
547 | /** | 552 | /** |
548 | * Duplicate pixmap entries (used during destruction). | 553 | * Duplicate pixmap entries (used during destruction). |
549 | */ | 554 | */ |
550 | bool duplicate[ WIDGETS ]; | 555 | bool duplicate[ WIDGETS ]; |
551 | /** | 556 | /** |
552 | * Pixmapped border widths | 557 | * Pixmapped border widths |
553 | */ | 558 | */ |
554 | int pbWidth[ WIDGETS ]; | 559 | int pbWidth[ WIDGETS ]; |
555 | /** | 560 | /** |
556 | * Pixmapped borders | 561 | * Pixmapped borders |
557 | */ | 562 | */ |
558 | OThemePixmap *pbPixmaps[ WIDGETS ]; | 563 | OThemePixmap *pbPixmaps[ WIDGETS ]; |
559 | /** | 564 | /** |
560 | * Duplicate border pixmapped border entries | 565 | * Duplicate border pixmapped border entries |
561 | */ | 566 | */ |
562 | bool pbDuplicate[ WIDGETS ]; | 567 | bool pbDuplicate[ WIDGETS ]; |
563 | 568 | ||
564 | private: | 569 | private: |
565 | class OThemeBasePrivate; | 570 | class OThemeBasePrivate; |
566 | OThemeBasePrivate *d; | 571 | OThemeBasePrivate *d; |
567 | 572 | ||
@@ -571,3 +576,3 @@ inline bool OThemeBase::isPixmap( WidgetType widget ) const | |||
571 | { | 576 | { |
572 | return ( pixmaps[ widget ] != NULL || gradients[ widget ] != GrNone ); | 577 | return ( pixmaps[ widget ] != NULL || gradients[ widget ] != GrNone ); |
573 | } | 578 | } |
@@ -576,3 +581,3 @@ inline bool OThemeBase::isColor( WidgetType widget ) const | |||
576 | { | 581 | { |
577 | return ( colors[ widget ] != NULL ); | 582 | return ( colors[ widget ] != NULL ); |
578 | } | 583 | } |
@@ -581,3 +586,3 @@ inline bool OThemeBase::is3DFocus() const | |||
581 | { | 586 | { |
582 | return ( focus3D ); | 587 | return ( focus3D ); |
583 | } | 588 | } |
@@ -586,3 +591,3 @@ inline int OThemeBase::focusOffset() const | |||
586 | { | 591 | { |
587 | return ( focus3DOffset ); | 592 | return ( focus3DOffset ); |
588 | } | 593 | } |
@@ -591,3 +596,3 @@ inline int OThemeBase::bevelContrast( WidgetType widget ) const | |||
591 | { | 596 | { |
592 | return ( bContrasts[ widget ] ); | 597 | return ( bContrasts[ widget ] ); |
593 | } | 598 | } |
@@ -596,3 +601,3 @@ inline OThemeBase::ScaleHint OThemeBase::scaleHint( WidgetType widget ) const | |||
596 | { | 601 | { |
597 | return ( ( widget < WIDGETS ) ? scaleHints[ widget ] : TileScale ); | 602 | return ( ( widget < WIDGETS ) ? scaleHints[ widget ] : TileScale ); |
598 | } | 603 | } |
@@ -601,3 +606,3 @@ inline OThemeBase::Gradient OThemeBase::gradientHint( WidgetType widget ) const | |||
601 | { | 606 | { |
602 | return ( ( widget < WIDGETS ) ? gradients[ widget ] : GrNone ); | 607 | return ( ( widget < WIDGETS ) ? gradients[ widget ] : GrNone ); |
603 | } | 608 | } |
@@ -606,3 +611,3 @@ inline OThemePixmap* OThemeBase::uncached( WidgetType widget ) const | |||
606 | { | 611 | { |
607 | return ( pixmaps[ widget ] ); | 612 | return ( pixmaps[ widget ] ); |
608 | } | 613 | } |
@@ -613,6 +618,6 @@ inline QBrush OThemeBase::pixmapBrush( const QColorGroup &group, | |||
613 | { | 618 | { |
614 | if ( pixmaps[ widget ] || images[ widget ] ) | 619 | if ( pixmaps[ widget ] || images[ widget ] ) |
615 | return ( QBrush( group.color( role ), *scalePixmap( w, h, widget ) ) ); | 620 | return ( QBrush( group.color( role ), *scalePixmap( w, h, widget ) ) ); |
616 | else | 621 | else |
617 | return ( group.color( role ) ); | 622 | return ( group.color( role ) ); |
618 | } | 623 | } |
@@ -622,3 +627,3 @@ inline const QColorGroup* OThemeBase::colorGroup( const QColorGroup &defaultGrou | |||
622 | { | 627 | { |
623 | return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup ); | 628 | return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup ); |
624 | } | 629 | } |
@@ -627,3 +632,3 @@ inline int OThemeBase::borderWidth( WidgetType widget ) const | |||
627 | { | 632 | { |
628 | return ( pbWidth[ widget ] ? pbWidth[ widget ] : borders[ widget ] ); | 633 | return ( pbWidth[ widget ] ? pbWidth[ widget ] : borders[ widget ] ); |
629 | } | 634 | } |
@@ -632,3 +637,3 @@ inline int OThemeBase::pixBorderWidth( WidgetType widget ) const | |||
632 | { | 637 | { |
633 | return ( pbWidth[ widget ] ); | 638 | return ( pbWidth[ widget ] ); |
634 | } | 639 | } |
@@ -637,3 +642,3 @@ inline int OThemeBase::highlightWidth( WidgetType widget ) const | |||
637 | { | 642 | { |
638 | return ( pbWidth[ widget ] ? 0 : highlights[ widget ] ); | 643 | return ( pbWidth[ widget ] ? 0 : highlights[ widget ] ); |
639 | } | 644 | } |
@@ -642,3 +647,3 @@ inline int OThemeBase::decoWidth( WidgetType widget ) const | |||
642 | { | 647 | { |
643 | return ( pbWidth[ widget ] ? pbWidth[ widget ] : borders[ widget ] + highlights[ widget ] ); | 648 | return ( pbWidth[ widget ] ? pbWidth[ widget ] : borders[ widget ] + highlights[ widget ] ); |
644 | } | 649 | } |
@@ -647,3 +652,3 @@ inline QColor* OThemeBase::gradientHigh( WidgetType widget ) const | |||
647 | { | 652 | { |
648 | return ( grHighColors[ widget ] ); | 653 | return ( grHighColors[ widget ] ); |
649 | } | 654 | } |
@@ -652,3 +657,3 @@ inline QColor* OThemeBase::gradientLow( WidgetType widget ) const | |||
652 | { | 657 | { |
653 | return ( grLowColors[ widget ] ); | 658 | return ( grLowColors[ widget ] ); |
654 | } | 659 | } |
@@ -657,3 +662,3 @@ inline QImage* OThemeBase::image( WidgetType widget ) const | |||
657 | { | 662 | { |
658 | return ( images[ widget ] ); | 663 | return ( images[ widget ] ); |
659 | } | 664 | } |
@@ -662,3 +667,3 @@ inline OThemeBase::SButton OThemeBase::scrollBarLayout() const | |||
662 | { | 667 | { |
663 | return ( sbPlacement ); | 668 | return ( sbPlacement ); |
664 | } | 669 | } |
@@ -667,3 +672,3 @@ inline OThemeBase::ArrowStyle OThemeBase::arrowType() const | |||
667 | { | 672 | { |
668 | return ( arrowStyle ); | 673 | return ( arrowStyle ); |
669 | } | 674 | } |
@@ -672,3 +677,3 @@ inline OThemeBase::ShadeStyle OThemeBase::shade() const | |||
672 | { | 677 | { |
673 | return ( shading ); | 678 | return ( shading ); |
674 | } | 679 | } |
@@ -677,3 +682,3 @@ inline int OThemeBase::frameWidth() const | |||
677 | { | 682 | { |
678 | return ( defaultFrame ); | 683 | return ( defaultFrame ); |
679 | } | 684 | } |
@@ -682,3 +687,3 @@ inline int OThemeBase::buttonXShift() const | |||
682 | { | 687 | { |
683 | return ( btnXShift ); | 688 | return ( btnXShift ); |
684 | } | 689 | } |
@@ -687,3 +692,3 @@ inline int OThemeBase::splitWidth() const | |||
687 | { | 692 | { |
688 | return ( splitterWidth ); | 693 | return ( splitterWidth ); |
689 | } | 694 | } |
@@ -692,3 +697,3 @@ inline int OThemeBase::buttonYShift() const | |||
692 | { | 697 | { |
693 | return ( btnYShift ); | 698 | return ( btnYShift ); |
694 | } | 699 | } |
@@ -697,6 +702,6 @@ inline int OThemeBase::sliderButtonLength() const | |||
697 | { | 702 | { |
698 | if ( isPixmap( Slider ) ) | 703 | if ( isPixmap( Slider ) ) |
699 | return ( uncached( Slider ) ->width() ); | 704 | return ( uncached( Slider ) ->width() ); |
700 | else | 705 | else |
701 | return ( sliderLen ); | 706 | return ( sliderLen ); |
702 | } | 707 | } |
@@ -705,3 +710,3 @@ inline bool OThemeBase::roundButton() const | |||
705 | { | 710 | { |
706 | return ( roundedButton ); | 711 | return ( roundedButton ); |
707 | } | 712 | } |
@@ -710,3 +715,3 @@ inline bool OThemeBase::roundComboBox() const | |||
710 | { | 715 | { |
711 | return ( roundedCombo ); | 716 | return ( roundedCombo ); |
712 | } | 717 | } |
@@ -715,3 +720,3 @@ inline bool OThemeBase::roundSlider() const | |||
715 | { | 720 | { |
716 | return ( roundedSlider ); | 721 | return ( roundedSlider ); |
717 | } | 722 | } |
@@ -720,3 +725,3 @@ inline bool OThemeBase::activeTabLine() const | |||
720 | { | 725 | { |
721 | return ( aTabLine ); | 726 | return ( aTabLine ); |
722 | } | 727 | } |
@@ -725,3 +730,3 @@ inline bool OThemeBase::inactiveTabLine() const | |||
725 | { | 730 | { |
726 | return ( iTabLine ); | 731 | return ( iTabLine ); |
727 | } | 732 | } |
@@ -730,3 +735,3 @@ inline int OThemeBase::getSBExtent() const | |||
730 | { | 735 | { |
731 | return ( sbExtent ); | 736 | return ( sbExtent ); |
732 | } | 737 | } |
@@ -735,3 +740,3 @@ inline OThemePixmap* OThemeBase::borderPixmap( WidgetType widget ) | |||
735 | { | 740 | { |
736 | return ( pbPixmaps[ widget ] ); | 741 | return ( pbPixmaps[ widget ] ); |
737 | } | 742 | } |