summaryrefslogtreecommitdiff
path: root/libopie2
Unidiff
Diffstat (limited to 'libopie2') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/oseparator.cpp2
-rw-r--r--libopie2/qt3/opieui/oeditlistbox.h2
-rw-r--r--libopie2/qt3/opieui/ojanuswidget.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opieui/oseparator.cpp b/libopie2/opieui/oseparator.cpp
index bbc4381..177368b 100644
--- a/libopie2/opieui/oseparator.cpp
+++ b/libopie2/opieui/oseparator.cpp
@@ -87,43 +87,43 @@ int OSeparator::orientation() const
87 if ( frameStyle() & VLine ) 87 if ( frameStyle() & VLine )
88 return VLine; 88 return VLine;
89 89
90 if ( frameStyle() & HLine ) 90 if ( frameStyle() & HLine )
91 return HLine; 91 return HLine;
92 92
93 return 0; 93 return 0;
94} 94}
95 95
96void OSeparator::drawFrame(QPainter *p) 96void OSeparator::drawFrame(QPainter *p)
97{ 97{
98 QPointp1, p2; 98 QPointp1, p2;
99 QRectr = frameRect(); 99 QRectr = frameRect();
100 const QColorGroup & g = colorGroup(); 100 const QColorGroup & g = colorGroup();
101 101
102 if ( frameStyle() & HLine ) { 102 if ( frameStyle() & HLine ) {
103 p1 = QPoint( r.x(), r.height()/2 ); 103 p1 = QPoint( r.x(), r.height()/2 );
104 p2 = QPoint( r.x()+r.width(), p1.y() ); 104 p2 = QPoint( r.x()+r.width(), p1.y() );
105 } 105 }
106 else { 106 else {
107 p1 = QPoint( r.x()+r.width()/2, 0 ); 107 p1 = QPoint( r.x()+r.width()/2, 0 );
108 p2 = QPoint( p1.x(), r.height() ); 108 p2 = QPoint( p1.x(), r.height() );
109 } 109 }
110 110
111#if QT_VERSION < 300 111#if QT_VERSION < 0x030000
112 style().drawSeparator( p, p1.x(), p1.y(), p2.x(), p2.y(), g, true, 1, midLineWidth() ); 112 style().drawSeparator( p, p1.x(), p1.y(), p2.x(), p2.y(), g, true, 1, midLineWidth() );
113#else 113#else
114 QStyleOption opt( lineWidth(), midLineWidth() ); 114 QStyleOption opt( lineWidth(), midLineWidth() );
115 style().drawPrimitive( QStyle::PE_Separator, p, QRect( p1, p2 ), g, QStyle::Style_Sunken, opt ); 115 style().drawPrimitive( QStyle::PE_Separator, p, QRect( p1, p2 ), g, QStyle::Style_Sunken, opt );
116#endif 116#endif
117} 117}
118 118
119 119
120QSize OSeparator::sizeHint() const 120QSize OSeparator::sizeHint() const
121{ 121{
122 if ( frameStyle() & VLine ) 122 if ( frameStyle() & VLine )
123 return QSize(2, 0); 123 return QSize(2, 0);
124 124
125 if ( frameStyle() & HLine ) 125 if ( frameStyle() & HLine )
126 return QSize(0, 2); 126 return QSize(0, 2);
127 127
128 return QSize(-1, -1); 128 return QSize(-1, -1);
129} 129}
diff --git a/libopie2/qt3/opieui/oeditlistbox.h b/libopie2/qt3/opieui/oeditlistbox.h
index 63fab11..c9c207d 100644
--- a/libopie2/qt3/opieui/oeditlistbox.h
+++ b/libopie2/qt3/opieui/oeditlistbox.h
@@ -6,49 +6,49 @@
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef OEDITLISTBOX_H 20#ifndef OEDITLISTBOX_H
21#define OEDITLISTBOX_H 21#define OEDITLISTBOX_H
22 22
23#include <qgroupbox.h> 23#include <qgroupbox.h>
24#include <qlistbox.h> 24#include <qlistbox.h>
25 25
26class OLineEdit; 26class OLineEdit;
27class OComboBox; 27class OComboBox;
28class QPushButton; 28class QPushButton;
29 29
30#if QT_VERSION < 300 30#if QT_VERSION < 0x030000
31 enum StringComparisonMode { 31 enum StringComparisonMode {
32 CaseSensitive = 0x00001, // 0 0001 32 CaseSensitive = 0x00001, // 0 0001
33 BeginsWith = 0x00002, // 0 0010 33 BeginsWith = 0x00002, // 0 0010
34 EndsWith = 0x00004, // 0 0100 34 EndsWith = 0x00004, // 0 0100
35 Contains = 0x00008, // 0 1000 35 Contains = 0x00008, // 0 1000
36 ExactMatch = 0x00010 // 1 0000 36 ExactMatch = 0x00010 // 1 0000
37 }; 37 };
38#endif 38#endif
39 39
40class OEditListBoxPrivate; 40class OEditListBoxPrivate;
41/** 41/**
42 * An editable listbox 42 * An editable listbox
43 * 43 *
44 * This class provides a editable listbox ;-), this means 44 * This class provides a editable listbox ;-), this means
45 * a listbox which is accompanied by a line edit to enter new 45 * a listbox which is accompanied by a line edit to enter new
46 * items into the listbox and pushbuttons to add and remove 46 * items into the listbox and pushbuttons to add and remove
47 * items from the listbox and two buttons to move items up and down. 47 * items from the listbox and two buttons to move items up and down.
48 */ 48 */
49class OEditListBox : public QGroupBox 49class OEditListBox : public QGroupBox
50{ 50{
51 Q_OBJECT 51 Q_OBJECT
52 52
53public: 53public:
54 /// @since 3.1 54 /// @since 3.1
diff --git a/libopie2/qt3/opieui/ojanuswidget.cpp b/libopie2/qt3/opieui/ojanuswidget.cpp
index 063e393..8bdbc03 100644
--- a/libopie2/qt3/opieui/ojanuswidget.cpp
+++ b/libopie2/qt3/opieui/ojanuswidget.cpp
@@ -751,49 +751,49 @@ void OJanusWidget::setFocus()
751 mTabControl->setFocus(); 751 mTabControl->setFocus();
752 } 752 }
753 else if( mFace == Swallow ) 753 else if( mFace == Swallow )
754 { 754 {
755 mSwallowPage->setFocus(); 755 mSwallowPage->setFocus();
756 } 756 }
757 else if( mFace == Plain ) 757 else if( mFace == Plain )
758 { 758 {
759 mPlainPage->setFocus(); 759 mPlainPage->setFocus();
760 } 760 }
761} 761}
762 762
763 763
764QSize OJanusWidget::minimumSizeHint() const 764QSize OJanusWidget::minimumSizeHint() const
765{ 765{
766 if( mFace == TreeList || mFace == IconList ) 766 if( mFace == TreeList || mFace == IconList )
767 { 767 {
768 QSize s1( ODialog::spacingHint(), ODialog::spacingHint()*2 ); 768 QSize s1( ODialog::spacingHint(), ODialog::spacingHint()*2 );
769 QSize s2(0,0); 769 QSize s2(0,0);
770 QSize s3(0,0); 770 QSize s3(0,0);
771 QSize s4( mPageStack->sizeHint() ); 771 QSize s4( mPageStack->sizeHint() );
772 772
773 if( mFace == TreeList ) 773 if( mFace == TreeList )
774 { 774 {
775#if QT_VERSION < 300 775#if QT_VERSION < 0x030000
776 s1.rwidth() += style().splitterWidth(); 776 s1.rwidth() += style().splitterWidth();
777#else 777#else
778 s1.rwidth() += style().pixelMetric( QStyle::PM_SplitterWidth ); 778 s1.rwidth() += style().pixelMetric( QStyle::PM_SplitterWidth );
779#endif 779#endif
780 s2 = mTreeList->minimumSize(); 780 s2 = mTreeList->minimumSize();
781 } 781 }
782 else 782 else
783 { 783 {
784 mIconList->updateMinimumHeight(); 784 mIconList->updateMinimumHeight();
785 mIconList->updateWidth(); 785 mIconList->updateWidth();
786 s2 = mIconList->minimumSize(); 786 s2 = mIconList->minimumSize();
787 } 787 }
788 788
789 if( mTitleLabel->isVisible() == true ) 789 if( mTitleLabel->isVisible() == true )
790 { 790 {
791 s3 += mTitleLabel->sizeHint(); 791 s3 += mTitleLabel->sizeHint();
792 s3.rheight() += mTitleSep->minimumSize().height(); 792 s3.rheight() += mTitleSep->minimumSize().height();
793 } 793 }
794 794
795 // 795 //
796 // Select the tallest item. It has only effect in IconList mode 796 // Select the tallest item. It has only effect in IconList mode
797 // 797 //
798 int h1 = s1.rheight() + s3.rheight() + s4.height(); 798 int h1 = s1.rheight() + s3.rheight() + s4.height();
799 int h2 = QMAX( h1, s2.rheight() ); 799 int h2 = QMAX( h1, s2.rheight() );