summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-11-07 02:23:23 (UTC)
committer ulf69 <ulf69>2004-11-07 02:23:23 (UTC)
commitdcb3a171bca38934185de67e378956e6fd044f17 (patch) (unidiff)
tree6b1d8499823d2ec0db0e932ee9f69d95f9970464
parent31c3fc0e0673b9403fb4ef4a9836305d1d49ff83 (diff)
downloadkdepimpi-dcb3a171bca38934185de67e378956e6fd044f17.zip
kdepimpi-dcb3a171bca38934185de67e378956e6fd044f17.tar.gz
kdepimpi-dcb3a171bca38934185de67e378956e6fd044f17.tar.bz2
view category view for 5500 models on top and not at the left
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.cpp b/pwmanager/pwmanager/pwmviewstyle_1.cpp
index 6b9def3..27ad40e 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_1.cpp
@@ -9,67 +9,77 @@
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#include "pwmviewstyle_1.h" 20#include "pwmviewstyle_1.h"
21#include "pwmview.h" 21#include "pwmview.h"
22#include "listviewpwm.h" 22#include "listviewpwm.h"
23#include "commentbox.h" 23#include "commentbox.h"
24 24
25#include <klocale.h> 25#include <klocale.h>
26#include "pwmprefs.h" 26#include "pwmprefs.h"
27 27
28#ifndef DESKTOP_VERSION 28#ifndef DESKTOP_VERSION
29#include <qpe/qpeapplication.h> 29#include <qpe/qpeapplication.h>
30#else 30#else
31#include <qapplication.h> 31#include <qapplication.h>
32#endif 32#endif
33 #define INITIAL_CATEGORIES_WIDTH100 33 #define INITIAL_CATEGORIES_WIDTH100
34 34
35PwMViewStyle_1::PwMViewStyle_1(PwMView *view) 35PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
36 : QObject() 36 : QObject()
37{ 37{
38#ifndef PWM_EMBEDDED 38#ifndef PWM_EMBEDDED
39 splitter = new QSplitter(view); 39 splitter = new QSplitter(view);
40#else 40#else
41 splitter = new KDGanttMinimizeSplitter( Qt::Horizontal, view); 41 if ( QApplication::desktop()->width() > 240 ) {
42 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left ); 42 splitter = new KDGanttMinimizeSplitter( Qt::Horizontal, view);
43 43 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left );
44 // topLayout = new QHBoxLayout( this );
45 // mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
46 // mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
47 } else {
48 splitter = new KDGanttMinimizeSplitter( Qt::Vertical, view);
49 splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
50 // topLayout = new QHBoxLayout( this );
51 // mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
52 // mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
53 }
44 //US topLayout->addWidget(mMiniSplitter ); 54 //US topLayout->addWidget(mMiniSplitter );
45#endif 55#endif
46 56
47 vbox1 = new QVBox(splitter); 57 vbox1 = new QVBox(splitter);
48 categoriesTitle = new QLabel(vbox1); 58 categoriesTitle = new QLabel(vbox1);
49 categoriesList = new QListBox(vbox1); 59 categoriesList = new QListBox(vbox1);
50#ifndef PWM_EMBEDDED 60#ifndef PWM_EMBEDDED
51 splitter2 = new QSplitter(splitter); 61 splitter2 = new QSplitter(splitter);
52 splitter2->setOrientation(Qt::Vertical); 62 splitter2->setOrientation(Qt::Vertical);
53#else 63#else
54 splitter2 = new KDGanttMinimizeSplitter( Qt::Vertical, splitter); 64 splitter2 = new KDGanttMinimizeSplitter( Qt::Vertical, splitter);
55 splitter2->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 65 splitter2->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
56 66
57 //US topLayout->addWidget(mMiniSplitter ); 67 //US topLayout->addWidget(mMiniSplitter );
58#endif 68#endif
59 lv = new ListViewPwM(splitter2); 69 lv = new ListViewPwM(splitter2);
60 commentBox = new CommentBox(splitter2); 70 commentBox = new CommentBox(splitter2);
61 // set sizes and styles 71 // set sizes and styles
62 //UScommentBox->resize(commentBox->size().width(), 60); 72 //UScommentBox->resize(commentBox->size().width(), 60);
63 QValueList<int> sizes; 73 QValueList<int> sizes;
64#ifndef PWM_EMBEDDED 74#ifndef PWM_EMBEDDED
65 sizes.push_back(INITIAL_CATEGORIES_WIDTH); 75 sizes.push_back(INITIAL_CATEGORIES_WIDTH);
66 sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH); 76 sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH);
67#else 77#else
68 sizes.append(INITIAL_CATEGORIES_WIDTH); 78 sizes.append(INITIAL_CATEGORIES_WIDTH);
69 sizes.append(view->height() - INITIAL_CATEGORIES_WIDTH); 79 sizes.append(view->height() - INITIAL_CATEGORIES_WIDTH);
70#endif 80#endif
71 //USsplitter->setSizes(sizes); 81 //USsplitter->setSizes(sizes);
72 categoriesTitle->setAlignment(Qt::AlignHCenter); 82 categoriesTitle->setAlignment(Qt::AlignHCenter);
73#ifndef PWM_EMBEDDED 83#ifndef PWM_EMBEDDED
74 categoriesTitle->setFrameShape(QFrame::MenuBarPanel); 84 categoriesTitle->setFrameShape(QFrame::MenuBarPanel);
75#else 85#else