author | zautrix <zautrix> | 2005-07-04 11:32:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-04 11:32:53 (UTC) |
commit | 172078c08cd183e9f7ec913a9bf42426e3585b78 (patch) (unidiff) | |
tree | d0f82f7495287ca23db2faf0ed541dc42b087464 /korganizer | |
parent | e19b410f43c4fcf35d3d62fc312d1b5251068691 (diff) | |
download | kdepimpi-172078c08cd183e9f7ec913a9bf42426e3585b78.zip kdepimpi-172078c08cd183e9f7ec913a9bf42426e3585b78.tar.gz kdepimpi-172078c08cd183e9f7ec913a9bf42426e3585b78.tar.bz2 |
layout fix
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 753630b..407a5d5 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -104,49 +104,50 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) | |||
104 | headerLayout->addWidget(locationLabel,0,2); | 104 | headerLayout->addWidget(locationLabel,0,2); |
105 | else | 105 | else |
106 | headerLayout->addWidget(locationLabel,1,0); | 106 | headerLayout->addWidget(locationLabel,1,0); |
107 | 107 | ||
108 | mLocationEdit = new KOLocationBox(TRUE,parent,10); | 108 | mLocationEdit = new KOLocationBox(TRUE,parent,10); |
109 | mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); | 109 | mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); |
110 | if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->height() > 240 ) | 110 | if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->height() > 240 ) |
111 | mLocationEdit->setMaximumHeight( hei + 6); | 111 | mLocationEdit->setMaximumHeight( hei + 6); |
112 | 112 | ||
113 | // mLocationEdit = new QLineEdit(parent); | 113 | // mLocationEdit = new QLineEdit(parent); |
114 | connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); | 114 | connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); |
115 | 115 | ||
116 | mCalendarBox = new QComboBox ( parent ); | 116 | mCalendarBox = new QComboBox ( parent ); |
117 | mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); | 117 | mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); |
118 | if ( QApplication::desktop()->height() < 320 ) { | 118 | if ( QApplication::desktop()->height() < 320 ) { |
119 | headerLayout->addWidget(mLocationEdit,0,3); | 119 | headerLayout->addWidget(mLocationEdit,0,3); |
120 | headerLayout->addWidget(mCalendarBox,0,4); | 120 | headerLayout->addWidget(mCalendarBox,0,4); |
121 | headerLayout->setColStretch( 1, 10); | 121 | headerLayout->setColStretch( 1, 10); |
122 | headerLayout->setColStretch( 3, 10); | 122 | headerLayout->setColStretch( 3, 10); |
123 | mCalendarBox->setMaximumWidth( 64 ); | 123 | mCalendarBox->setMaximumWidth( 64 ); |
124 | } | 124 | } |
125 | else { | 125 | else { |
126 | headerLayout->addWidget(mLocationEdit,1,1); | 126 | headerLayout->addWidget(mLocationEdit,1,1); |
127 | headerLayout->addWidget(mCalendarBox,1,2); | 127 | headerLayout->addWidget(mCalendarBox,1,2); |
128 | headerLayout->setColStretch( 1, 10); | 128 | headerLayout->setColStretch( 1, 3); |
129 | headerLayout->setColStretch( 2, 1); | ||
129 | } | 130 | } |
130 | 131 | ||
131 | } | 132 | } |
132 | void KOEditorGeneral::setFocusOn( int i ) | 133 | void KOEditorGeneral::setFocusOn( int i ) |
133 | { | 134 | { |
134 | mNextFocus = i; | 135 | mNextFocus = i; |
135 | QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); | 136 | QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); |
136 | } | 137 | } |
137 | void KOEditorGeneral::slotSetFocusOn() | 138 | void KOEditorGeneral::slotSetFocusOn() |
138 | { | 139 | { |
139 | mNextFocus; | 140 | mNextFocus; |
140 | if ( mNextFocus == 1 ) { | 141 | if ( mNextFocus == 1 ) { |
141 | mDescriptionEdit->setFocus(); | 142 | mDescriptionEdit->setFocus(); |
142 | mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); | 143 | mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); |
143 | } | 144 | } |
144 | if ( mNextFocus == 2 ) { | 145 | if ( mNextFocus == 2 ) { |
145 | mSummaryEdit->setFocus(); | 146 | mSummaryEdit->setFocus(); |
146 | } | 147 | } |
147 | } | 148 | } |
148 | void KOEditorGeneral::editCategories() | 149 | void KOEditorGeneral::editCategories() |
149 | { | 150 | { |
150 | // qDebug("KOEditorGeneral::editCategories() "); | 151 | // qDebug("KOEditorGeneral::editCategories() "); |
151 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); | 152 | KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); |
152 | connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); | 153 | connect(csd,SIGNAL(categoriesSelected(const QString &)), this ,SLOT(setCategories(const QString &))); |