summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt2
-rw-r--r--bin/kdepim/pwmanager/icons16/decrypted.pngbin1009 -> 855 bytes
-rw-r--r--bin/kdepim/pwmanager/icons22/decrypted.pngbin939 -> 1117 bytes
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.cpp1
-rw-r--r--pwmanager/pwmanager/pwm.cpp9
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.cpp22
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.cpp4
8 files changed, 28 insertions, 14 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 11c50f8..657d1de 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,54 +1,56 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.0.14 ************
Made Passwordmanager PwM/Pi more userfriendly:
-Rearranged some toolbar icons and optimized setting of focus.
+Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
+Fixed bug in KO/Pi todo printing.
+Made Qtopia calendar import possible on desktop .
********** VERSION 2.0.13 ************
Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter.
In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down".
OM/Pi:
Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails.
Added missing German translation.
Added warning if path is specified in local folder settings of account config.
********** VERSION 2.0.12 ************
KO/Pi:
Fixed a bug in todo start/due date handling for non recurring todos with a start and due date.
Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes.
Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer.
Fixed problem in pi-sync mode when wrong password was sent.
OM/Pi:
Fixed a crash when displaying mails with "Show mail as html" was checked in the config.
Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled.
********** VERSION 2.0.11 ************
Fixed some problems in pi-sync mode
(e.g. details of events were not synced properly)
********** VERSION 2.0.10 ************
KO/Pi:
In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
This is fixed.
Changed the search dialog a bit to make it more user friendly.
(E.g.: Removed message box about "no items found" and set key focus to search line edit after search).
Added config option to hide the week number in KO/Pi toolbar.
********** VERSION 2.0.9 ************
Made month view icons for multiday events a bit nicer.
Some minor fixes in KO/Pi
(e.g. go to today did not work for new week view properly).
********** VERSION 2.0.8 ************
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index a63be31..ccc9d83 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -304,53 +304,53 @@
{ "Text2 (Username):","Text2 (Benutzername):" },
{ "Text3 (Password):","Text3 (Passwort):" },
{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
{ "Description:","Beschreibung:" },
{ "Username:","Benutzername:" },
{ "Password:","Passwort:" },
{ "&Reveal","&Offen zeigen" },
{ "&Generate","&Generiere" },
{ "&Password","&Passwort" },
{ "&Comments","Kommentar" },
{ "Launcher:","Launcher:" },
{ "$d = Description","$d = Beschreibung" },
{ "$n = Username","$n = Benutzername" },
{ "$c = Comment","$c = Kommentar" },
{ "$u = URL","$u = URL" },
{ "$p = Password","$p = Passwort" },
{ "&Launcher","&Launcher" },
{ "Password generator","Passwort Generator" },
{ "Character set:","Buchstaben Set:" },
{ "Lowercase (abc)","Klein (abc)" },
{ "Uppercase (ABC)","Groß (ABC)" },
{ "Numbers (123)","Nummmern (123)" },
{ "Special characters:","Spezielle Buchstaben:" },
{ "Spaces (blank characters)","Leerzeichen" },
{ "User defined:","Benutzer definiert:" },
{ "Password Length:","Passwort Länge:" },
{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" },
{ "no password","Kein Passwort" },
{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." },
{ "not saved, yet","not saved, yet" },
{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." },
{ "Find","Finde" },
{ "&Exact match","Genaue Übereinstimmung" },
{ "&Case sensitive","Großschrift abhängig" },
{ "Search in Column","Suche in Spalten" },
{ "&Description","Beschreibung" },
{ "C&omment","Kommentar" },
{ "&Username","Benutzername" },
{ "U&RL","URL" },
{ "delete?","Löschen?" },
{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" },
{ "Save?","Speichern?" },
{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" },
{ "The list\n "","Die Liste\n "" },
{ "nothing to do","Nichts zu tun" },
{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." },
{ "Add new password","Passwort hinzufügen" },
{ "Successfully saved data.","Datei gespeichert." },
-{ "","" },
+{ "Category:","Kategorie:" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/bin/kdepim/pwmanager/icons16/decrypted.png b/bin/kdepim/pwmanager/icons16/decrypted.png
index a52d790..3777a12 100644
--- a/bin/kdepim/pwmanager/icons16/decrypted.png
+++ b/bin/kdepim/pwmanager/icons16/decrypted.png
Binary files differ
diff --git a/bin/kdepim/pwmanager/icons22/decrypted.png b/bin/kdepim/pwmanager/icons22/decrypted.png
index 2228639..ea770ea 100644
--- a/bin/kdepim/pwmanager/icons22/decrypted.png
+++ b/bin/kdepim/pwmanager/icons22/decrypted.png
Binary files differ
diff --git a/pwmanager/pwmanager/addentrywndimpl.cpp b/pwmanager/pwmanager/addentrywndimpl.cpp
index fa6b6c0..09efd1c 100644
--- a/pwmanager/pwmanager/addentrywndimpl.cpp
+++ b/pwmanager/pwmanager/addentrywndimpl.cpp
@@ -1,94 +1,95 @@
/***************************************************************************
* *
* copyright (C) 2003, 2004 by Michael Buesch *
* email: mbuesch@freenet.de *
* *
* Many very good improvements and the original implementations of *
* them came from Matt Scifo <mscifo@o1.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 *
* as published by the Free Software Foundation. *
* *
***************************************************************************/
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#include "addentrywndimpl.h"
#include "pwmexception.h"
#include "pwgenwndimpl.h"
#ifndef PWM_EMBEDDED
#include "advcommeditimpl.h"
#endif
#include "htmlgen.h"
#include <kmessagebox.h>
#include <klocale.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlayout.h>
#ifndef PWM_EMBEDDED
AddEntryWndImpl::AddEntryWndImpl()
: addEntryWnd( 0, "AddEntryWndImpl", TRUE)
#else
AddEntryWndImpl::AddEntryWndImpl( PwMDoc* doc, QWidget* parent, const char* name)
: addEntryWnd( doc, parent, name)
#endif
{
+ categoryComboBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred ));
#ifndef PWM_EMBEDDED
editAdvCommentButton = 0;
commentTextEdit = 0;
#endif
switchComment(false);
pwGen = new PwGenWndImpl(this);
}
AddEntryWndImpl::~AddEntryWndImpl()
{
#ifndef PWM_EMBEDDED
delete_ifnot_null(editAdvCommentButton);
delete_ifnot_null(commentTextEdit);
#endif
delete pwGen;
}
#ifdef PWM_EMBEDDED
void AddEntryWndImpl::slotOk()
{
slotApply();
if (pwLineEdit->text().isEmpty()) {
KMessageBox::error(this,
i18n("Sorry, you haven't set a password."),
i18n("no password"));
return;
}
if (descLineEdit->text().isEmpty()) {
KMessageBox::error(this,
i18n("You haven't set a \"Description\"."),
i18n("Description not set"));
return;
}
KDialogBase::slotOk();
}
#else
void AddEntryWndImpl::okButton_slot()
{
if (pwLineEdit->text().isEmpty()) {
KMessageBox::error(this,
i18n("Sorry, you haven't set a password."),
i18n("no password"));
return;
}
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 9187380..a751fce 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -204,101 +204,96 @@ PwM::~PwM()
//LR closing of windows changed
//needed for fastload option on PDA
//emit closed(this);
//qDebug("PwM::~PwM() emited closed(this)");
delete view;
delete syncManager;
}
void PwM::initMenubar()
{
KIconLoader* picons;
#ifndef PWM_EMBEDDED
KIconLoader icons;
picons = &icons;
#else
picons = KGlobal::iconLoader();
syncPopup = new KPopupMenu(this);
syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup);
syncManager->setBlockSave(false);
connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
syncManager->fillSyncMenu();
#endif
filePopup = new KPopupMenu(this);
importPopup = new KPopupMenu(filePopup);
exportPopup = new KPopupMenu(filePopup);
managePopup = new KPopupMenu(this);
#ifdef CONFIG_KEYCARD
chipcardPopup = new KPopupMenu(this);
#endif // CONFIG_KEYCARD
viewPopup = new KPopupMenu(this);
optionsPopup = new KPopupMenu(this);
// "file" popup menu
filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
i18n("&New"), this,
SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)),
i18n("&Open"), this,
SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)),
i18n("&Close"), this,
SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
filePopup->insertSeparator();
- filePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)),
- i18n("&Add password"), this,
- SLOT(addPwd_slot()), 0,
- BUTTON_POPUP_MANAGE_ADD);
- filePopup->insertSeparator();
filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)),
i18n("&Save"), this,
SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE);
filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)),
i18n("Save &as..."),
this, SLOT(saveAs_slot()), 0,
BUTTON_POPUP_FILE_SAVEAS);
filePopup->insertSeparator();
// "file/export" popup menu
exportPopup->insertItem(i18n("&Text-file..."), this,
SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT);
exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this,
SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN);
exportPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV);
#ifdef CONFIG_KWALLETIF
exportPopup->insertItem(i18n("&KWallet..."), this,
SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET);
#endif
filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)),
i18n("E&xport"), exportPopup,
BUTTON_POPUP_FILE_EXPORT);
// "file/import" popup menu
importPopup->insertItem(i18n("&Text-file..."), this,
SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT);
importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this,
SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN);
importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV);
#ifdef CONFIG_KWALLETIF
importPopup->insertItem(i18n("&KWallet..."), this,
SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET);
#endif
filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)),
i18n("I&mport"), importPopup,
BUTTON_POPUP_FILE_IMPORT);
filePopup->insertSeparator();
#if 0
filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)),
i18n("&Print..."), this,
SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT);
filePopup->insertSeparator();
#endif
filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)),
i18n("&Quit"), this,
SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT);
menuBar()->insertItem(i18n("&File"), filePopup);
// "manage" popup menu
@@ -322,96 +317,100 @@ void PwM::initMenubar()
// "chipcard" popup menu
#ifdef CONFIG_KEYCARD
chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
i18n("&Generate new key-card"), this,
SLOT(genNewCard_slot()), 0,
BUTTON_POPUP_CHIPCARD_GENNEW);
chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
i18n("&Erase key-card"), this,
SLOT(eraseCard_slot()), 0,
BUTTON_POPUP_CHIPCARD_DEL);
chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)),
i18n("Read card-&ID"), this,
SLOT(readCardId_slot()), 0,
BUTTON_POPUP_CHIPCARD_READID);
chipcardPopup->insertSeparator();
chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)),
i18n("&Make card backup-image"), this,
SLOT(makeCardBackup_slot()), 0,
BUTTON_POPUP_CHIPCARD_SAVEBACKUP);
chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)),
i18n("&Replay card backup-image"), this,
SLOT(replayCardBackup_slot()), 0,
BUTTON_POPUP_CHIPCARD_REPLAYBACKUP);
menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup);
#endif // CONFIG_KEYCARD
// "view" popup menu
viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)),
i18n("&Find"), this,
SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND);
viewPopup->insertSeparator();
viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)),
i18n("&Lock all entries"), this,
SLOT(lockWnd_slot()), 0,
BUTTON_POPUP_VIEW_LOCK);
viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)),
i18n("&Deep-lock all entries"), this,
SLOT(deepLockWnd_slot()), 0,
BUTTON_POPUP_VIEW_DEEPLOCK);
viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)),
i18n("&Unlock all entries"), this,
SLOT(unlockWnd_slot()), 0,
BUTTON_POPUP_VIEW_UNLOCK);
menuBar()->insertItem(i18n("&View"), viewPopup);
// "options" popup menu
optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
i18n("&Configure..."), this,
SLOT(config_slot()),0,
BUTTON_POPUP_OPTIONS_CONFIG);
+ if ( QApplication::desktop()->width() <= 240 ) {
+ managePopup->insertSeparator();
+ managePopup->insertItem(i18n("&Options"), optionsPopup);
+ } else
menuBar()->insertItem(i18n("&Options"), optionsPopup);
// "help" popup menu
#ifndef PWM_EMBEDDED
helpPopup = helpMenu(QString::null, false);
#else
optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
i18n("C&ategories..."), this,
SLOT(category_slot()),0,
BUTTON_POPUP_OPTIONS_CATEGORY);
menuBar()->insertItem(i18n("&Sync"), syncPopup);
helpPopup = new KPopupMenu(this);
helpPopup->insertItem(i18n("&License"), this,
SLOT(showLicense_slot()), 0,
BUTTON_POPUP_HELP_LICENSE);
helpPopup->insertItem(i18n("&Faq"), this,
SLOT(faq_slot()), 0,
BUTTON_POPUP_HELP_FAQ);
helpPopup->insertItem(i18n("&About PwManager"), this,
SLOT(createAboutData_slot()), 0,
BUTTON_POPUP_HELP_ABOUT);
helpPopup->insertItem(i18n("&Sync HowTo"), this,
SLOT(syncHowTo_slot()), 0,
BUTTON_POPUP_HELP_SYNC);
helpPopup->insertItem(i18n("&What's New"), this,
SLOT(whatsnew_slot()), 0,
BUTTON_POPUP_HELP_WHATSNEW);
#endif
menuBar()->insertItem(i18n("&Help"), helpPopup);
}
void PwM::initToolbar()
{
KIconLoader* picons;
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.cpp b/pwmanager/pwmanager/pwmviewstyle_0.cpp
index d82eb15..1d88a34 100644
--- a/pwmanager/pwmanager/pwmviewstyle_0.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_0.cpp
@@ -1,87 +1,99 @@
/***************************************************************************
* *
* copyright (C) 2004 by Michael Buesch *
* email: mbuesch@freenet.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 *
* as published by the Free Software Foundation. *
* *
***************************************************************************/
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#include "pwmviewstyle_0.h"
#include "pwmview.h"
#include "listviewpwm.h"
#include "commentbox.h"
#include <klocale.h>
+#include <kglobal.h>
+#include <kiconloader.h>
#include "pwmprefs.h"
PwMViewStyle_0::PwMViewStyle_0(PwMView *view)
: QObject()
{
vbox1 = new QVBox(view);
- vbox1->setSpacing(3);
+ vbox1->setSpacing(0);
hbox1 = new QHBox(vbox1);
- hbox1->setSpacing(3);
+ hbox1->setSpacing(0);
categoriesTitle = new QLabel(hbox1);
- categoriesTitle->setText(i18n("Categories:"));
+ categoriesTitle->setText(i18n("Category:"));
categoriesCombo = new QComboBox(hbox1);
- renCatButton = new QPushButton(i18n("&Rename"), hbox1);
- delCatButton = new QPushButton(i18n("&Delete"), hbox1);
+ categoriesCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred ));
+ renCatButton = new QPushButton( hbox1);
+ renCatButton->setPixmap (KGlobal::iconLoader()->loadIcon("edit", KIcon::Small) );
+ int maxsi = renCatButton->sizeHint().height()+4;
+ renCatButton->setMinimumSize( maxsi, maxsi );
+ delCatButton = new QPushButton( hbox1);
+ delCatButton->setPixmap (KGlobal::iconLoader()->loadIcon("editdelete", KIcon::Small) );
+ maxsi = delCatButton->sizeHint().height()+4;
+ delCatButton->setMinimumSize( maxsi, maxsi );
+ delCatButton->setFocusPolicy( QWidget::NoFocus );
+ renCatButton->setFocusPolicy( QWidget::NoFocus );
+
#ifndef PWM_EMBEDDED
splitter1 = new QSplitter(vbox1);
splitter1->setOrientation(Qt::Vertical);
#else
splitter1 = new KDGanttMinimizeSplitter( Qt::Vertical, vbox1);
splitter1->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
//US topLayout->addWidget(mMiniSplitter );
#endif
lv = new ListViewPwM(splitter1);
commentBox = new CommentBox(splitter1);
// set sizes and styles
commentBox->resize(commentBox->size().width(), 60);
categoriesTitle->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
// connections
connect(categoriesCombo, SIGNAL(activated(int)),
view, SLOT(shiftToView()));
connect(renCatButton, SIGNAL(clicked()),
view, SLOT(renCatButton_slot()));
connect(delCatButton, SIGNAL(clicked()),
view, SLOT(delCatButton_slot()));
connect(lv, SIGNAL(toggleOverview()),
this, SLOT(toggleSplitter()));
}
PwMViewStyle_0::~PwMViewStyle_0()
{
delete vbox1;
}
void PwMViewStyle_0::toggleSplitter()
{
QValueList<int> si = splitter1->sizes();
splitter1->toggle();
QValueList<int> si2 = splitter1->sizes();
//qDebug("PwMViewStyle_0::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] );
if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) {
int diff = si[0]/2;
if ( diff > 200 )
diff = 200;
si[0] -= diff;
si[1] += diff;
splitter1->toggle();
splitter1->setSizes( si );
}
}
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.cpp b/pwmanager/pwmanager/pwmviewstyle_1.cpp
index 7294f34..e335a3f 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_1.cpp
@@ -38,99 +38,99 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
#ifndef PWM_EMBEDDED
splitter = new QSplitter(view);
#else
if ( QApplication::desktop()->width() > 240 ) {
splitter = new KDGanttMinimizeSplitter( Qt::Horizontal, view);
splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left );
// topLayout = new QHBoxLayout( this );
// mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
// mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
} else {
splitter = new KDGanttMinimizeSplitter( Qt::Vertical, view);
splitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
// topLayout = new QHBoxLayout( this );
// mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
// mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
}
//US topLayout->addWidget(mMiniSplitter );
#endif
vbox1 = new QVBox(splitter);
categoriesTitle = new QLabel(vbox1);
categoriesList = new QListBox(vbox1);
#ifndef PWM_EMBEDDED
splitter2 = new QSplitter(splitter);
splitter2->setOrientation(Qt::Vertical);
#else
splitter2 = new KDGanttMinimizeSplitter( Qt::Vertical, splitter);
splitter2->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
//US topLayout->addWidget(mMiniSplitter );
#endif
lv = new ListViewPwM(splitter2);
commentBox = new CommentBox(splitter2);
// set sizes and styles
//US commentBox->resize(commentBox->size().width(), 60);
QValueList<int> sizes;
#ifndef PWM_EMBEDDED
sizes.push_back(INITIAL_CATEGORIES_WIDTH);
sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH);
#else
sizes.append(INITIAL_CATEGORIES_WIDTH);
sizes.append(view->height() - INITIAL_CATEGORIES_WIDTH);
#endif
//US splitter->setSizes(sizes);
categoriesTitle->setAlignment(Qt::AlignHCenter);
#ifndef PWM_EMBEDDED
categoriesTitle->setFrameShape(QFrame::MenuBarPanel);
#else
- categoriesTitle->setFrameShape(QFrame::StyledPanel);
+ //categoriesTitle->setFrameShape(QFrame::StyledPanel);
#endif
- categoriesTitle->setText(i18n("Categories:"));
+ categoriesTitle->setText(i18n("Category:"));
catCtxMenu = new QPopupMenu(view);
catCtxMenu->insertItem(i18n("&Rename"),
view, SLOT(renCatButton_slot()));
catCtxMenu->insertItem(i18n("&Delete"),
view, SLOT(delCatButton_slot()));
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( categoriesList->viewport(), QPEApplication::RightOnHold );
#endif
// connections
connect(categoriesList, SIGNAL(highlighted(int)),
view, SLOT(shiftToView()));
connect(categoriesList,
SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
this,
SLOT(catRightClick(QListBoxItem *, const QPoint &)));
connect(lv, SIGNAL(toggleOverview()),
this, SLOT(toggleSplitter()));
}
PwMViewStyle_1::~PwMViewStyle_1()
{
delete catCtxMenu;
delete splitter;
}
void PwMViewStyle_1::toggleSplitter()
{
QValueList<int> si = splitter2->sizes();
splitter2->toggle();
QValueList<int> si2 = splitter2->sizes();
//qDebug("PwMViewStyle_1::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] );
if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) {
int diff = si[0]/2;
if ( diff > 200 )
diff = 200;
si[0] -= diff;
si[1] += diff;
splitter2->toggle();
splitter2->setSizes( si );
}
}
void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point)
{
if (!item)
return;