author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kdeui/kseparator.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kdeui/kseparator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kseparator.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/microkde/kdeui/kseparator.cpp b/microkde/kdeui/kseparator.cpp index d028420..66000f0 100644 --- a/microkde/kdeui/kseparator.cpp +++ b/microkde/kdeui/kseparator.cpp | |||
@@ -5,76 +5,78 @@ | |||
5 | * it under the terms of the GNU Library General Public License as published by | 5 | * it under the terms of the GNU Library General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program 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 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU Library General Public License for more details. | 12 | * GNU 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 program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qstyle.h> | 20 | #include <qstyle.h> |
21 | //Added by qt3to4: | ||
22 | #include <Q3Frame> | ||
21 | 23 | ||
22 | #include <kdebug.h> | 24 | #include <kdebug.h> |
23 | //US #include <kapplication.h> | 25 | //US #include <kapplication.h> |
24 | 26 | ||
25 | //US #include "kseparator.moc" | 27 | //US #include "kseparator.moc" |
26 | 28 | ||
27 | #include "kseparator.h" | 29 | #include "kseparator.h" |
28 | 30 | ||
29 | KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f) | 31 | KSeparator::KSeparator(QWidget* parent, const char* name, Qt::WFlags f) |
30 | : QFrame(parent, name, f) | 32 | : Q3Frame(parent, name, f) |
31 | { | 33 | { |
32 | setLineWidth(1); | 34 | setLineWidth(1); |
33 | setMidLineWidth(0); | 35 | setMidLineWidth(0); |
34 | setOrientation( HLine ); | 36 | setOrientation( HLine ); |
35 | } | 37 | } |
36 | 38 | ||
37 | 39 | ||
38 | 40 | ||
39 | KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f) | 41 | KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, Qt::WFlags f) |
40 | : QFrame(parent, name, f) | 42 | : Q3Frame(parent, name, f) |
41 | { | 43 | { |
42 | setLineWidth(1); | 44 | setLineWidth(1); |
43 | setMidLineWidth(0); | 45 | setMidLineWidth(0); |
44 | setOrientation( orientation ); | 46 | setOrientation( orientation ); |
45 | } | 47 | } |
46 | 48 | ||
47 | 49 | ||
48 | 50 | ||
49 | void KSeparator::setOrientation(int orientation) | 51 | void KSeparator::setOrientation(int orientation) |
50 | { | 52 | { |
51 | switch(orientation) | 53 | switch(orientation) |
52 | { | 54 | { |
53 | case Vertical: | 55 | case Qt::Vertical: |
54 | case VLine: | 56 | case VLine: |
55 | setFrameStyle( QFrame::VLine | QFrame::Sunken ); | 57 | setFrameStyle( Q3Frame::VLine | Q3Frame::Sunken ); |
56 | setMinimumSize(2, 0); | 58 | setMinimumSize(2, 0); |
57 | break; | 59 | break; |
58 | 60 | ||
59 | default: | 61 | default: |
60 | kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl; | 62 | kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl; |
61 | 63 | ||
62 | case Horizontal: | 64 | case Qt::Horizontal: |
63 | case HLine: | 65 | case HLine: |
64 | setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 66 | setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken ); |
65 | setMinimumSize(0, 2); | 67 | setMinimumSize(0, 2); |
66 | break; | 68 | break; |
67 | } | 69 | } |
68 | } | 70 | } |
69 | 71 | ||
70 | 72 | ||
71 | 73 | ||
72 | int KSeparator::orientation() const | 74 | int KSeparator::orientation() const |
73 | { | 75 | { |
74 | if ( frameStyle() & VLine ) | 76 | if ( frameStyle() & VLine ) |
75 | return VLine; | 77 | return VLine; |
76 | 78 | ||
77 | if ( frameStyle() & HLine ) | 79 | if ( frameStyle() & HLine ) |
78 | return HLine; | 80 | return HLine; |
79 | 81 | ||
80 | return 0; | 82 | return 0; |