summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt6
-rw-r--r--korganizer/calendarview.cpp18
-rw-r--r--korganizer/koeditordetails.cpp2
-rw-r--r--korganizer/koeditorgeneral.cpp7
-rw-r--r--korganizer/koeditorgeneralevent.cpp5
-rw-r--r--korganizer/koeditorgeneraltodo.cpp2
-rw-r--r--korganizer/koeventeditor.cpp6
-rw-r--r--korganizer/koincidenceeditor.cpp2
-rw-r--r--korganizer/kotodoeditor.cpp4
9 files changed, 41 insertions, 11 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 11a0413..44e6bdf 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1450,32 +1450,32 @@
{ "Children","Kinder" },
{ "Department","Abteilung" },
{ "Backup cancelled","Backup abgebrochen" },
{ "Backup globally disabled","Backup global abgeschaltet" },
{ "Backup succesfully finished","Backup erfolgreich beendet" },
{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" },
{ "Birthdays","Geburtstage" },
{ "KO/Pi import information!","KO/Pi Import Information!" },
{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" },
{ "Reload","Neu laden" },
{ "Timezone settings","Zeitzoneneinstellung" },
{ "Title: ","Titel: " },
{ "Journal from: ","Journal vom: " },
{ "Journal: %1 from ","Journal: %1 vom " },
{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" },
{ "Selected Item","Ausgewähltes Item" },
{ "Select Date...","Wähle Datum..." },
{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" },
{ "Change category list now!","Ändere Kategorieliste jetzt!" },
{ "Edit category list...","Ändere Kategorieliste..." },
{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" },
-{ "","" },
-{ "","" },
-{ "","" },
+{ "Filepath: ","Dateipfad: " },
+{ "The loading of one or more calendar failed:","Das Laden eines oder mehrerer Kalender schlug fehl:" },
+{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c0f3be7..fd026fa 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -663,48 +663,62 @@ void CalendarView::scrollBarValue(int val )
{
#ifdef DESKTOP_VERSION
if ( QApplication::desktop()->width() < 800 ) return;
static bool block = false;
if ( block ) return;
block = true;
val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
//qDebug("VAL %d ",val );
int count = mNavigator->selectedDates().count();
int year = mNavigator->selectedDates().first().year();
int day = mNavigator->selectedDates().first().dayOfYear();
if ( val == day -1 ) {
block = false;
return;
}
QDate d ( year,1,1 );
mNavigator->selectDates( d.addDays( val ), count );
block = false;
#endif
}
void CalendarView::checkAlarms()
{
+
+ QString message;
+ QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ KopiCalendarFile * cal = calendars.first();
+ while ( cal ) {
+ if ( cal->mErrorOnLoad ) {
+ message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
+ }
+ cal = calendars.next();
+ }
+ if ( !message.isEmpty() ) {
+ message = KGlobal::formatMessage( i18n("The loading of one or more calendar failed:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0);
+ KMessageBox::error(this,message);
+ }
KConfig *config = KOGlobals::config();
config->setGroup( "AppRun" );
QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
int daysto = dt.daysTo( QDate::currentDate() );
int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
dt = dt.addDays( days );
int secto = dt.secsTo( QDateTime::currentDateTime() );
int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30;
//qDebug("KO: Reading program stop %d ", secs);
//secs -= ( 3600 * 24*3 ); // debug only
QDateTime latest = dt.addSecs ( secs );
qDebug("KO: Last termination on %s ", latest.toString().latin1());
//qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
QPtrList<Incidence> el = mCalendar->rawIncidences();
QPtrList<Incidence> al;
Incidence* inL = el.first();
QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
while ( inL ) {
bool ok = false;
int offset = 0;
QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
if ( ok ) {
//qDebug("OK %s",next.toString().latin1());
@@ -1902,59 +1916,59 @@ bool CalendarView::loadCalendars()
restoreCalendarSettings();
return true;
}
bool CalendarView::restoreCalendarSettings()
{
QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
KopiCalendarFile * cal = calendars.first();
while ( cal ) {
mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled );
mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly );
if ( cal->isStandard )
mCalendar->setDefaultCalendar( cal->mCalNumber );
cal = calendars.next();
}
setSyncEventsReadOnly();
mCalendar->reInitAlarmSettings();
updateUnmanagedViews();
updateView();
return true;
}
void CalendarView::addCalendarId( int id )
{
KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id );
+ if ( cal )
addCalendar( cal );
}
bool CalendarView::addCalendar( KopiCalendarFile * cal )
{
cal->mErrorOnLoad = false;
if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) {
cal->mLoadDt = QDateTime::currentDateTime();
return true;
}
- qDebug("KO: Error adding calendar file %1 ",cal->mFileName.latin1() );
- KMessageBox::error(this,i18n("Error loading calendar file\n%1.").arg(cal->mFileName));
+ qDebug("KO: Error adding calendar file %s ",cal->mFileName.latin1() );
cal->mErrorOnLoad = true;
return false;
}
bool CalendarView::openCalendar(QString filename, bool merge)
{
if (filename.isEmpty()) {
return false;
}
if (!QFile::exists(filename)) {
KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename));
return false;
}
globalFlagBlockAgenda = 1;
clearAllViews();
if (!merge) {
mViewManager->setDocumentId( filename );
mCalendar->close();
}
mStorage->setFileName( filename );
if ( mStorage->load() ) {
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 7354940..479bd8b 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -12,96 +12,98 @@
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 <qtooltip.h>
#include <qfiledialog.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qbuttongroup.h>
#include <qvgroupbox.h>
#include <qwidgetstack.h>
#include <qdatetime.h>
#include <qapp.h>
#include <klocale.h>
#include <kglobal.h>
+#include <kdialog.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#ifndef KORG_NOKABC
#ifdef DESKTOP_VERSION
#include <kabc/addresseedialog.h>
#else //DESKTOP_VERSION
#include <externalapphandler.h>
#endif //DESKTOP_VERSION
#endif
#include <libkcal/incidence.h>
#include "koprefs.h"
#include "koeditordetails.h"
template <>
CustomListViewItem<class Attendee *>::~CustomListViewItem()
{
delete mData;
}
template <>
void CustomListViewItem<class Attendee *>::updateItem()
{
setText(0,mData->name());
setText(1,mData->email());
setText(2,mData->roleStr());
setText(3,mData->statusStr());
if (mData->RSVP() && !mData->email().isEmpty()) {
setPixmap(4,SmallIcon("mailappt"));
setSortKey(4,"j");
}
else {
setPixmap(4,SmallIcon("nomailappt"));
setSortKey(4,"n");
}
}
KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
: QWidget( parent, name), mDisableItemUpdate( false )
{
QGridLayout *topLayout = new QGridLayout(this);
topLayout->setSpacing(spacing);
+ topLayout->setMargin(KDialog::marginHint()-2);
QString organizer = KOPrefs::instance()->email();
mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
mListView = new KListView(this,"mListView");
mListView->addColumn(i18n("Name"),180);
mListView->addColumn(i18n("Email"),180);
mListView->addColumn(i18n("Role"),60);
mListView->addColumn(i18n("Status"),100);
mListView->addColumn(i18n("RSVP"),35);
if ( QApplication::desktop()->width() <= 320 || QApplication::desktop()->height() <= 240) {
int hei = 80;
if ( QApplication::desktop()->height() <= 240 )
hei = 60;
mListView->setFixedHeight(hei);
}
mListView->setAllColumnsShowFocus (true );
//mListView->setSingleClick( true );
connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
SLOT(updateAttendeeInput()));
connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )),
SLOT(itemClicked(QListViewItem * ,const QPoint& , int )));
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index e07bc53..29e68b3 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -14,90 +14,93 @@
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 <qwidget.h>
#include <qtooltip.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qbuttongroup.h>
#include <qvgroupbox.h>
#include <qwidgetstack.h>
#include <qdatetime.h>
#include <qtimer.h>
#include <qfile.h>
#include <qregexp.h>
#include <kglobal.h>
+#include <kdialog.h>
#include <kdebug.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
#include <libkcal/todo.h>
#include <libkcal/event.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkdepim/kdateedit.h>
#include "koprefs.h"
#include "koglobals.h"
#include "koeditorgeneral.h"
#include "kolocationbox.h"
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else
#include <qapplication.h>
#endif
KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) :
QObject( parent, name)
{
mNextFocus = 0;
}
KOEditorGeneral::~KOEditorGeneral()
{
}
void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
{
QGridLayout *headerLayout = new QGridLayout(topLayout);
#if 0
mOwnerLabel = new QLabel(i18n("Owner:"),parent);
headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1);
#endif
-
+ // 1 on pda
+ // 11 on desktop
+ headerLayout->setSpacing( (KDialog::spacingHint()-3)*2+1 );
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);
if ( QApplication::desktop()->height() < 320 )
headerLayout->addWidget(locationLabel,1,2);
else
headerLayout->addWidget(locationLabel,2,0);
mLocationEdit = new KOLocationBox(TRUE,parent,10);
mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
@@ -168,49 +171,49 @@ void KOEditorGeneral::selectedCatPopup( int index )
categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]);
categories.sort ();
if ( !colcat.isEmpty() ) {
if ( categories.find ( colcat ) != categories.end () ) {
categories.remove( colcat );
categories.prepend( colcat );
}
}
setCategories( categories.join(",") );
}
void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
{
QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout );
mCatPopup = new QPopupMenu ( parent );
mCatPopup->setCheckable (true);
connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
mCategoriesButton = new QPushButton(parent);
mCategoriesButton->setText(i18n("Categories..."));
connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
//connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
categoriesLayout->addWidget(mCategoriesButton);
mCategoriesLabel = new QPushButton(parent);//new QLabel(parent);
- mCategoriesLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
+ mCategoriesLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
mCategoriesLabel->setPopup( mCatPopup );
//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("");
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 3dd7f5c..2c6ed9f 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -10,48 +10,49 @@
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 <qtooltip.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qbuttongroup.h>
#include <qvgroupbox.h>
#include <qwidgetstack.h>
#include <qdatetime.h>
#include <kdebug.h>
#include <kglobal.h>
+#include <kdialog.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
#include <libkcal/event.h>
#include <libkdepim/kdateedit.h>
#include "koprefs.h"
#include "koeditorgeneralevent.h"
#include "kolocationbox.h"
KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent,
const char* name) :
KOEditorGeneral( parent, name)
{
mTemplate = false;
connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
SLOT(setDuration()));
connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
SLOT(emitDateTimeStr()));
@@ -70,50 +71,50 @@ void KOEditorGeneralEvent::finishSetup()
// QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
// QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit );
// QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit );
// QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton );
// QWidget::setTabOrder( mNoTimeButton, mAlarmButton );
// QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
// QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton );
// QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
mSummaryEdit->load(KOLocationBox::SUMMARYEVENT);
mSummaryEdit->setFocus();
}
void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
{
QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
i18n("Date && Time"),parent);
timeLayout->addWidget(timeGroupBox);
- timeGroupBox->layout()->setSpacing( 0 );
- timeGroupBox->layout()->setMargin( 5 );
+ timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() );
+ timeGroupBox->layout()->setMargin( KDialog::marginHint() );
QFrame *timeBoxFrame = new QFrame(timeGroupBox);
QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3);
layoutTimeBox->setSpacing(topLayout->spacing());
mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame);
layoutTimeBox->addWidget(mStartDateLabel,0,0);
mStartDateEdit = new KDateEdit(timeBoxFrame);
layoutTimeBox->addWidget(mStartDateEdit,0,1);
mStartTimeEdit = new KOTimeEdit(timeBoxFrame);
layoutTimeBox->addWidget(mStartTimeEdit,0,2);
mEndDateLabel = new QLabel(i18n("End:"),timeBoxFrame);
layoutTimeBox->addWidget(mEndDateLabel,1,0);
mEndDateEdit = new KDateEdit(timeBoxFrame);
layoutTimeBox->addWidget(mEndDateEdit,1,1);
mEndTimeEdit = new KOTimeEdit(timeBoxFrame);
layoutTimeBox->addWidget(mEndTimeEdit,1,2);
QWidget* duration = new QWidget( timeBoxFrame );
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 0a734ee..965cf47 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -68,49 +68,49 @@ void KOEditorGeneralTodo::finishSetup()
// QWidget::setTabOrder(mLocationEdit, mDueCheck);
// QWidget::setTabOrder(mDueCheck, mDueDateEdit);
// QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit);
// QWidget::setTabOrder(mDueTimeEdit, mStartCheck);
// QWidget::setTabOrder(mStartCheck, mStartDateEdit);
// QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit);
// QWidget::setTabOrder(mStartTimeEdit, mTimeButton);
// QWidget::setTabOrder(mTimeButton, mCompletedCombo);
// QWidget::setTabOrder(mCompletedCombo, mPriorityCombo);
// QWidget::setTabOrder(mPriorityCombo, mAlarmButton);
// QWidget::setTabOrder(mAlarmButton, mCategoriesButton);
// QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo);
// QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit);
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mSummaryEdit->setFocus();
}
void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
{
QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
i18n("Date && Time"),parent);
timeLayout->addWidget(timeGroupBox);
- timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() );
+ timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 );
timeGroupBox->layout()->setMargin( KDialog::marginHint() );
QFrame *timeBoxFrame = new QFrame(timeGroupBox);
QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3);
layoutTimeBox->setSpacing(KDialog::spacingHintSmall());
layoutTimeBox->setColStretch( 1, 1 );
mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame);
layoutTimeBox->addWidget(mDueCheck,1,0);
connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool)));
connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm()));
mDueDateEdit = new KDateEdit(timeBoxFrame);
layoutTimeBox->addWidget(mDueDateEdit,1,1);
mDueTimeEdit = new KOTimeEdit(timeBoxFrame);
layoutTimeBox->addWidget(mDueTimeEdit,1,2);
mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame);
layoutTimeBox->addWidget(mStartCheck,0,0);
connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 75dae34..9ede543 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -87,84 +87,90 @@ void KOEventEditor::init()
void KOEventEditor::reload()
{
if ( mEvent ) readEvent( mEvent );
}
void KOEventEditor::setSecrecy( int sec )
{
mGeneral->setSecrecy( sec );
}
void KOEventEditor::setCategories( QString s )
{
mGeneral->setCategories(s);
}
void KOEventEditor::setupGeneral()
{
mGeneral = new KOEditorGeneralEvent( this, "KOEditorGeneralEvent" );
connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
if( KOPrefs::instance()->mCompactDialogs ) {
QFrame *topFrame = addPage(i18n("General"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint()-1);
topLayout->setMargin(marginHint()-1);
+ topLayout->addStretch ( 1 );
mGeneral->initHeader(topFrame,topLayout);
+ topLayout->addStretch ( 1 );
mGeneral->initTime(topFrame,topLayout);
+ topLayout->addStretch ( 1 );
// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,topLayout);
+ topLayout->addStretch ( 1 );
mGeneral->enableAlarm( false );
QBoxLayout *buttonLayout;
if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
buttonLayout = new QVBoxLayout( topLayout );
else
buttonLayout = new QHBoxLayout( topLayout );
QHBox* buttonWidget = new QHBox (topFrame);
QIconSet icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileexport16");
else
icon = SmallIcon("fileexport");
QPushButton * loadTemplate = new QPushButton( buttonWidget);
QPushButton * saveTemplate = new QPushButton( buttonWidget);
saveTemplate->setIconSet (icon ) ;
int size = saveTemplate->sizeHint().height();
saveTemplate->setFixedSize( size, size );
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
icon = SmallIcon("fileimport");
loadTemplate->setIconSet (icon ) ;
loadTemplate->setFixedSize( size, size );
buttonLayout->addWidget( buttonWidget );
mGeneral->initCategories( topFrame, buttonLayout );
topLayout->addStretch( 1 );
QFrame *topFrame2 = addPage(i18n("Details"));
QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
+ topLayout2->setSpacing(spacingHint()-1);
+ topLayout2->setMargin(marginHint()-1);
topLayout2->setSpacing(spacingHint());
mGeneral->initClass(topFrame2,topLayout2);
mGeneral->initSecrecy( topFrame2, topLayout2 );
mGeneral->initDescription(topFrame2,topLayout2);
connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
} else {
QFrame *topFrame = addPage(i18n("General"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
mGeneral->initHeader(topFrame,topLayout);
mGeneral->initTime(topFrame,topLayout);
QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,alarmLineLayout);
mGeneral->initClass(topFrame,alarmLineLayout);
mGeneral->initDescription(topFrame,topLayout);
QBoxLayout *detailsLayout = new QHBoxLayout(topLayout);
mGeneral->initCategories( topFrame, detailsLayout );
mGeneral->initSecrecy( topFrame, detailsLayout );
}
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 9813a80..9bc0302 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -65,49 +65,49 @@ KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
// }
setButtonText( User1, saveTemplateText );
//mCategoryDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), this );
// KOGlobals::fitDialogToScreen( mCategoryDialog );
//connect(mCategoryDialog,SIGNAL(editCategories()),SIGNAL(editCategories()));
//connect( this, SIGNAL( defaultClicked() ), SLOT( slotLoadTemplate() ) );
// connect( this, SIGNAL( user1Clicked() ), SLOT( slotSaveTemplate() ) );
connect( this, SIGNAL( user1Clicked() ), SLOT( slotShowIncidence() ) );
}
KOIncidenceEditor::~KOIncidenceEditor()
{
//delete mCategoryDialog;
}
void KOIncidenceEditor::setupAttendeesTab()
{
QFrame *topFrame = addPage(i18n("Attendees"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
- mDetails = new KOEditorDetails(spacingHint(),topFrame);
+ mDetails = new KOEditorDetails(spacingHint()-2,topFrame);
topLayout->addWidget(mDetails);
}
void KOIncidenceEditor::slotApply()
{
processInput( false );
}
void KOIncidenceEditor::accept()
{
slotOk();
}
void KOIncidenceEditor::slotOk()
{
if ( processInput( false ) ) QDialog::accept();
}
void KOIncidenceEditor::updateCategoryConfig()
{
qDebug("KOIncidenceEditor::updateCategoryConfig() is dead! ");
//mCategoryDialog->updateCategoryConfig();
}
void KOIncidenceEditor::slotCancel()
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 8b90ae5..555c1b1 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -99,51 +99,55 @@ void KOTodoEditor::reload()
{
if ( mTodo ) readTodo( mTodo );
}
void KOTodoEditor::setupGeneral()
{
mGeneral = new KOEditorGeneralTodo(this);
connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
// connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show()));
//connect(mCategoryDialog, SIGNAL(categoriesSelected(const QString &)),
// mGeneral,SLOT(setCategories(const QString &)));
if (KOPrefs::instance()->mCompactDialogs) {
QFrame *topFrame = addPage(i18n("General"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
if ( QApplication::desktop()->width() < 480 ) {
topLayout->setMargin(marginHintSmall());
topLayout->setSpacing(spacingHintSmall());
} else {
topLayout->setMargin(marginHint());
topLayout->setSpacing(spacingHint());
}
+ topLayout->addStretch( 1 );
mGeneral->initHeader(topFrame,topLayout);
+ topLayout->addStretch( 1 );
mGeneral->initTime(topFrame,topLayout);
+ topLayout->addStretch( 1 );
mGeneral->initAlarm(topFrame,topLayout);
+ topLayout->addStretch( 1 );
mGeneral->enableAlarm( false );
QBoxLayout *priorityLayout;
if ( QApplication::desktop()->width() < 500 )
priorityLayout = new QVBoxLayout( topLayout );
else
priorityLayout = new QHBoxLayout( topLayout );
QWidget* prioWidget = new QWidget (topFrame);
priorityLayout->addWidget( prioWidget );
QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget);
QIconSet icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
icon = SmallIcon("fileimport");
QPushButton * loadTemplate = new QPushButton( prioWidget);
loadTemplate->setIconSet (icon ) ;
int size = loadTemplate->sizeHint().height();
loadTemplate->setFixedSize( size, size );
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileexport16");