summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-06 18:00:15 (UTC)
committer zautrix <zautrix>2005-02-06 18:00:15 (UTC)
commit282c7fc5b72f8a6ff78a408e10a6018c290ed9f0 (patch) (side-by-side diff)
tree95291ead32969e45a6e4e405f15532c9f29543f7
parent002a447671cdec6a2ee7940bc183c630c61121fa (diff)
downloadkdepimpi-282c7fc5b72f8a6ff78a408e10a6018c290ed9f0.zip
kdepimpi-282c7fc5b72f8a6ff78a408e10a6018c290ed9f0.tar.gz
kdepimpi-282c7fc5b72f8a6ff78a408e10a6018c290ed9f0.tar.bz2
cat color better
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/koeditorgeneral.cpp1
-rw-r--r--korganizer/kotodoview.cpp7
-rw-r--r--libkdepim/categoryselectdialog.cpp70
-rw-r--r--libkdepim/categoryselectdialog.h8
-rw-r--r--libkdepim/categoryselectdialog_base.cpp9
-rw-r--r--libkdepim/categoryselectdialog_base.h1
7 files changed, 94 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 523c054..ee37492 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1179,52 +1179,56 @@
{ "recurr. events","wiederh.Termine" },
{ "completed to-dos","erledigte Todos" },
{ "events","Termine" },
{ "todos","Todos" },
{ "journals","Journale" },
{ "public","öffentl." },
{ "private","privat" },
{ "confidential","vertraul." },
{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
{ "Yesterday","Gestern" },
{ "Day after tomorrow","Übermorgen" },
{ "Tomorrow","Morgen" },
{ "Day before yesterday","Vorgestern" },
{ "Size %1","Größe %1" },
{ "New Agendasize: %1","Neue Agendagröße: %1" },
{ " (%1 y.)"," (%1 J.)" },
{ "Allday:","Ganztägig:" },
{ "compl.todos","erled.Todos" },
{ "Day view","Tagesansicht" },
{ "Next days","Nächste Tage" },
{ "Next week","Nächste Woche" },
{ "Next two weeks","Nächste zwei Wochen" },
{ "Next month","Nächster Monat" },
{ "Journal view","Journal" },
{ "Display all opened","Zeige alle geöffnet" },
{ "Display all closed","Zeige alle geschlossen" },
{ "Display all flat","Zeige alle flach" },
{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
{ "Default todo done color:","Standard Todo erledigt Farbe" },
{ "Select week %1-%2","Wähle Woche %1-%2" },
{ "Select Week","Wähle Woche" },
{ "Set alarm for selected...","Setze Alarm für Selekt..." },
{ "Set Alarm!","Setze Alarm!" },
{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
{ " and "," und " },
{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
{ "Mail to selected","Mail an Ausgewählte" },
{ "Mail to all","Mail an Alle" },
{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
{ " on"," am" },
{ " completed on "," erledigt am " },
{ "Save as Event template","Speichere als Vorlage" },
{ "Load Event template","Lade Termin Vorlage" },
{ "Save as Journal template","Speichere als Journal Vorlage" },
{ "Insert Journal template","Füge Journal Vorlage ein" },
{ "Sub todos:<br>","Unter Todos:<br>" },
{ "Parent todo:<br>","Über Todo:<br>" },
+{ "Set current as color category","Setze Gewählte als Farbkategorie" },
+{ "","" },
+{ "","" },
+{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index f5eb52e..496f125 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -76,96 +76,97 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
QLabel *summaryLabel = new QLabel(i18n("Summary:"),parent);
headerLayout->addWidget(summaryLabel,1,0);
mSummaryEdit = new KOLocationBox(TRUE,parent, 10);
mSummaryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
//mSummaryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5 ,(QSizePolicy::SizeType)3 ,FALSE) );
//qDebug("h %d %d ", summaryLabel->sizeHint().height(),mSummaryEdit->sizeHint().height() );
int hei = (summaryLabel->sizeHint().height() + mSummaryEdit->sizeHint().height())/2;
if ( QApplication::desktop()->width() > 320 )
mSummaryEdit->setMaximumHeight( hei +6 );
//qDebug("%d %d %d %d %d %d ", QSizePolicy::Fixed , QSizePolicy::Minimum , QSizePolicy:: Maximum , QSizePolicy:: Preferred , QSizePolicy:: MinimumExpanding , QSizePolicy::Expanding );
// SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink, MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink }
// mSummaryEdit = new QLineEdit(parent);
headerLayout->addWidget(mSummaryEdit,1,1);
connect ( mSummaryEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
QLabel *locationLabel = new QLabel(i18n("Location:"),parent);
headerLayout->addWidget(locationLabel,2,0);
mLocationEdit = new KOLocationBox(TRUE,parent,10);
mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
if ( QApplication::desktop()->width() > 320 )
mLocationEdit->setMaximumHeight( hei + 6);
// mLocationEdit = new QLineEdit(parent);
connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
headerLayout->addWidget(mLocationEdit,2,1);
headerLayout->setColStretch( 1, 10);
}
void KOEditorGeneral::setFocusOn( int i )
{
qApp->processEvents();
if ( i == 1 ) {
mDescriptionEdit->setFocus();
mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
}
if ( i == 2 ) {
mSummaryEdit->setFocus();
}
}
void KOEditorGeneral::editCategories()
{
// qDebug("KOEditorGeneral::editCategories() ");
KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &)));
//KOGlobals::fitDialogToScreen( csd );
+ csd->setColorEnabled();
csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
csd->exec();
delete csd;
}
void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
{
QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout );
mCategoriesButton = new QPushButton(parent);
mCategoriesButton->setText(i18n("Categories..."));
connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
categoriesLayout->addWidget(mCategoriesButton);
mCategoriesLabel = new QLabel(parent);
mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken);
categoriesLayout->addWidget(mCategoriesLabel,1);
}
void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
{
QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout );
QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent);
mCancelBox = new QCheckBox ( i18n("Cancelled"), parent);
secrecyLayout->addWidget(mCancelBox);
secrecyLayout->addWidget(secrecyLabel);
mSecrecyCombo = new QComboBox(parent);
mSecrecyCombo->insertStringList(Incidence::secrecyList());
secrecyLayout->addWidget(mSecrecyCombo);
}
void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
{
mDescriptionEdit = new KTextEdit(parent);
mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont );
mDescriptionEdit->append("");
mDescriptionEdit->setReadOnly(false);
mDescriptionEdit->setOverwriteMode(false);
mDescriptionEdit->setWordWrap( KTextEdit::WidgetWidth );
topLayout->addWidget(mDescriptionEdit);
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( mDescriptionEdit, QPEApplication::RightOnHold );
#endif
}
void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 1a1bce5..3011458 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -916,101 +916,108 @@ void KOTodoView::setNewPriority(int index)
void KOTodoView::setNewPercentage(int index)
{
if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
mActiveItem->setOn( true );
return;
} else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
if ( par && par->isOn() )
par->setOn( false );
}
if (mPercentage[index] == 100) {
mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
} else {
mActiveItem->todo()->setCompleted(false);
}
mActiveItem->todo()->setPercentComplete(mPercentage[index]);
mActiveItem->construct();
todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
}
}
QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
{
QPopupMenu* tempMenu = new QPopupMenu (this);
QStringList checkedCategories = todoItem->todo()->categories ();
tempMenu->setCheckable (true);
for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
it != KOPrefs::instance()->mCustomCategories.end ();
++it) {
int index = tempMenu->insertItem (*it);
mCategory[index] = *it;
if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true);
}
connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
return tempMenu;
}
void KOTodoView::changedCategories(int index)
{
if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
QStringList categories = mActiveItem->todo()->categories ();
+ QString colcat = categories.first();
if (categories.find (mCategory[index]) != categories.end ())
categories.remove (mCategory[index]);
else
categories.insert (categories.end(), mCategory[index]);
categories.sort ();
+ if ( !colcat.isEmpty() ) {
+ if ( categories.find ( colcat ) != categories.end () ) {
+ categories.remove( colcat );
+ categories.prepend( colcat );
+ }
+ }
mActiveItem->todo()->setCategories (categories);
mActiveItem->construct();
mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED);
}
}
void KOTodoView::itemDoubleClicked(QListViewItem *item)
{
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
if (!item) {
newTodo();
return;
}
if ( KOPrefs::instance()->mEditOnDoubleClick )
editItem( item );
else
showItem( item , QPoint(), 0 );
}
void KOTodoView::itemClicked(QListViewItem *item)
{
if (!item) {
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
return;
}
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
if ( pendingSubtodo != 0 ) {
bool allowReparent = true;
QListViewItem *par = item;
while ( par ) {
if ( par == pendingSubtodo ) {
allowReparent = false;
break;
}
par = par->parent();
}
if ( !allowReparent ) {
topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!"));
qDebug("Recursive reparenting not possible ");
pendingSubtodo = 0;
} else {
Todo* newParent = todoItem->todo();
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 7df9154..8b2bc4e 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -1,171 +1,237 @@
/*
This file is part of libkdepim.
Copyright (c) 2000, 2001, 2002 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlistview.h>
#include <qpushbutton.h>
#include <qheader.h>
#include <qapp.h>
#include <qmessagebox.h>
+#include <kmessagebox.h>
#include "categoryeditdialog.h"
#include "categoryselectdialog.h"
#include "kpimprefs.h"
using namespace KPIM;
CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
const char* name,
bool modal, WFlags fl )
: CategorySelectDialog_base( parent, name, true, fl ),
mPrefs( prefs )
{
+ mColorItem = 0;
+ mColorEnabled = false;
mCategories->header()->hide();
setCategories();
connect(mButtonEdit,SIGNAL(clicked()),this, SLOT(editCategoriesDialog()));
if ( QApplication::desktop()->width() > 460 )
resize( 300, 360 );
else
showMaximized();
+ connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) );
+ connect( mCategories, SIGNAL( clicked(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) );
}
void CategorySelectDialog::editCategoriesDialog()
{
KPIM::CategoryEditDialog* ced = new KPIM::CategoryEditDialog(mPrefs,this );
ced->exec();
delete ced;
setCategories();
}
void CategorySelectDialog::setCategories()
{
+ mColorItem = 0;
mCategories->clear();
mCategoryList.clear();
QStringList::Iterator it;
-
for (it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
new QCheckListItem(mCategories,*it,QCheckListItem::CheckBox);
}
}
CategorySelectDialog::~CategorySelectDialog()
{
}
void CategorySelectDialog::setSelected(const QStringList &selList)
{
clear();
QStringList::ConstIterator it;
QStringList notFound;
bool found = false;
for (it=selList.begin();it!=selList.end();++it) {
//qDebug(" CategorySelectDialog::setSelected(");
QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
while (item) {
if (item->text() == *it) {
item->setOn(true);
+ if ( ! found )
+ setColorItem( item );
found = true;
break;
}
item = (QCheckListItem *)item->nextSibling();
}
// if ( ! found ) {
//emit updateCategoriesGlobal();
// QMessageBox::information( this, "KO/E: Information!",
// "Categories found, which were not\n"
// "in list of categories!\n"
// "message",
// "OK", "", 0,
// 0, 1 );
// setSelected(selList);
// return;
// }
}
}
QStringList CategorySelectDialog::selectedCategories() const
{
return mCategoryList;
}
+void CategorySelectDialog::setColorEnabled()
+{
+ mColorEnabled = true;
+ mSetColorCat->show();
+}
+void CategorySelectDialog::setColorCat()
+{
+ QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem ();
+ if ( !newColorItem ) {
+ KMessageBox::error(this,i18n("There is no current item."));
+ return;
+ }
+ if ( !newColorItem->isOn() )
+ newColorItem->setOn( true );
+ setColorItem( newColorItem );
+}
+void CategorySelectDialog::clicked ( QListViewItem * it )
+{
+ if ( ! it )
+ return;
+ QCheckListItem *i = (QCheckListItem *) it;
+ qDebug("click %d ", i->isOn());
+ if ( !i->isOn() && i==mColorItem) {
+ setColorItem( 0);
+ QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ while (item) {
+ if (item->isOn()) {
+ setColorItem( item );
+ break;
+ }
+ item = (QCheckListItem *)item->nextSibling();
+ }
+ } else if ( i->isOn() && !mColorItem) {
+ setColorItem( i);
+ }
+}
+void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
+{
+ if ( !mColorEnabled )
+ return;
+ if ( mColorItem == newColorItem)
+ return;
+ if ( mColorItem ) {
+ mColorItem->setPixmap ( 0, QPixmap() );
+ mColorItem = 0;
+ }
+ if ( newColorItem ) {
+ QPixmap pix (newColorItem->height()/2, newColorItem->height()/2 );
+ pix.fill(Qt::blue );
+ newColorItem->setPixmap ( 0, pix );
+ mColorItem = newColorItem;
+ }
+}
void CategorySelectDialog::slotApply()
{
QStringList categories;
QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
+ QString colcat;
while (item) {
if (item->isOn()) {
+ if ( item == mColorItem)
+ colcat = item->text();
+ else
categories.append(item->text());
}
item = (QCheckListItem *)item->nextSibling();
}
-
+ categories.sort();
+ if ( ! colcat.isEmpty() )
+ categories.prepend( colcat );
QString categoriesStr = categories.join(",");
mCategoryList = categories;
emit categoriesSelected(categories);
emit categoriesSelected(categoriesStr);
}
void CategorySelectDialog::accept()
{
slotOk();
}
void CategorySelectDialog::slotOk()
{
slotApply();
QDialog::accept();
}
void CategorySelectDialog::clear()
{
QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
while (item) {
item->setOn(false);
item = (QCheckListItem *)item->nextSibling();
}
}
void CategorySelectDialog::updateCategoryConfig()
{
QStringList selected;
QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
while (item) {
if (item->isOn()) {
selected.append(item->text());
}
item = (QCheckListItem *)item->nextSibling();
}
setCategories();
setSelected(selected);
}
//#include "categoryselectdialog.moc"
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index 9b6261c..680a093 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -1,69 +1,75 @@
/*
This file is part of libkdepim.
Copyright (c) 2000, 2001, 2002 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KPIM_CATEGORYSELECTDIALOG_H
#define KPIM_CATEGORYSELECTDIALOG_H
#include <categoryselectdialog_base.h>
class KPimPrefs;
+class QCheckListItem;
namespace KPIM {
class CategorySelectDialog : public CategorySelectDialog_base
{
Q_OBJECT
public:
CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0,
const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );
~CategorySelectDialog();
void setCategories();
+ void setColorEnabled();
void setSelected(const QStringList &selList);
QStringList selectedCategories() const;
public slots:
void slotOk();
void slotApply();
void clear();
void accept();
void editCategoriesDialog();
void updateCategoryConfig();
-
+ void setColorCat();
+ void clicked ( QListViewItem * );
signals:
void categoriesSelected(const QString &);
void categoriesSelected(const QStringList &);
void editCategories();
private:
+ bool mColorEnabled;
KPimPrefs *mPrefs;
QStringList mCategoryList;
+ QCheckListItem *mColorItem;
+ void setColorItem( QCheckListItem * );
class CategorySelectDialogPrivate;
CategorySelectDialogPrivate *d;
};
}
#endif
diff --git a/libkdepim/categoryselectdialog_base.cpp b/libkdepim/categoryselectdialog_base.cpp
index 3f050cf..4793fd7 100644
--- a/libkdepim/categoryselectdialog_base.cpp
+++ b/libkdepim/categoryselectdialog_base.cpp
@@ -1,128 +1,131 @@
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/libkdepim/categoryselectdialog_base.ui'
**
** Created: Sat Mar 29 21:46:05 2003
** by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "categoryselectdialog_base.h"
#include <qvariant.h>
#include <qheader.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a CategorySelectDialog_base as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "CategorySelectDialog_base" );
CategorySelectDialog_baseLayout = new QVBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
mCategories = new QListView( this, "mCategories" );
mCategories->addColumn( i18n( "Category" ) );
CategorySelectDialog_baseLayout->addWidget( mCategories );
-
- Layout12 = new QHBoxLayout( 0, 0, 6, "Layout12");
+ mSetColorCat = new QPushButton( this, "msetColor" );
+ CategorySelectDialog_baseLayout->addWidget( mSetColorCat );
+ Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12");
mClear = new QPushButton( this, "mClear" );
Layout12->addWidget( mClear );
// QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
//Layout12->addItem( spacer );
mButtonEdit = new QPushButton( this, "mButtonEdit" );
Layout12->addWidget( mButtonEdit );
CategorySelectDialog_baseLayout->addLayout( Layout12 );
- Layout11 = new QHBoxLayout( 0, 0, 6, "Layout11");
+ Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11");
//mButtonHelp = new QPushButton( this, "mButtonHelp" );
//Layout11->addWidget( mButtonHelp );
//QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
// Layout11->addItem( spacer_2 );
//mApply = new QPushButton( this, "mApply" );
// Layout11->addWidget( mApply );
mButtonOk = new QPushButton( this, "mButtonOk" );
mButtonOk->setOn( FALSE );
mButtonOk->setDefault( TRUE );
Layout11->addWidget( mButtonOk );
mButtonCancel = new QPushButton( this, "mButtonCancel" );
Layout11->addWidget( mButtonCancel );
CategorySelectDialog_baseLayout->addLayout( Layout11 );
languageChange();
// resize( sizeHint() );
// signals and slots connections
connect( mButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( mButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
connect( mClear, SIGNAL( clicked() ), this, SLOT( clear() ) );
//connect( mApply, SIGNAL( clicked() ), this, SLOT( slotApply() ) );
// tab order
setTabOrder( mCategories, mClear );
setTabOrder( mClear, mButtonEdit );
setTabOrder( mButtonEdit, mButtonOk );//mButtonHelp );
// setTabOrder( mButtonHelp, mApply );
// setTabOrder( mApply, mButtonOk );
setTabOrder( mButtonOk, mButtonCancel );
// showMaximized();
//raise();
+ mSetColorCat->hide();
}
/*
* Destroys the object and frees any allocated resources
*/
CategorySelectDialog_base::~CategorySelectDialog_base()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void CategorySelectDialog_base::languageChange()
{
setCaption( i18n( "Select Categories" ) );
mCategories->header()->setLabel( 0, tr2i18n( "Category" ) );
mClear->setText( i18n( " &Deselect All " ) );
mButtonEdit->setText( i18n( " &Edit Categories " ) );
// mButtonHelp->setText( tr2i18n( "&Help" ) );
//mApply->setText( i18n( "&Apply" ) );
mButtonOk->setText( i18n( "&OK" ) );
+ mSetColorCat->setText( i18n( "Set current as color category" ) );
mButtonCancel->setText( i18n( "&Cancel" ) );
}
void CategorySelectDialog_base::clear()
{
qWarning( "CategorySelectDialog_base::clear(): Not implemented yet" );
}
void CategorySelectDialog_base::slotApply()
{
qWarning( "CategorySelectDialog_base::slotApply(): Not implemented yet" );
}
void CategorySelectDialog_base::slotOk()
{
qWarning( "CategorySelectDialog_base::slotOk(): Not implemented yet" );
}
//US#include "categoryselectdialog_base.moc"
diff --git a/libkdepim/categoryselectdialog_base.h b/libkdepim/categoryselectdialog_base.h
index af905ed..59ffa22 100644
--- a/libkdepim/categoryselectdialog_base.h
+++ b/libkdepim/categoryselectdialog_base.h
@@ -1,53 +1,54 @@
/****************************************************************************
** Form interface generated from reading ui file '/build/kde/cvs/korge/kdepim/libkdepim/categoryselectdialog_base.ui'
**
** Created: Sat Mar 29 21:45:20 2003
** by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef CATEGORYSELECTDIALOG_BASE_H
#define CATEGORYSELECTDIALOG_BASE_H
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QListView;
class QListViewItem;
class QPushButton;
class CategorySelectDialog_base : public QDialog
{
Q_OBJECT
public:
CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~CategorySelectDialog_base();
QListView* mCategories;
QPushButton* mClear;
QPushButton* mButtonEdit;
QPushButton* mButtonHelp;
QPushButton* mApply;
QPushButton* mButtonOk;
QPushButton* mButtonCancel;
+ QPushButton* mSetColorCat;
public slots:
virtual void clear();
virtual void slotApply();
virtual void slotOk();
protected:
QVBoxLayout* CategorySelectDialog_baseLayout;
QHBoxLayout* Layout12;
QHBoxLayout* Layout11;
protected slots:
virtual void languageChange();
};
#endif // CATEGORYSELECTDIALOG_BASE_H