summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/categoryeditdialog.cpp2
-rw-r--r--libkdepim/categoryeditdialog_base.cpp2
-rw-r--r--libkdepim/categoryselectdialog.cpp2
-rw-r--r--libkdepim/categoryselectdialog_base.cpp2
-rw-r--r--libkdepim/kdateedit.cpp2
-rw-r--r--libkdepim/kdatepicker.cpp2
-rw-r--r--libkdepim/kprefsdialog.cpp2
-rw-r--r--libkdepim/libkdepimE.pro1
8 files changed, 8 insertions, 7 deletions
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp
index 87172c1..f719c31 100644
--- a/libkdepim/categoryeditdialog.cpp
+++ b/libkdepim/categoryeditdialog.cpp
@@ -39,97 +39,97 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
WFlags fl )
: CategoryEditDialog_base( parent, name, modal, fl ),
mPrefs( prefs )
{
mCategories->header()->hide();
QStringList::Iterator it;
bool categoriesExist=false;
for (it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
new QListViewItem(mCategories,*it);
categoriesExist=true;
}
connect(mCategories,SIGNAL(selectionChanged(QListViewItem *)),
SLOT(editItem(QListViewItem *)));
connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &)));
mButtonRemove->setEnabled(categoriesExist);
mButtonModify->setEnabled(categoriesExist);
mButtonAdd->setEnabled(!mEdit->text().isEmpty());
if ( QApplication::desktop()->width() > 460 )
resize( 300, 360 );
}
/*
* Destroys the object and frees any allocated resources
*/
CategoryEditDialog::~CategoryEditDialog()
{
// no need to delete child widgets, Qt does it all for us
}
void CategoryEditDialog::slotTextChanged(const QString &text)
{
mButtonAdd->setEnabled(!text.isEmpty());
}
void CategoryEditDialog::add()
{
if (!mEdit->text().isEmpty()) {
new QListViewItem(mCategories,mEdit->text());
mEdit->setText("");
mButtonRemove->setEnabled(mCategories->childCount()>0);
mButtonModify->setEnabled(mCategories->childCount()>0);
}
}
void CategoryEditDialog::remove()
{
if (mCategories->currentItem()) {
delete mCategories->currentItem();
mButtonRemove->setEnabled(mCategories->childCount()>0);
mButtonModify->setEnabled(mCategories->childCount()>0);
}
}
void CategoryEditDialog::modify()
{
if (!mEdit->text().isEmpty()) {
if (mCategories->currentItem()) {
mCategories->currentItem()->setText(0,mEdit->text());
}
}
}
void CategoryEditDialog::accept()
{
slotOk();
}
void CategoryEditDialog::slotOk()
{
slotApply();
QDialog::accept();
}
void CategoryEditDialog::slotApply()
{
mPrefs->mCustomCategories.clear();
QListViewItem *item = mCategories->firstChild();
while(item) {
mPrefs->mCustomCategories.append(item->text(0));
item = item->nextSibling();
}
mPrefs->writeConfig();
emit categoryConfigChanged();
}
void CategoryEditDialog::editItem(QListViewItem *item)
{
mEdit->setText(item->text(0));
mButtonRemove->setEnabled(true);
mButtonModify->setEnabled(true);
}
-#include "categoryeditdialog.moc"
+//US #include "categoryeditdialog.moc"
diff --git a/libkdepim/categoryeditdialog_base.cpp b/libkdepim/categoryeditdialog_base.cpp
index ac99190..2390bbd 100644
--- a/libkdepim/categoryeditdialog_base.cpp
+++ b/libkdepim/categoryeditdialog_base.cpp
@@ -58,97 +58,97 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n
mButtonCancel->setAutoDefault( TRUE );
Layout13->addWidget( mButtonCancel );
CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 );
mCategories = new QListView( this, "mCategories" );
mCategories->addColumn( tr2i18n( "Category" ) );
CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 );
layout103 = new QVBoxLayout( 0, 0, 6, "layout103");
mButtonAdd = new QPushButton( this, "mButtonAdd" );
layout103->addWidget( mButtonAdd );
mButtonModify = new QPushButton( this, "mButtonModify" );
layout103->addWidget( mButtonModify );
mButtonRemove = new QPushButton( this, "mButtonRemove" );
layout103->addWidget( mButtonRemove );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
layout103->addItem( spacer_2 );
CategoryEditDialog_baseLayout->addLayout( layout103, 0, 1 );
languageChange();
resize( sizeHint() );
// signals and slots connections
connect( mButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( mButtonAdd, SIGNAL( clicked() ), this, SLOT( add() ) );
connect( mButtonModify, SIGNAL( clicked() ), this, SLOT( modify() ) );
connect( mButtonRemove, SIGNAL( clicked() ), this, SLOT( remove() ) );
connect( mButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
//connect( mApply, SIGNAL( clicked() ), this, SLOT( slotApply() ) );
// tab order
// setTabOrder( mCategories, mEdit );
// setTabOrder( mEdit, mButtonAdd );
// setTabOrder( mButtonAdd, mButtonModify );
// setTabOrder( mButtonModify, mButtonRemove );
// setTabOrder( mButtonRemove, mButtonHelp );
// setTabOrder( mButtonHelp, mApply );
// setTabOrder( mApply, mButtonOk );
// setTabOrder( mButtonOk, mButtonCancel );
}
/*
* Destroys the object and frees any allocated resources
*/
CategoryEditDialog_base::~CategoryEditDialog_base()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void CategoryEditDialog_base::languageChange()
{
setCaption( tr2i18n( "Edit Categories" ) );
// mButtonHelp->setText( tr2i18n( "&Help" ) );
// mApply->setText( tr2i18n( "&Apply" ) );
mButtonOk->setText( tr2i18n( "&OK" ) );
mButtonCancel->setText( tr2i18n( "&Cancel" ) );
mCategories->header()->setLabel( 0, tr2i18n( "Category" ) );
mButtonAdd->setText( tr2i18n( "A&dd" ) );
mButtonModify->setText( tr2i18n( "&Modify" ) );
mButtonRemove->setText( tr2i18n( "&Remove" ) );
}
void CategoryEditDialog_base::add()
{
qWarning( "CategoryEditDialog_base::add(): Not implemented yet" );
}
void CategoryEditDialog_base::modify()
{
qWarning( "CategoryEditDialog_base::modify(): Not implemented yet" );
}
void CategoryEditDialog_base::slotApply()
{
qWarning( "CategoryEditDialog_base::slotApply(): Not implemented yet" );
}
void CategoryEditDialog_base::remove()
{
qWarning( "CategoryEditDialog_base::remove(): Not implemented yet" );
}
void CategoryEditDialog_base::slotOk()
{
qWarning( "CategoryEditDialog_base::slotOk(): Not implemented yet" );
}
-#include "categoryeditdialog_base.moc"
+//US #include "categoryeditdialog_base.moc"
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 7b0aced..943d35c 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -77,97 +77,97 @@ void CategorySelectDialog::setCategories()
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);
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::slotApply()
{
QStringList categories;
QCheckListItem *item = (QCheckListItem *)mCategories->firstChild();
while (item) {
if (item->isOn()) {
categories.append(item->text());
}
item = (QCheckListItem *)item->nextSibling();
}
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"
+//#include "categoryselectdialog.moc"
diff --git a/libkdepim/categoryselectdialog_base.cpp b/libkdepim/categoryselectdialog_base.cpp
index 5e5fa72..3f050cf 100644
--- a/libkdepim/categoryselectdialog_base.cpp
+++ b/libkdepim/categoryselectdialog_base.cpp
@@ -32,97 +32,97 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha
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");
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");
//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();
}
/*
* 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" ) );
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" );
}
-#include "categoryselectdialog_base.moc"
+//US#include "categoryselectdialog_base.moc"
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index 60bd2cf..5fb948a 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -1,137 +1,137 @@
/*
This file is part of libkdepim.
Copyright (c) 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., 675 Mass Ave, Cambridge, MA 02139, 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 <qapplication.h>
#include <qevent.h>
#include <qlineedit.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <kdatepicker.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <knotifyclient.h>
#include <qpalette.h>
#include "kdateedit.h"
-#include "kdateedit.moc"
+//#include "kdateedit.moc"
KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
: QHBox(parent, name)
{
dateFormShort = true;
withoutDp = withoutDP;
mDateEdit = new QLineEdit(this);
mDateEdit->setText(KGlobal::locale()->formatDate(QDate::currentDate(),dateFormShort));
setFocusProxy(mDateEdit);
mDateEdit->installEventFilter(this);
// Highlight Background and Textcolor
QPalette palette = QWidget::palette();
unsigned char red, green, blue;
red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10;
green = palette.color( QPalette::Normal , QColorGroup::Background ).green() - 10;
blue = palette.color( QPalette::Normal , QColorGroup::Background ).blue() - 10;
palette.setColor( QColorGroup::Highlight, QColor(red,green,blue) );
palette.setColor( QColorGroup::HighlightedText, palette.color( QPalette::Normal , QColorGroup::Foreground ) );
mDateEdit->setPalette( palette );
if ( withoutDP ) {
mDateFrame = 0;
mDateButton = 0;
mDatePicker = 0;
} else {
QPixmap pixmap = SmallIcon("smallcal");
mDateButton = new QPushButton(this);
mDateButton->setPixmap(pixmap);
mDateFrame = new QVBox(0,0,WType_Popup);
// mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
mDateFrame->setLineWidth(3);
mDateFrame->hide();
mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate());
connect(mDatePicker,SIGNAL(dateEntered(QDate)),SLOT(setDate(QDate)));
connect(mDatePicker,SIGNAL(dateEntered(QDate)),SIGNAL(dateChanged(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(setDate(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate)));
connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide()));
connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
//mDateFrame->resize( 400, 300 );
}
connect(mDateEdit,SIGNAL(returnPressed()),SLOT(lineEnterPressed()));
connect(mDateEdit,SIGNAL(textChanged(const QString &)),
SLOT(textChanged(const QString &)));
// Create the keyword list. This will be used to match against when the user
// enters information.
mKeywordMap[i18n("tomorrow")] = 1;
mKeywordMap[i18n("today")] = 0;
mKeywordMap[i18n("yesterday")] = -1;
/*
* This loop uses some math tricks to figure out the offset in days
* to the next date the given day of the week occurs. There
* are two cases, that the new day is >= the current day, which means
* the new day has not occured yet or that the new day < the current day,
* which means the new day is already passed (so we need to find the
* day in the next week).
*/
QString dayName;
int currentDay = QDate::currentDate().dayOfWeek();
for (int i = 1; i <= 7; ++i)
{
dayName = KGlobal::locale()->weekDayName(i).lower();
if (i >= currentDay)
mKeywordMap[dayName] = i - currentDay;
else
mKeywordMap[dayName] = 7 - currentDay + i;
}
mTextChanged = false;
mHandleInvalid = false;
QWidget::setTabOrder( mDateEdit, mDateButton );
}
KDateEdit::~KDateEdit()
{
delete mDateFrame;
}
void KDateEdit::setDate(QDate newDate)
{
if (!newDate.isValid() && !mHandleInvalid)
return;
if ( readDate() == newDate )
return;
QString dateString = "";
if(newDate.isValid())
dateString = KGlobal::locale()->formatDate( newDate, dateFormShort );
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 6e5ec0f..3fe139c 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -1,134 +1,134 @@
/* -*- C++ -*-
This file is part of the KDE libraries
Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org)
(C) 1998-2001 Mirko Boehm (mirko@kde.org)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "kdatepicker.h"
#include <kglobal.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
#include <qframe.h>
#include <qpainter.h>
#include <qdialog.h>
#include <qtoolbutton.h>
#include <qfont.h>
#include <qapplication.h>
#include <qlineedit.h>
#include <qvalidator.h>
#include <kdebug.h>
#include <knotifyclient.h>
#include "kdatetbl.h"
#include "kdateedit.h"
-#include "kdatepicker.moc"
+//#include "kdatepicker.moc"
KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
: QFrame(parent,name),
yearForward(new QToolButton(this)),
yearBackward(new QToolButton(this)),
monthForward(new QToolButton(this)),
monthBackward(new QToolButton(this)),
selectMonth(new QToolButton(this)),
selectYear(new QToolButton(this)),
//line(new QLineEdit(this)),
val(new KDateValidator(this))
//table(new KDateTable(this)),
//fontsize(1)
{
// -----
int size = 12;
if ( QApplication::desktop()->width() >= 480 )
size = 18;
fontsize = size;
setFont ( QFont("helvetica",size) );
table = new KDateTable(this);
setFontSize(size);
//line->setValidator(val);
lineDate = new KDateEdit( this, "dateediipicker", true );
yearForward->setPixmap(SmallIcon("2rightarrowB"));
yearBackward->setPixmap(SmallIcon("2leftarrowB"));
monthForward->setPixmap(SmallIcon("1rightarrowB"));
monthBackward->setPixmap(SmallIcon("1leftarrowB"));
setDate(dt); // set button texts
connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate)));
connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot()));
connect(monthForward, SIGNAL(clicked()), SLOT(monthForwardClicked()));
connect(monthBackward, SIGNAL(clicked()), SLOT(monthBackwardClicked()));
connect(yearForward, SIGNAL(clicked()), SLOT(yearForwardClicked()));
connect(yearBackward, SIGNAL(clicked()), SLOT(yearBackwardClicked()));
connect(selectMonth, SIGNAL(clicked()), SLOT(selectMonthClicked()));
connect(selectYear, SIGNAL(clicked()), SLOT(selectYearClicked()));
//connect(line, SIGNAL(returnPressed()), SLOT(lineEnterPressed()));
connect(lineDate, SIGNAL(dateChanged(QDate)), SLOT(slotSetDate(QDate)));
connect(lineDate, SIGNAL(returnPressed()), SLOT(lineEnterPressed()));
table->setFocus();
}
KDatePicker::~KDatePicker()
{
}
void
KDatePicker::resizeEvent(QResizeEvent*)
{
QWidget *buttons[] = {
yearBackward,
monthBackward,
selectMonth,
selectYear,
monthForward,
yearForward };
const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]);
QSize sizes[NoOfButtons];
int buttonHeight=0;
int count;
int w;
int x=0;
// ----- calculate button row height:
for(count=0; count<NoOfButtons; ++count) {
int xS = buttons[count]->sizeHint().width();
int yS = buttons[count]->sizeHint().height();
sizes[count]=QSize ( xS+10, yS );
buttonHeight=QMAX(buttonHeight, sizes[count].height());
}
buttonHeight += 10;
// ----- calculate size of the month button:
w=0;
for(count=0; count<NoOfButtons; ++count) {
if(buttons[count]!=selectMonth)
{
w+=sizes[count].width();
} else {
x=count;
}
}
sizes[x].setWidth(width()-w); // stretch the month button
// ----- place the buttons:
x=0;
for(count=0; count<NoOfButtons; ++count)
{
w=sizes[count].width();
buttons[count]->setGeometry(x, 0, w, buttonHeight);
x+=w;
}
// ----- place the line edit for direct input:
sizes[0]=lineDate->sizeHint();
//line->setGeometry(0, height()-sizes[0].height(), width(), sizes[0].height());
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 3a39ea9..205c526 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -1,154 +1,154 @@
/*
This file is part of KOrganizer.
Copyright (c) 2001 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.
*/
// $Id$
#include <qlayout.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qbuttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qvbox.h>
#include <qhbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qframe.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qapplication.h>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include "kprefs.h"
#include "kprefsdialog.h"
-#include "kprefsdialog.moc"
+//#include "kprefsdialog.moc"
KPrefsWidBool::KPrefsWidBool(const QString &text,bool *reference,
QWidget *parent)
{
mReference = reference;
mCheck = new QCheckBox(text,parent);
}
void KPrefsWidBool::readConfig()
{
mCheck->setChecked(*mReference);
}
void KPrefsWidBool::writeConfig()
{
*mReference = mCheck->isChecked();
}
QCheckBox *KPrefsWidBool::checkBox()
{
return mCheck;
}
KPrefsWidColor::KPrefsWidColor(const QString &text,QColor *reference,
QWidget *parent)
{
mReference = reference;
mButton = new KColorButton(parent);
mLabel = new QLabel(mButton, text, parent);
mButton->setColor( *mReference );
mButton->setColor( Qt::red );
}
KPrefsWidColor::~KPrefsWidColor()
{
// kdDebug(5300) << "KPrefsWidColor::~KPrefsWidColor()" << endl;
}
void KPrefsWidColor::readConfig()
{
mButton->setColor(*mReference);
}
void KPrefsWidColor::writeConfig()
{
*mReference = mButton->color();
}
QLabel *KPrefsWidColor::label()
{
return mLabel;
}
KColorButton *KPrefsWidColor::button()
{
return mButton;
}
KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
QFont *reference,QWidget *parent)
{
mReference = reference;
mLabel = new QLabel(labelText, parent);
mPreview = new QLabel(sampleText,parent);
mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken);
mButton = new QPushButton(i18n("Choose..."), parent);
connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 );
mPreview->setMaximumWidth( (QApplication::desktop()->width() / 2)-10 );
}
KPrefsWidFont::~KPrefsWidFont()
{
}
void KPrefsWidFont::readConfig()
{
mPreview->setFont(*mReference);
}
void KPrefsWidFont::writeConfig()
{
*mReference = mPreview->font();
}
QLabel *KPrefsWidFont::label()
{
return mLabel;
}
diff --git a/libkdepim/libkdepimE.pro b/libkdepim/libkdepimE.pro
index 05abaa5..414ac2b 100644
--- a/libkdepim/libkdepimE.pro
+++ b/libkdepim/libkdepimE.pro
@@ -1,43 +1,44 @@
TEMPLATE = lib
CONFIG += qt warn_on
TARGET = microkdepim
INCLUDEPATH += ../microkde ../qtcompat ../libkabcwrap ../microkde/kdecore
INCLUDEPATH += . ..
LIBS += -lmicrokde
+LIBS += -L$(QPEDIR)/lib
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
DESTDIR=$(QPEDIR)/lib
INTERFACES = \
HEADERS = \
categoryeditdialog.h \
categoryeditdialog_base.h \
categoryselectdialog.h \
categoryselectdialog_base.h \
kdateedit.h \
kdatepicker.h \
kinputdialog.h \
kincidenceformatter.h \
kpimprefs.h \
kprefs.h \
kprefsdialog.h \
addresseeview.h \
ksyncprofile.h
SOURCES = \
categoryeditdialog.cpp \
categoryeditdialog_base.cpp \
categoryselectdialog.cpp \
categoryselectdialog_base.cpp \
kdateedit.cpp \
kinputdialog.cpp \
kdatepicker.cpp \
kincidenceformatter.cpp \
kpimprefs.cpp \
kprefs.cpp \
kprefsdialog.cpp \
addresseeview.cpp \
ksyncprofile.cpp