summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-30 07:32:03 (UTC)
committer zautrix <zautrix>2005-04-30 07:32:03 (UTC)
commit7c31102a00920834ab8e3778f0f459b96b2fb309 (patch) (side-by-side diff)
tree9f238caaaab4ba150e4f14708d85162af0ea5092 /korganizer
parentbdaded2da25b0ccef80d6e638fa12f92a4f8744d (diff)
downloadkdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.zip
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.gz
kdepimpi-7c31102a00920834ab8e3778f0f459b96b2fb309.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp28
-rw-r--r--korganizer/koeditorgeneral.cpp10
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--korganizer/kotodoeditor.cpp2
-rw-r--r--korganizer/searchdialog.cpp4
5 files changed, 42 insertions, 6 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 802261c..bdfc637 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -79,26 +79,28 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
topLayout->setSpacing(spacing);
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 ) {
- //mListView->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
- mListView->setFixedHeight(80);
+ 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 )));
mRsvpButton = new QCheckBox(this);
mRsvpButton->setText(i18n("Request response"));
mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
@@ -138,65 +140,83 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
buttonLayout->addWidget(newButton);
connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
buttonLayout->addWidget(mRemoveButton);
connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee()));
// buttonLayout->addWidget(mAddressBookButton);
connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
//mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
-
+ if ( QApplication::desktop()->height() <= 240 ) {
+ mRoleCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
+ mStatusCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Minimum ,FALSE) );
+ topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
+ topLayout->addMultiCellWidget(mListView,1,1,0,5);
+ topLayout->addWidget(attendeeLabel,3,0);
+ topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
+ topLayout->addWidget(emailLabel,4,0);
+ topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
+ topLayout->addWidget(attendeeRoleLabel,5,0);
+ topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
+ topLayout->addWidget(statusLabel,5,3);
+ topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
+ topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,5);
+ topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
+ topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
+ topLayout->setRowStretch(1,5);
+ topLayout->setColStretch(0,0);
+ } else {
if (qApp->desktop()->width() < 640 ) {
if ( qApp->desktop()->width() < 300 )
topLayout->setSpacing(1);
;//mListView->setFixedHeight(80);
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
topLayout->addMultiCellWidget(mListView,1,1,0,3);
topLayout->addWidget(attendeeLabel,3,0);
topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
topLayout->addWidget(emailLabel,4,0);
topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
topLayout->addWidget(attendeeRoleLabel,5,0);
topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
topLayout->addWidget(statusLabel,6,0);
topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
topLayout->setRowStretch(1,2);
topLayout->setColStretch(0,0);
topLayout->setColStretch(1,2);
topLayout->setColStretch(2,1);
topLayout->setColStretch(3,1);
-
} else {
topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
topLayout->addMultiCellWidget(mListView,1,1,0,5);
topLayout->addWidget(attendeeLabel,3,0);
topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
topLayout->addWidget(emailLabel,4,0);
topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
topLayout->addWidget(attendeeRoleLabel,5,0);
topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
topLayout->addWidget(statusLabel,5,3);
topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
topLayout->setRowStretch(1,5);
topLayout->setColStretch(0,0);
}
+ }
// #if 0
// topLayout->setColStretch(2,1);
// topLayout->addWidget(statusLabel,3,3);
// topLayout->addWidget(mStatusCombo,3,4);
// #else
// topLayout->addWidget(statusLabel,4,3);
// // topLayout->addWidget(mStatusCombo,4,3);
// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5);
// #endif
// // topLayout->setRowStretch(5,1);
// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1);
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 0045b7f..bfe0aec 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -84,36 +84,46 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
//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) );
if ( QApplication::desktop()->width() > 320 )
mLocationEdit->setMaximumHeight( hei + 6);
// mLocationEdit = new QLineEdit(parent);
connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
+ if ( QApplication::desktop()->height() < 320 ) {
+ headerLayout->addWidget(mLocationEdit,1,3);
+ headerLayout->setColStretch( 1, 10);
+ headerLayout->setColStretch( 3, 10);
+ }
+ else {
headerLayout->addWidget(mLocationEdit,2,1);
headerLayout->setColStretch( 1, 10);
}
+}
void KOEditorGeneral::setFocusOn( int i )
{
mNextFocus = i;
QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));
}
void KOEditorGeneral::slotSetFocusOn()
{
mNextFocus;
if ( mNextFocus == 1 ) {
mDescriptionEdit->setFocus();
mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
}
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index e23e680..02d4a78 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -45,24 +45,26 @@
#include <libkcal/icalformat.h>
#include "koprefs.h"
#include "koeventeditor.h"
extern int globalFlagBlockAgenda;
KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent ) :
KOIncidenceEditor( i18n("Edit Event"), calendar, parent )
{
mEvent = 0;
init();
+ if ( QApplication::desktop()->height() <= 240 )
+ hideButtons();
}
KOEventEditor::~KOEventEditor()
{
//emit dialogClose( mEvent );
}
void KOEventEditor::init()
{
setupGeneral();
setupAttendeesTab();
@@ -104,25 +106,25 @@ void KOEventEditor::setupGeneral()
if( KOPrefs::instance()->mCompactDialogs ) {
QFrame *topFrame = addPage(i18n("General"));
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint()-1);
topLayout->setMargin(marginHint()-1);
mGeneral->initHeader(topFrame,topLayout);
mGeneral->initTime(topFrame,topLayout);
// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,topLayout);
mGeneral->enableAlarm( false );
QBoxLayout *buttonLayout;
- if ( QApplication::desktop()->width() < 500 )
+ 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 ) ;
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 5513e8b..9073bca 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -50,24 +50,26 @@
#include "kolocationbox.h"
#include "kotodoeditor.h"
extern int globalFlagBlockAgenda;
KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent )
{
mTodo = 0;
mRelatedTodo = 0;
findButton(User1)->hide();
init();
+ if ( QApplication::desktop()->height() <= 240 )
+ hideButtons();
}
KOTodoEditor::~KOTodoEditor()
{
emit dialogClose( mTodo );
}
void KOTodoEditor::init()
{
setupGeneral();
setupAttendeesTab();
setupRecurrence();
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 007d1f3..59bf1a2 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -105,25 +105,27 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
mStartDate = new KDateEdit(rangeWidget);
rangeLayout->addWidget(mStartDate);
rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
mEndDate = new KDateEdit(rangeWidget);
mEndDate->setDate(QDate::currentDate().addDays(365));
rangeLayout->addWidget(mEndDate);
QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
rangeLayout->addWidget( (QWidget*)wt );
layout->addWidget(rangeWidget);
// Results list view
listView = new KOListView(mCalendar,topFrame);
layout->addWidget(listView);
-
+ //layout->setStretchFactor( listView, 333 );
+ //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) );
+ //listView->setMaximumHeight( 50 );
listView->readSettings(KOGlobals::config(),"SearchListView Layout");
connect(searchEdit,SIGNAL(scrollDOWN()),SLOT(setFocusToList()));
setCaption( i18n("KO/Pi Find: "));
#ifdef DESKTOP_VERSION
OkButton = new QPushButton( i18n("Close"), this );
connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
#endif
}
SearchDialog::~SearchDialog()
{