author | mickeyl <mickeyl> | 2003-12-20 17:47:08 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-20 17:47:08 (UTC) |
commit | d552ce3a94b53ae0fdb226411bd8f9e5bab6596a (patch) (unidiff) | |
tree | ca9f1edd3ed945c98a6cd4587a5094fe9b2b3d36 /libopie2/opieui | |
parent | 8e96eec63c67cfcd1fb202fe7346e5408a142f2e (diff) | |
download | opie-d552ce3a94b53ae0fdb226411bd8f9e5bab6596a.zip opie-d552ce3a94b53ae0fdb226411bd8f9e5bab6596a.tar.gz opie-d552ce3a94b53ae0fdb226411bd8f9e5bab6596a.tar.bz2 |
- start cleaning up (lot of stuff left)
- use odebug classes
-rw-r--r-- | libopie2/opieui/odialog.cpp | 10 | ||||
-rw-r--r-- | libopie2/opieui/odialog.h | 10 | ||||
-rw-r--r-- | libopie2/opieui/oimageeffect.cpp | 41 | ||||
-rw-r--r-- | libopie2/opieui/olistview.cpp | 20 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 10 | ||||
-rw-r--r-- | libopie2/opieui/oseparator.cpp | 12 | ||||
-rw-r--r-- | libopie2/opieui/oversatileview.cpp | 25 |
7 files changed, 66 insertions, 62 deletions
diff --git a/libopie2/opieui/odialog.cpp b/libopie2/opieui/odialog.cpp index 00a7a7e..4d269d4 100644 --- a/libopie2/opieui/odialog.cpp +++ b/libopie2/opieui/odialog.cpp | |||
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> | |
4 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | 4 | =. |
6 | .=l. | 5 | .=l. |
7 | .>+-= | 6 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
@@ -28,18 +27,21 @@ | |||
28 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
29 | 28 | ||
30 | */ | 29 | */ |
31 | 30 | ||
32 | #include <opie2/odialog.h> | 31 | #include <opie2/odialog.h> |
33 | 32 | ||
34 | int ODialog::mMarginSize = 5; // 11 like in KDialog is probably too much for PDA | 33 | #warning Make Margin and Spacing device dependend and configurable! |
35 | int ODialog::mSpacingSize = 2; // 6 like in KDialog is probably too much for PDA | 34 | |
35 | int ODialog::mMarginSize = 5; | ||
36 | int ODialog::mSpacingSize = 2; | ||
36 | 37 | ||
37 | ODialog::ODialog(QWidget *parent, const char *name, bool modal, WFlags f) | 38 | ODialog::ODialog(QWidget *parent, const char *name, bool modal, WFlags f) |
38 | : QDialog(parent, name, modal, f) | 39 | : QDialog(parent, name, modal, f) |
39 | { | 40 | { |
41 | // d = new ODialogPrivate(); | ||
40 | } | 42 | } |
41 | 43 | ||
42 | int ODialog::marginHint() | 44 | int ODialog::marginHint() |
43 | { | 45 | { |
44 | return( mMarginSize ); | 46 | return( mMarginSize ); |
45 | } | 47 | } |
diff --git a/libopie2/opieui/odialog.h b/libopie2/opieui/odialog.h index 4116ed7..ceff612 100644 --- a/libopie2/opieui/odialog.h +++ b/libopie2/opieui/odialog.h | |||
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> | |
4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | 4 | =. |
6 | .=l. | 5 | .=l. |
7 | .>+-= | 6 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
@@ -46,15 +45,18 @@ class QLayoutItem; | |||
46 | * beteween the buttons shall be @ref spacingHint(), whereas the space | 45 | * beteween the buttons shall be @ref spacingHint(), whereas the space |
47 | * above, below, to the right and to the left shall be @ref marginHint(). | 46 | * above, below, to the right and to the left shall be @ref marginHint(). |
48 | * If you add a separator line above the buttons, there shall be a | 47 | * If you add a separator line above the buttons, there shall be a |
49 | * @ref marginHint() between the buttons and the separator and a | 48 | * @ref marginHint() between the buttons and the separator and a |
50 | * @ref marginHint() above the separator as well. | 49 | * @ref marginHint() above the separator as well. |
51 | * | 50 | * |
52 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 51 | * @author Michael 'Mickey' Lauer <mickey@Vanille.de> |
53 | */ | 52 | */ |
53 | |||
54 | // lets fix up Qt instead! Size does matter. -zecke | 54 | // lets fix up Qt instead! Size does matter. -zecke |
55 | // while that may be true, reducing maintainance effort for the future does also matter - | ||
56 | // and I believe that maintaining a patch against QtE is more work than our classes -mml | ||
55 | 57 | ||
56 | class ODialog : public QDialog | 58 | class ODialog : public QDialog |
57 | { | 59 | { |
58 | Q_OBJECT | 60 | Q_OBJECT |
59 | 61 | ||
60 | public: | 62 | public: |
@@ -80,10 +82,10 @@ class ODialog : public QDialog | |||
80 | 82 | ||
81 | private: | 83 | private: |
82 | static int mMarginSize; | 84 | static int mMarginSize; |
83 | static int mSpacingSize; | 85 | static int mSpacingSize; |
84 | 86 | ||
85 | class ODialogPrivate; | 87 | class ODialogPrivate; |
86 | ODialogPrivate *d; // d pointer always needed! -zecke | 88 | ODialogPrivate *d; |
87 | 89 | ||
88 | }; | 90 | }; |
89 | #endif // ODIALOG_H | 91 | #endif // ODIALOG_H |
diff --git a/libopie2/opieui/oimageeffect.cpp b/libopie2/opieui/oimageeffect.cpp index 01e7c6f..9a58bb9 100644 --- a/libopie2/opieui/oimageeffect.cpp +++ b/libopie2/opieui/oimageeffect.cpp | |||
@@ -31,13 +31,14 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
31 | 31 | ||
32 | #include <math.h> | 32 | #include <math.h> |
33 | 33 | ||
34 | #include <qimage.h> | 34 | #include <qimage.h> |
35 | #include <stdlib.h> | 35 | #include <stdlib.h> |
36 | 36 | ||
37 | #include "oimageeffect.h" | 37 | #include <opie2/oimageeffect.h> |
38 | #include <opie2/odebug.h> | ||
38 | 39 | ||
39 | #define MaxRGB 255L | 40 | #define MaxRGB 255L |
40 | #define DegreesToRadians(x) ((x)*M_PI/180.0) | 41 | #define DegreesToRadians(x) ((x)*M_PI/180.0) |
41 | 42 | ||
42 | using namespace std; | 43 | using namespace std; |
43 | 44 | ||
@@ -60,13 +61,13 @@ QImage OImageEffect::gradient(const QSize &size, const QColor &ca, | |||
60 | int rDiff, gDiff, bDiff; | 61 | int rDiff, gDiff, bDiff; |
61 | int rca, gca, bca, rcb, gcb, bcb; | 62 | int rca, gca, bca, rcb, gcb, bcb; |
62 | 63 | ||
63 | QImage image(size, 32); | 64 | QImage image(size, 32); |
64 | 65 | ||
65 | if (size.width() == 0 || size.height() == 0) { | 66 | if (size.width() == 0 || size.height() == 0) { |
66 | qDebug( "WARNING: OImageEffect::gradient: invalid image" ); | 67 | odebug << "WARNING: OImageEffect::gradient: invalid image" << oendl; |
67 | return image; | 68 | return image; |
68 | } | 69 | } |
69 | 70 | ||
70 | register int x, y; | 71 | register int x, y; |
71 | 72 | ||
72 | rDiff = (rcb = cb.red()) - (rca = ca.red()); | 73 | rDiff = (rcb = cb.red()) - (rca = ca.red()); |
@@ -346,13 +347,13 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca, | |||
346 | int rDiff, gDiff, bDiff; | 347 | int rDiff, gDiff, bDiff; |
347 | int rca, gca, bca, rcb, gcb, bcb; | 348 | int rca, gca, bca, rcb, gcb, bcb; |
348 | 349 | ||
349 | QImage image(size, 32); | 350 | QImage image(size, 32); |
350 | 351 | ||
351 | if (size.width() == 0 || size.height() == 0) { | 352 | if (size.width() == 0 || size.height() == 0) { |
352 | qDebug( "WARNING: OImageEffect::unbalancedGradient : invalid image" ); | 353 | odebug << "WARNING: OImageEffect::unbalancedGradient : invalid image" << oendl; |
353 | return image; | 354 | return image; |
354 | } | 355 | } |
355 | 356 | ||
356 | register int x, y; | 357 | register int x, y; |
357 | unsigned int *scanline; | 358 | unsigned int *scanline; |
358 | 359 | ||
@@ -565,13 +566,13 @@ QImage OImageEffect::unbalancedGradient(const QSize &size, const QColor &ca, | |||
565 | * each pixel. (mosfet) | 566 | * each pixel. (mosfet) |
566 | */ | 567 | */ |
567 | 568 | ||
568 | QImage& OImageEffect::intensity(QImage &image, float percent) | 569 | QImage& OImageEffect::intensity(QImage &image, float percent) |
569 | { | 570 | { |
570 | if (image.width() == 0 || image.height() == 0) { | 571 | if (image.width() == 0 || image.height() == 0) { |
571 | qDebug( "WARNING: OImageEffect::intensity : invalid image" ); | 572 | odebug << "WARNING: OImageEffect::intensity : invalid image" << oendl; |
572 | return image; | 573 | return image; |
573 | } | 574 | } |
574 | 575 | ||
575 | int segColors = image.depth() > 8 ? 256 : image.numColors(); | 576 | int segColors = image.depth() > 8 ? 256 : image.numColors(); |
576 | unsigned char *segTbl = new unsigned char[segColors]; | 577 | unsigned char *segTbl = new unsigned char[segColors]; |
577 | int pixels = image.depth() > 8 ? image.width()*image.height() : | 578 | int pixels = image.depth() > 8 ? image.width()*image.height() : |
@@ -630,13 +631,13 @@ QImage& OImageEffect::intensity(QImage &image, float percent) | |||
630 | } | 631 | } |
631 | 632 | ||
632 | QImage& OImageEffect::channelIntensity(QImage &image, float percent, | 633 | QImage& OImageEffect::channelIntensity(QImage &image, float percent, |
633 | RGBComponent channel) | 634 | RGBComponent channel) |
634 | { | 635 | { |
635 | if (image.width() == 0 || image.height() == 0) { | 636 | if (image.width() == 0 || image.height() == 0) { |
636 | qDebug( "WARNING: OImageEffect::channelIntensity : invalid image" ); | 637 | odebug << "WARNING: OImageEffect::channelIntensity : invalid image" << oendl; |
637 | return image; | 638 | return image; |
638 | } | 639 | } |
639 | 640 | ||
640 | int segColors = image.depth() > 8 ? 256 : image.numColors(); | 641 | int segColors = image.depth() > 8 ? 256 : image.numColors(); |
641 | unsigned char *segTbl = new unsigned char[segColors]; | 642 | unsigned char *segTbl = new unsigned char[segColors]; |
642 | int pixels = image.depth() > 8 ? image.width()*image.height() : | 643 | int pixels = image.depth() > 8 ? image.width()*image.height() : |
@@ -720,13 +721,13 @@ QImage& OImageEffect::channelIntensity(QImage &image, float percent, | |||
720 | // | 721 | // |
721 | QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse, | 722 | QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse, |
722 | ModulationType type, int factor, RGBComponent channel) | 723 | ModulationType type, int factor, RGBComponent channel) |
723 | { | 724 | { |
724 | if (image.width() == 0 || image.height() == 0 || | 725 | if (image.width() == 0 || image.height() == 0 || |
725 | modImage.width() == 0 || modImage.height() == 0) { | 726 | modImage.width() == 0 || modImage.height() == 0) { |
726 | qDebug( "WARNING: OImageEffect::modulate : invalid image" ); | 727 | odebug << "WARNING: OImageEffect::modulate : invalid image" << oendl; |
727 | return image; | 728 | return image; |
728 | } | 729 | } |
729 | 730 | ||
730 | int r, g, b, h, s, v, a; | 731 | int r, g, b, h, s, v, a; |
731 | QColor clr; | 732 | QColor clr; |
732 | int mod=0; | 733 | int mod=0; |
@@ -849,13 +850,13 @@ QImage& OImageEffect::modulate(QImage &image, QImage &modImage, bool reverse, | |||
849 | QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity) | 850 | QImage& OImageEffect::blend(const QColor& clr, QImage& dst, float opacity) |
850 | { | 851 | { |
851 | if (dst.width() <= 0 || dst.height() <= 0) | 852 | if (dst.width() <= 0 || dst.height() <= 0) |
852 | return dst; | 853 | return dst; |
853 | 854 | ||
854 | if (opacity < 0.0 || opacity > 1.0) { | 855 | if (opacity < 0.0 || opacity > 1.0) { |
855 | qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] "); | 856 | odebug << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1] " << oendl; |
856 | return dst; | 857 | return dst; |
857 | } | 858 | } |
858 | 859 | ||
859 | int depth = dst.depth(); | 860 | int depth = dst.depth(); |
860 | if (depth != 32) | 861 | if (depth != 32) |
861 | dst = dst.convertDepth(32); | 862 | dst = dst.convertDepth(32); |
@@ -892,18 +893,18 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity) | |||
892 | if (src.width() <= 0 || src.height() <= 0) | 893 | if (src.width() <= 0 || src.height() <= 0) |
893 | return dst; | 894 | return dst; |
894 | if (dst.width() <= 0 || dst.height() <= 0) | 895 | if (dst.width() <= 0 || dst.height() <= 0) |
895 | return dst; | 896 | return dst; |
896 | 897 | ||
897 | if (src.width() != dst.width() || src.height() != dst.height()) { | 898 | if (src.width() != dst.width() || src.height() != dst.height()) { |
898 | qDebug( "WARNING: OImageEffect::blend : src and destination images are not the same size" ); | 899 | odebug << "WARNING: OImageEffect::blend : src and destination images are not the same size" << oendl; |
899 | return dst; | 900 | return dst; |
900 | } | 901 | } |
901 | 902 | ||
902 | if (opacity < 0.0 || opacity > 1.0) { | 903 | if (opacity < 0.0 || opacity > 1.0) { |
903 | qDebug( "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" ); | 904 | odebug << "WARNING: OImageEffect::blend : invalid opacity. Range [0, 1]" << oendl; |
904 | return dst; | 905 | return dst; |
905 | } | 906 | } |
906 | 907 | ||
907 | if (src.depth() != 32) src = src.convertDepth(32); | 908 | if (src.depth() != 32) src = src.convertDepth(32); |
908 | if (dst.depth() != 32) dst = dst.convertDepth(32); | 909 | if (dst.depth() != 32) dst = dst.convertDepth(32); |
909 | 910 | ||
@@ -937,13 +938,13 @@ QImage& OImageEffect::blend(QImage& src, QImage& dst, float opacity) | |||
937 | 938 | ||
938 | QImage& OImageEffect::blend(QImage &image, float initial_intensity, | 939 | QImage& OImageEffect::blend(QImage &image, float initial_intensity, |
939 | const QColor &bgnd, GradientType eff, | 940 | const QColor &bgnd, GradientType eff, |
940 | bool anti_dir) | 941 | bool anti_dir) |
941 | { | 942 | { |
942 | if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) { | 943 | if (image.width() == 0 || image.height() == 0 || image.depth()!=32 ) { |
943 | qDebug( "WARNING: OImageEffect::blend : invalid image" ); | 944 | odebug << "WARNING: OImageEffect::blend : invalid image" << oendl; |
944 | return image; | 945 | return image; |
945 | } | 946 | } |
946 | 947 | ||
947 | int r_bgnd = bgnd.red(), g_bgnd = bgnd.green(), b_bgnd = bgnd.blue(); | 948 | int r_bgnd = bgnd.red(), g_bgnd = bgnd.green(), b_bgnd = bgnd.blue(); |
948 | int r, g, b; | 949 | int r, g, b; |
949 | int ind; | 950 | int ind; |
@@ -1130,13 +1131,13 @@ QImage& OImageEffect::blend(QImage &image, float initial_intensity, | |||
1130 | if (b > 255) b = 255; if (b < 0 ) b = 0; | 1131 | if (b > 255) b = 255; if (b < 0 ) b = 0; |
1131 | a = qAlpha(data[ind]); | 1132 | a = qAlpha(data[ind]); |
1132 | data[ind] = qRgba(r, g, b, a); | 1133 | data[ind] = qRgba(r, g, b, a); |
1133 | } | 1134 | } |
1134 | } | 1135 | } |
1135 | } | 1136 | } |
1136 | else qDebug( "OImageEffect::blend effect not implemented" ); | 1137 | else odebug << "OImageEffect::blend effect not implemented" << oendl; |
1137 | return image; | 1138 | return image; |
1138 | } | 1139 | } |
1139 | 1140 | ||
1140 | // Not very efficient as we create a third big image... | 1141 | // Not very efficient as we create a third big image... |
1141 | // | 1142 | // |
1142 | QImage& OImageEffect::blend(QImage &image1, QImage &image2, | 1143 | QImage& OImageEffect::blend(QImage &image1, QImage &image2, |
@@ -1160,13 +1161,13 @@ QImage& OImageEffect::blend(QImage &image1, QImage &image2, | |||
1160 | QImage& OImageEffect::blend(QImage &image1, QImage &image2, | 1161 | QImage& OImageEffect::blend(QImage &image1, QImage &image2, |
1161 | QImage &blendImage, RGBComponent channel) | 1162 | QImage &blendImage, RGBComponent channel) |
1162 | { | 1163 | { |
1163 | if (image1.width() == 0 || image1.height() == 0 || | 1164 | if (image1.width() == 0 || image1.height() == 0 || |
1164 | image2.width() == 0 || image2.height() == 0 || | 1165 | image2.width() == 0 || image2.height() == 0 || |
1165 | blendImage.width() == 0 || blendImage.height() == 0) { | 1166 | blendImage.width() == 0 || blendImage.height() == 0) { |
1166 | qDebug( "OImageEffect::blend effect invalid image" ); | 1167 | odebug << "OImageEffect::blend effect invalid image" << oendl; |
1167 | return image1; | 1168 | return image1; |
1168 | } | 1169 | } |
1169 | 1170 | ||
1170 | int r, g, b; | 1171 | int r, g, b; |
1171 | int ind1, ind2, ind3; | 1172 | int ind1, ind2, ind3; |
1172 | 1173 | ||
@@ -1258,13 +1259,13 @@ unsigned int OImageEffect::uHash(unsigned int c) | |||
1258 | 1259 | ||
1259 | // ----------------------------------------------------------------------------- | 1260 | // ----------------------------------------------------------------------------- |
1260 | 1261 | ||
1261 | QImage& OImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing) | 1262 | QImage& OImageEffect::hash(QImage &image, Lighting lite, unsigned int spacing) |
1262 | { | 1263 | { |
1263 | if (image.width() == 0 || image.height() == 0) { | 1264 | if (image.width() == 0 || image.height() == 0) { |
1264 | qDebug( "OImageEffect::hash effect invalid image" ); | 1265 | odebug << "OImageEffect::hash effect invalid image" << oendl; |
1265 | return image; | 1266 | return image; |
1266 | } | 1267 | } |
1267 | 1268 | ||
1268 | register int x, y; | 1269 | register int x, y; |
1269 | unsigned int *data = (unsigned int *)image.bits(); | 1270 | unsigned int *data = (unsigned int *)image.bits(); |
1270 | unsigned int ind; | 1271 | unsigned int ind; |
@@ -1766,13 +1767,13 @@ bool OImageEffect::blend( | |||
1766 | upper.width() > lower.width() || | 1767 | upper.width() > lower.width() || |
1767 | upper.height() > lower.height() || | 1768 | upper.height() > lower.height() || |
1768 | upper.depth() != 32 || | 1769 | upper.depth() != 32 || |
1769 | lower.depth() != 32 | 1770 | lower.depth() != 32 |
1770 | ) | 1771 | ) |
1771 | { | 1772 | { |
1772 | qDebug( "OImageEffect::blend : Sizes not correct" ); | 1773 | odebug << "OImageEffect::blend : Sizes not correct" << oendl; |
1773 | return false; | 1774 | return false; |
1774 | } | 1775 | } |
1775 | 1776 | ||
1776 | output = lower.copy(); | 1777 | output = lower.copy(); |
1777 | 1778 | ||
1778 | register uchar *i, *o; | 1779 | register uchar *i, *o; |
@@ -1983,13 +1984,13 @@ void OImageEffect::normalize(QImage &img) | |||
1983 | unsigned int high, low; | 1984 | unsigned int high, low; |
1984 | 1985 | ||
1985 | // allocate histogram and normalize map | 1986 | // allocate histogram and normalize map |
1986 | histogram = (int *)calloc(MaxRGB+1, sizeof(int)); | 1987 | histogram = (int *)calloc(MaxRGB+1, sizeof(int)); |
1987 | normalize_map = (unsigned int *)malloc((MaxRGB+1)*sizeof(unsigned int)); | 1988 | normalize_map = (unsigned int *)malloc((MaxRGB+1)*sizeof(unsigned int)); |
1988 | if(!normalize_map || !histogram){ | 1989 | if(!normalize_map || !histogram){ |
1989 | qWarning("Unable to allocate normalize histogram and map"); | 1990 | owarn << "Unable to allocate normalize histogram and map" << oendl; |
1990 | free(normalize_map); | 1991 | free(normalize_map); |
1991 | free(histogram); | 1992 | free(histogram); |
1992 | return; | 1993 | return; |
1993 | } | 1994 | } |
1994 | 1995 | ||
1995 | // form histogram | 1996 | // form histogram |
@@ -2099,13 +2100,13 @@ void OImageEffect::equalize(QImage &img) | |||
2099 | // allocate histogram and maps | 2100 | // allocate histogram and maps |
2100 | histogram = (int *)calloc(MaxRGB+1, sizeof(int)); | 2101 | histogram = (int *)calloc(MaxRGB+1, sizeof(int)); |
2101 | map = (int *)malloc((MaxRGB+1)*sizeof(unsigned int)); | 2102 | map = (int *)malloc((MaxRGB+1)*sizeof(unsigned int)); |
2102 | equalize_map = (int *)malloc((MaxRGB+1)*sizeof(unsigned int)); | 2103 | equalize_map = (int *)malloc((MaxRGB+1)*sizeof(unsigned int)); |
2103 | 2104 | ||
2104 | if(!histogram || !map || !equalize_map){ | 2105 | if(!histogram || !map || !equalize_map){ |
2105 | qWarning("Unable to allocate equalize histogram and maps"); | 2106 | owarn << "Unable to allocate equalize histogram and maps" << oendl; |
2106 | free(histogram); | 2107 | free(histogram); |
2107 | free(map); | 2108 | free(map); |
2108 | free(equalize_map); | 2109 | free(equalize_map); |
2109 | return; | 2110 | return; |
2110 | } | 2111 | } |
2111 | // form histogram | 2112 | // form histogram |
@@ -2184,13 +2185,13 @@ QImage OImageEffect::sample(QImage &src, int w, int h) | |||
2184 | register int x; | 2185 | register int x; |
2185 | QImage dest(w, h, src.depth()); | 2186 | QImage dest(w, h, src.depth()); |
2186 | 2187 | ||
2187 | x_offset = (double *)malloc(w*sizeof(double)); | 2188 | x_offset = (double *)malloc(w*sizeof(double)); |
2188 | y_offset = (double *)malloc(h*sizeof(double)); | 2189 | y_offset = (double *)malloc(h*sizeof(double)); |
2189 | if(!x_offset || !y_offset){ | 2190 | if(!x_offset || !y_offset){ |
2190 | qWarning("Unable to allocate pixels buffer"); | 2191 | owarn << "Unable to allocate pixels buffer" << oendl; |
2191 | free(x_offset); | 2192 | free(x_offset); |
2192 | free(y_offset); | 2193 | free(y_offset); |
2193 | return(src); | 2194 | return(src); |
2194 | } | 2195 | } |
2195 | 2196 | ||
2196 | // init pixel offsets | 2197 | // init pixel offsets |
@@ -2202,13 +2203,13 @@ QImage OImageEffect::sample(QImage &src, int w, int h) | |||
2202 | // sample each row | 2203 | // sample each row |
2203 | if(src.depth() > 8){ // DirectClass source image | 2204 | if(src.depth() > 8){ // DirectClass source image |
2204 | unsigned int *srcData, *destData; | 2205 | unsigned int *srcData, *destData; |
2205 | unsigned int *pixels; | 2206 | unsigned int *pixels; |
2206 | pixels = (unsigned int *)malloc(src.width()*sizeof(unsigned int)); | 2207 | pixels = (unsigned int *)malloc(src.width()*sizeof(unsigned int)); |
2207 | if(!pixels){ | 2208 | if(!pixels){ |
2208 | qWarning("Unable to allocate pixels buffer"); | 2209 | owarn << "Unable to allocate pixels buffer" << oendl; |
2209 | free(pixels); | 2210 | free(pixels); |
2210 | free(x_offset); | 2211 | free(x_offset); |
2211 | free(y_offset); | 2212 | free(y_offset); |
2212 | return(src); | 2213 | return(src); |
2213 | } | 2214 | } |
2214 | j = (-1); | 2215 | j = (-1); |
@@ -2230,13 +2231,13 @@ QImage OImageEffect::sample(QImage &src, int w, int h) | |||
2230 | } | 2231 | } |
2231 | else{ // PsudeoClass source image | 2232 | else{ // PsudeoClass source image |
2232 | unsigned char *srcData, *destData; | 2233 | unsigned char *srcData, *destData; |
2233 | unsigned char *pixels; | 2234 | unsigned char *pixels; |
2234 | pixels = (unsigned char *)malloc(src.width()*sizeof(unsigned char)); | 2235 | pixels = (unsigned char *)malloc(src.width()*sizeof(unsigned char)); |
2235 | if(!pixels){ | 2236 | if(!pixels){ |
2236 | qWarning("Unable to allocate pixels buffer"); | 2237 | owarn << "Unable to allocate pixels buffer" << oendl; |
2237 | free(pixels); | 2238 | free(pixels); |
2238 | free(x_offset); | 2239 | free(x_offset); |
2239 | free(y_offset); | 2240 | free(y_offset); |
2240 | return(src); | 2241 | return(src); |
2241 | } | 2242 | } |
2242 | // copy colortable | 2243 | // copy colortable |
@@ -3069,13 +3070,13 @@ QImage OImageEffect::wave(QImage &src, double amplitude, double wavelength, | |||
3069 | } | 3070 | } |
3070 | 3071 | ||
3071 | QImage OImageEffect::oilPaint(QImage &src, int radius) | 3072 | QImage OImageEffect::oilPaint(QImage &src, int radius) |
3072 | { | 3073 | { |
3073 | // TODO 8bpp src! | 3074 | // TODO 8bpp src! |
3074 | if(src.depth() < 32){ | 3075 | if(src.depth() < 32){ |
3075 | qWarning("Oil Paint source image < 32bpp. Convert before using!"); | 3076 | owarn << "Oil Paint source image < 32bpp. Convert before using!" << oendl; |
3076 | return(src); | 3077 | return(src); |
3077 | } | 3078 | } |
3078 | int j, k, i, x, y; | 3079 | int j, k, i, x, y; |
3079 | unsigned int *histogram; | 3080 | unsigned int *histogram; |
3080 | unsigned int *s; | 3081 | unsigned int *s; |
3081 | unsigned int count; | 3082 | unsigned int count; |
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp index ec503dd..38f3fe2 100644 --- a/libopie2/opieui/olistview.cpp +++ b/libopie2/opieui/olistview.cpp | |||
@@ -1,10 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> | |
4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | .=l. | 4 | .=l. |
6 | .>+-= | 5 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 6 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
@@ -34,12 +33,13 @@ | |||
34 | #include <qheader.h> | 33 | #include <qheader.h> |
35 | #include <qpainter.h> | 34 | #include <qpainter.h> |
36 | #include <qpixmap.h> | 35 | #include <qpixmap.h> |
37 | 36 | ||
38 | /* OPIE */ | 37 | /* OPIE */ |
39 | 38 | ||
39 | #include <opie2/odebug.h> | ||
40 | #include <opie2/olistview.h> | 40 | #include <opie2/olistview.h> |
41 | 41 | ||
42 | /*====================================================================================== | 42 | /*====================================================================================== |
43 | * OListView | 43 | * OListView |
44 | *======================================================================================*/ | 44 | *======================================================================================*/ |
45 | 45 | ||
@@ -139,13 +139,13 @@ OListViewItem* OListView::childFactory() | |||
139 | } | 139 | } |
140 | 140 | ||
141 | #ifndef QT_NO_DATASTREAM | 141 | #ifndef QT_NO_DATASTREAM |
142 | void OListView::serializeTo( QDataStream& s ) const | 142 | void OListView::serializeTo( QDataStream& s ) const |
143 | { | 143 | { |
144 | #warning Caution... the binary format is still under construction... | 144 | #warning Caution... the binary format is still under construction... |
145 | qDebug( "storing OListView..." ); | 145 | odebug << "storing OListView..." << oendl; |
146 | 146 | ||
147 | // store number of columns and the labels | 147 | // store number of columns and the labels |
148 | s << columns(); | 148 | s << columns(); |
149 | for ( int i = 0; i < columns(); ++i ) | 149 | for ( int i = 0; i < columns(); ++i ) |
150 | s << columnText( i ); | 150 | s << columnText( i ); |
151 | 151 | ||
@@ -164,19 +164,19 @@ void OListView::serializeTo( QDataStream& s ) const | |||
164 | for ( int i = 0; i < items; ++i ) | 164 | for ( int i = 0; i < items; ++i ) |
165 | { | 165 | { |
166 | s << *static_cast<OListViewItem*>( item ); | 166 | s << *static_cast<OListViewItem*>( item ); |
167 | item = item->nextSibling(); | 167 | item = item->nextSibling(); |
168 | } | 168 | } |
169 | 169 | ||
170 | qDebug( "OListview stored." ); | 170 | odebug << "OListview stored." << oendl; |
171 | } | 171 | } |
172 | 172 | ||
173 | void OListView::serializeFrom( QDataStream& s ) | 173 | void OListView::serializeFrom( QDataStream& s ) |
174 | { | 174 | { |
175 | #warning Caution... the binary format is still under construction... | 175 | #warning Caution... the binary format is still under construction... |
176 | qDebug( "loading OListView..." ); | 176 | odebug << "loading OListView..." << oendl; |
177 | 177 | ||
178 | int cols; | 178 | int cols; |
179 | s >> cols; | 179 | s >> cols; |
180 | qDebug( "read number of columns = %d", cols ); | 180 | qDebug( "read number of columns = %d", cols ); |
181 | 181 | ||
182 | while ( columns() < cols ) addColumn( QString::null ); | 182 | while ( columns() < cols ) addColumn( QString::null ); |
@@ -196,13 +196,13 @@ void OListView::serializeFrom( QDataStream& s ) | |||
196 | for ( int i = 0; i < items; ++i ) | 196 | for ( int i = 0; i < items; ++i ) |
197 | { | 197 | { |
198 | OListViewItem* item = childFactory(); | 198 | OListViewItem* item = childFactory(); |
199 | s >> *item; | 199 | s >> *item; |
200 | } | 200 | } |
201 | 201 | ||
202 | qDebug( "OListView loaded." ); | 202 | odebug << "OListView loaded." << oendl; |
203 | 203 | ||
204 | } | 204 | } |
205 | 205 | ||
206 | QDataStream& operator<<( QDataStream& s, const OListView& lv ) | 206 | QDataStream& operator<<( QDataStream& s, const OListView& lv ) |
207 | { | 207 | { |
208 | lv.serializeTo( s ); | 208 | lv.serializeTo( s ); |
@@ -374,13 +374,13 @@ OListViewItem* OListViewItem::childFactory() | |||
374 | 374 | ||
375 | 375 | ||
376 | #ifndef QT_NO_DATASTREAM | 376 | #ifndef QT_NO_DATASTREAM |
377 | void OListViewItem::serializeTo( QDataStream& s ) const | 377 | void OListViewItem::serializeTo( QDataStream& s ) const |
378 | { | 378 | { |
379 | #warning Caution... the binary format is still under construction... | 379 | #warning Caution... the binary format is still under construction... |
380 | qDebug( "storing OListViewItem..." ); | 380 | odebug << "storing OListViewItem..." << oendl; |
381 | 381 | ||
382 | // store item text | 382 | // store item text |
383 | for ( int i = 0; i < listView()->columns(); ++i ) | 383 | for ( int i = 0; i < listView()->columns(); ++i ) |
384 | { | 384 | { |
385 | s << text( i ); | 385 | s << text( i ); |
386 | } | 386 | } |
@@ -400,20 +400,20 @@ void OListViewItem::serializeTo( QDataStream& s ) const | |||
400 | for ( int i = 0; i < items; ++i ) | 400 | for ( int i = 0; i < items; ++i ) |
401 | { | 401 | { |
402 | s << *static_cast<OListViewItem*>( item ); | 402 | s << *static_cast<OListViewItem*>( item ); |
403 | item = item->nextSibling(); | 403 | item = item->nextSibling(); |
404 | } | 404 | } |
405 | 405 | ||
406 | qDebug( "OListviewItem stored." ); | 406 | odebug << "OListviewItem stored." << oendl; |
407 | } | 407 | } |
408 | 408 | ||
409 | 409 | ||
410 | void OListViewItem::serializeFrom( QDataStream& s ) | 410 | void OListViewItem::serializeFrom( QDataStream& s ) |
411 | { | 411 | { |
412 | #warning Caution... the binary format is still under construction... | 412 | #warning Caution... the binary format is still under construction... |
413 | qDebug( "loading OListViewItem..." ); | 413 | odebug << "loading OListViewItem..." << oendl; |
414 | 414 | ||
415 | for ( int i = 0; i < listView()->columns(); ++i ) | 415 | for ( int i = 0; i < listView()->columns(); ++i ) |
416 | { | 416 | { |
417 | QString coltext; | 417 | QString coltext; |
418 | s >> coltext; | 418 | s >> coltext; |
419 | qDebug( "read text '%s' for column %d", (const char*) coltext, i ); | 419 | qDebug( "read text '%s' for column %d", (const char*) coltext, i ); |
@@ -427,13 +427,13 @@ void OListViewItem::serializeFrom( QDataStream& s ) | |||
427 | for ( int i = 0; i < items; ++i ) | 427 | for ( int i = 0; i < items; ++i ) |
428 | { | 428 | { |
429 | OListViewItem* item = childFactory(); | 429 | OListViewItem* item = childFactory(); |
430 | s >> (*item); | 430 | s >> (*item); |
431 | } | 431 | } |
432 | 432 | ||
433 | qDebug( "OListViewItem loaded." ); | 433 | odebug << "OListViewItem loaded." << oendl; |
434 | } | 434 | } |
435 | 435 | ||
436 | 436 | ||
437 | QDataStream& operator<<( QDataStream& s, const OListViewItem& lvi ) | 437 | QDataStream& operator<<( QDataStream& s, const OListViewItem& lvi ) |
438 | { | 438 | { |
439 | lvi.serializeTo( s ); | 439 | lvi.serializeTo( s ); |
diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index b455602..61f9bbb 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro | |||
@@ -9,41 +9,39 @@ HEADERS = olistview.h \ | |||
9 | oselector.h \ | 9 | oselector.h \ |
10 | oversatileview.h \ | 10 | oversatileview.h \ |
11 | oversatileviewitem.h \ | 11 | oversatileviewitem.h \ |
12 | odialog.h \ | 12 | odialog.h \ |
13 | omessagebox.h \ | 13 | omessagebox.h \ |
14 | oresource.h \ | 14 | oresource.h \ |
15 | otaskbarapplet.h \ | ||
15 | oseparator.h | 16 | oseparator.h |
16 | 17 | ||
17 | SOURCES = olistview.cpp \ | 18 | SOURCES = olistview.cpp \ |
18 | oimageeffect.cpp \ | 19 | oimageeffect.cpp \ |
19 | opixmapeffect.cpp \ | 20 | opixmapeffect.cpp \ |
20 | opopupmenu.cpp \ | 21 | opopupmenu.cpp \ |
21 | opixmapprovider.cpp \ | 22 | opixmapprovider.cpp \ |
22 | oselector.cpp \ | 23 | oselector.cpp \ |
23 | oversatileview.cpp \ | 24 | oversatileview.cpp \ |
24 | oversatileviewitem.cpp \ | 25 | oversatileviewitem.cpp \ |
25 | odialog.cpp \ | 26 | odialog.cpp \ |
26 | oresource.cpp \ | 27 | oresource.cpp \ |
28 | otaskbarapplet.cpp \ | ||
27 | oseparator.cpp | 29 | oseparator.cpp |
28 | 30 | ||
29 | INTERFACES = | 31 | INTERFACES = |
30 | TARGET = opieui2 | 32 | TARGET = opieui2 |
31 | VERSION = 1.8.2 | 33 | VERSION = 1.8.2 |
34 | |||
32 | INCLUDEPATH += $(OPIEDIR)/include | 35 | INCLUDEPATH += $(OPIEDIR)/include |
33 | DEPENDPATH += $(OPIEDIR)/include | 36 | DEPENDPATH += $(OPIEDIR)/include |
34 | LIBS += -lopiecore2 | ||
35 | MOC_DIR = moc | ||
36 | OBJECTS_DIR = obj | ||
37 | 37 | ||
38 | LIBS += -lopiecore2 | ||
38 | 39 | ||
39 | !contains( platform, x11 ) { | 40 | !contains( platform, x11 ) { |
40 | include ( $(OPIEDIR)/include.pro ) | 41 | include ( $(OPIEDIR)/include.pro ) |
41 | HEADERS += otaskbarapplet.h | ||
42 | SOURCES += otaskbarapplet.cpp | ||
43 | } | 42 | } |
44 | 43 | ||
45 | contains( platform, x11 ) { | 44 | contains( platform, x11 ) { |
46 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | 45 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib |
47 | message( Warning: NO otaskbarapplet ATM ) | ||
48 | } | 46 | } |
49 | 47 | ||
diff --git a/libopie2/opieui/oseparator.cpp b/libopie2/opieui/oseparator.cpp index 85181dc..98d42c7 100644 --- a/libopie2/opieui/oseparator.cpp +++ b/libopie2/opieui/oseparator.cpp | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | |||
4 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 3 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
5 | Copyright (C) 1997 Michael Roth <mroth@wirlweb.de> | 4 | Copyright (C) 1997 Michael Roth <mroth@wirlweb.de> |
6 | =. | 5 | =. |
7 | .=l. | 6 | .=l. |
8 | .>+-= | 7 | .>+-= |
9 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
@@ -27,20 +26,21 @@ | |||
27 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
28 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
29 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
30 | 29 | ||
31 | */ | 30 | */ |
32 | 31 | ||
33 | /* QT */ | ||
34 | |||
35 | #include <qstyle.h> | ||
36 | |||
37 | /* OPIE */ | 32 | /* OPIE */ |
38 | 33 | ||
34 | #include <opie2/odebug.h> | ||
39 | #include <opie2/oseparator.h> | 35 | #include <opie2/oseparator.h> |
40 | 36 | ||
37 | /* QT */ | ||
38 | |||
39 | #include <qstyle.h> | ||
40 | |||
41 | OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) | 41 | OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) |
42 | : QFrame(parent, name, f) | 42 | : QFrame(parent, name, f) |
43 | { | 43 | { |
44 | setLineWidth(1); | 44 | setLineWidth(1); |
45 | setMidLineWidth(0); | 45 | setMidLineWidth(0); |
46 | setOrientation( HLine ); | 46 | setOrientation( HLine ); |
@@ -66,13 +66,13 @@ void OSeparator::setOrientation(int orientation) | |||
66 | case VLine: | 66 | case VLine: |
67 | setFrameStyle( QFrame::VLine | QFrame::Sunken ); | 67 | setFrameStyle( QFrame::VLine | QFrame::Sunken ); |
68 | setMinimumSize(2, 0); | 68 | setMinimumSize(2, 0); |
69 | break; | 69 | break; |
70 | 70 | ||
71 | default: | 71 | default: |
72 | qWarning( "OSeparator::setOrientation(): invalid orientation, using default orientation HLine" ); | 72 | owarn << "OSeparator::setOrientation(): invalid orientation, using default orientation HLine" << oendl; |
73 | 73 | ||
74 | case Horizontal: | 74 | case Horizontal: |
75 | case HLine: | 75 | case HLine: |
76 | setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 76 | setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
77 | setMinimumSize(0, 2); | 77 | setMinimumSize(0, 2); |
78 | break; | 78 | break; |
diff --git a/libopie2/opieui/oversatileview.cpp b/libopie2/opieui/oversatileview.cpp index 6808539..65fe3d8 100644 --- a/libopie2/opieui/oversatileview.cpp +++ b/libopie2/opieui/oversatileview.cpp | |||
@@ -25,12 +25,19 @@ | |||
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | /* OPIE */ | ||
32 | |||
33 | #include <opie2/odebug.h> | ||
34 | #include <opie2/oversatileview.h> | ||
35 | #include <opie2/oversatileviewitem.h> | ||
36 | #include <opie2/olistview.h> | ||
37 | |||
31 | /* QT */ | 38 | /* QT */ |
32 | 39 | ||
33 | #include <qaction.h> | 40 | #include <qaction.h> |
34 | #include <qbrush.h> | 41 | #include <qbrush.h> |
35 | #include <qfont.h> | 42 | #include <qfont.h> |
36 | #include <qiconset.h> | 43 | #include <qiconset.h> |
@@ -41,18 +48,12 @@ | |||
41 | #include <qpopupmenu.h> | 48 | #include <qpopupmenu.h> |
42 | #include <qrect.h> | 49 | #include <qrect.h> |
43 | #include <qsize.h> | 50 | #include <qsize.h> |
44 | #include <qstring.h> | 51 | #include <qstring.h> |
45 | #include <qwidgetstack.h> | 52 | #include <qwidgetstack.h> |
46 | 53 | ||
47 | /* OPIE */ | ||
48 | |||
49 | #include <opie2/oversatileview.h> | ||
50 | #include <opie2/oversatileviewitem.h> | ||
51 | #include <opie2/olistview.h> | ||
52 | |||
53 | /* XPM */ | 54 | /* XPM */ |
54 | static const char * view_icon_xpm[] = { | 55 | static const char * view_icon_xpm[] = { |
55 | "16 16 16 1", | 56 | "16 16 16 1", |
56 | " c None", | 57 | " c None", |
57 | ".c #87BD88", | 58 | ".c #87BD88", |
58 | "+c #8BBE8B", | 59 | "+c #8BBE8B", |
@@ -286,13 +287,13 @@ void OVersatileView::setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened | |||
286 | _iconleaf = leaf; | 287 | _iconleaf = leaf; |
287 | _iconopened = opened; | 288 | _iconopened = opened; |
288 | _iconclosed = closed; | 289 | _iconclosed = closed; |
289 | } | 290 | } |
290 | else | 291 | else |
291 | { | 292 | { |
292 | qDebug( "OVersatileView::setDefaultPixmaps(): invalid mode" ); | 293 | odebug << "OVersatileView::setDefaultPixmaps(): invalid mode" << oendl; |
293 | } | 294 | } |
294 | } | 295 | } |
295 | 296 | ||
296 | QIconView* OVersatileView::iconView() const | 297 | QIconView* OVersatileView::iconView() const |
297 | { | 298 | { |
298 | return _iconview; | 299 | return _iconview; |
@@ -314,13 +315,13 @@ void OVersatileView::setViewMode( int mode ) | |||
314 | { | 315 | { |
315 | _viewmode = mode; | 316 | _viewmode = mode; |
316 | raiseWidget( _iconview ); | 317 | raiseWidget( _iconview ); |
317 | } | 318 | } |
318 | else | 319 | else |
319 | { | 320 | { |
320 | qDebug( "OVersatileView::setViewMode(): invalid mode" ); | 321 | odebug << "OVersatileView::setViewMode(): invalid mode" << oendl; |
321 | } | 322 | } |
322 | } | 323 | } |
323 | 324 | ||
324 | void OVersatileView::setIconViewMode() | 325 | void OVersatileView::setIconViewMode() |
325 | { | 326 | { |
326 | setViewMode( Icons ); | 327 | setViewMode( Icons ); |
@@ -340,27 +341,27 @@ bool OVersatileView::isValidViewMode( int mode ) const | |||
340 | return true; | 341 | return true; |
341 | } | 342 | } |
342 | case OVersatileView::Warn: | 343 | case OVersatileView::Warn: |
343 | { | 344 | { |
344 | if ( _viewmode != mode ) | 345 | if ( _viewmode != mode ) |
345 | { | 346 | { |
346 | qDebug( "OVersatileView::isValidViewMode(): Requested operation not valid in current mode." ); | 347 | odebug << "OVersatileView::isValidViewMode(): Requested operation not valid in current mode." << oendl; |
347 | return true; | 348 | return true; |
348 | } | 349 | } |
349 | } | 350 | } |
350 | case OVersatileView::WarnReturn: | 351 | case OVersatileView::WarnReturn: |
351 | { | 352 | { |
352 | if ( _viewmode != mode ) | 353 | if ( _viewmode != mode ) |
353 | { | 354 | { |
354 | qDebug( "OVersatileView::isValidViewMode(): Requested operation not valid in current mode." ); | 355 | odebug << "OVersatileView::isValidViewMode(): Requested operation not valid in current mode." << oendl; |
355 | return false; | 356 | return false; |
356 | } | 357 | } |
357 | } | 358 | } |
358 | default: | 359 | default: |
359 | { | 360 | { |
360 | qWarning( "OVersatileView::isValidViewMode(): Inconsistent object state!" ); | 361 | owarn << "OVersatileView::isValidViewMode(): Inconsistent object state!" << oendl; |
361 | return true; | 362 | return true; |
362 | } | 363 | } |
363 | } | 364 | } |
364 | } | 365 | } |
365 | void OVersatileView::setWarningPolicy( int policy ) const | 366 | void OVersatileView::setWarningPolicy( int policy ) const |
366 | { | 367 | { |
@@ -445,13 +446,13 @@ void OVersatileView::onItem( QIconViewItem * item ) | |||
445 | { | 446 | { |
446 | emit( onItem( static_cast<OVersatileViewItem*>( item ) ) ); | 447 | emit( onItem( static_cast<OVersatileViewItem*>( item ) ) ); |
447 | } | 448 | } |
448 | 449 | ||
449 | void OVersatileView::expanded( QListViewItem *item ) // QListView | 450 | void OVersatileView::expanded( QListViewItem *item ) // QListView |
450 | { | 451 | { |
451 | //qDebug( "OVersatileView::expanded(): opening tree..." ); | 452 | //odebug << "OVersatileView::expanded(): opening tree..." << oendl; |
452 | if ( !_treeopened.isNull() ) | 453 | if ( !_treeopened.isNull() ) |
453 | item->setPixmap( 0, _treeopened ); | 454 | item->setPixmap( 0, _treeopened ); |
454 | emit( expanded( static_cast<OVersatileViewItem*>( item ) ) ); | 455 | emit( expanded( static_cast<OVersatileViewItem*>( item ) ) ); |
455 | } | 456 | } |
456 | void OVersatileView::collapsed( QListViewItem *item ) // QListView | 457 | void OVersatileView::collapsed( QListViewItem *item ) // QListView |
457 | { | 458 | { |