Diffstat (limited to 'korganizer/koeventeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventeditor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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() | |||
87 | void KOEventEditor::reload() | 87 | void KOEventEditor::reload() |
88 | { | 88 | { |
89 | if ( mEvent ) readEvent( mEvent ); | 89 | if ( mEvent ) readEvent( mEvent ); |
90 | } | 90 | } |
91 | 91 | ||
92 | void KOEventEditor::setSecrecy( int sec ) | 92 | void KOEventEditor::setSecrecy( int sec ) |
93 | { | 93 | { |
94 | mGeneral->setSecrecy( sec ); | 94 | mGeneral->setSecrecy( sec ); |
95 | } | 95 | } |
96 | void KOEventEditor::setCategories( QString s ) | 96 | void KOEventEditor::setCategories( QString s ) |
97 | { | 97 | { |
98 | mGeneral->setCategories(s); | 98 | mGeneral->setCategories(s); |
99 | 99 | ||
100 | } | 100 | } |
101 | void KOEventEditor::setupGeneral() | 101 | void KOEventEditor::setupGeneral() |
102 | { | 102 | { |
103 | mGeneral = new KOEditorGeneralEvent( this, "KOEditorGeneralEvent" ); | 103 | mGeneral = new KOEditorGeneralEvent( this, "KOEditorGeneralEvent" ); |
104 | connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); | 104 | connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); |
105 | 105 | ||
106 | if( KOPrefs::instance()->mCompactDialogs ) { | 106 | if( KOPrefs::instance()->mCompactDialogs ) { |
107 | QFrame *topFrame = addPage(i18n("General")); | 107 | QFrame *topFrame = addPage(i18n("General")); |
108 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); | 108 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); |
109 | topLayout->setSpacing(spacingHint()-1); | 109 | topLayout->setSpacing(spacingHint()-1); |
110 | topLayout->setMargin(marginHint()-1); | 110 | topLayout->setMargin(marginHint()-1); |
111 | topLayout->addStretch ( 1 ); | ||
111 | mGeneral->initHeader(topFrame,topLayout); | 112 | mGeneral->initHeader(topFrame,topLayout); |
113 | topLayout->addStretch ( 1 ); | ||
112 | mGeneral->initTime(topFrame,topLayout); | 114 | mGeneral->initTime(topFrame,topLayout); |
115 | topLayout->addStretch ( 1 ); | ||
113 | // QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); | 116 | // QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); |
114 | mGeneral->initAlarm(topFrame,topLayout); | 117 | mGeneral->initAlarm(topFrame,topLayout); |
118 | topLayout->addStretch ( 1 ); | ||
115 | mGeneral->enableAlarm( false ); | 119 | mGeneral->enableAlarm( false ); |
116 | 120 | ||
117 | QBoxLayout *buttonLayout; | 121 | QBoxLayout *buttonLayout; |
118 | if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 ) | 122 | if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 ) |
119 | buttonLayout = new QVBoxLayout( topLayout ); | 123 | buttonLayout = new QVBoxLayout( topLayout ); |
120 | else | 124 | else |
121 | buttonLayout = new QHBoxLayout( topLayout ); | 125 | buttonLayout = new QHBoxLayout( topLayout ); |
122 | QHBox* buttonWidget = new QHBox (topFrame); | 126 | QHBox* buttonWidget = new QHBox (topFrame); |
123 | QIconSet icon; | 127 | QIconSet icon; |
124 | if ( QApplication::desktop()->width() < 321 ) | 128 | if ( QApplication::desktop()->width() < 321 ) |
125 | icon = SmallIcon("fileexport16"); | 129 | icon = SmallIcon("fileexport16"); |
126 | else | 130 | else |
127 | icon = SmallIcon("fileexport"); | 131 | icon = SmallIcon("fileexport"); |
128 | QPushButton * loadTemplate = new QPushButton( buttonWidget); | 132 | QPushButton * loadTemplate = new QPushButton( buttonWidget); |
129 | QPushButton * saveTemplate = new QPushButton( buttonWidget); | 133 | QPushButton * saveTemplate = new QPushButton( buttonWidget); |
130 | saveTemplate->setIconSet (icon ) ; | 134 | saveTemplate->setIconSet (icon ) ; |
131 | int size = saveTemplate->sizeHint().height(); | 135 | int size = saveTemplate->sizeHint().height(); |
132 | saveTemplate->setFixedSize( size, size ); | 136 | saveTemplate->setFixedSize( size, size ); |
133 | if ( QApplication::desktop()->width() < 321 ) | 137 | if ( QApplication::desktop()->width() < 321 ) |
134 | icon = SmallIcon("fileimport16"); | 138 | icon = SmallIcon("fileimport16"); |
135 | else | 139 | else |
136 | icon = SmallIcon("fileimport"); | 140 | icon = SmallIcon("fileimport"); |
137 | loadTemplate->setIconSet (icon ) ; | 141 | loadTemplate->setIconSet (icon ) ; |
138 | loadTemplate->setFixedSize( size, size ); | 142 | loadTemplate->setFixedSize( size, size ); |
139 | buttonLayout->addWidget( buttonWidget ); | 143 | buttonLayout->addWidget( buttonWidget ); |
140 | mGeneral->initCategories( topFrame, buttonLayout ); | 144 | mGeneral->initCategories( topFrame, buttonLayout ); |
141 | 145 | ||
142 | topLayout->addStretch( 1 ); | 146 | topLayout->addStretch( 1 ); |
143 | 147 | ||
144 | QFrame *topFrame2 = addPage(i18n("Details")); | 148 | QFrame *topFrame2 = addPage(i18n("Details")); |
145 | 149 | ||
146 | QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); | 150 | QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); |
151 | topLayout2->setSpacing(spacingHint()-1); | ||
152 | topLayout2->setMargin(marginHint()-1); | ||
147 | topLayout2->setSpacing(spacingHint()); | 153 | topLayout2->setSpacing(spacingHint()); |
148 | 154 | ||
149 | mGeneral->initClass(topFrame2,topLayout2); | 155 | mGeneral->initClass(topFrame2,topLayout2); |
150 | mGeneral->initSecrecy( topFrame2, topLayout2 ); | 156 | mGeneral->initSecrecy( topFrame2, topLayout2 ); |
151 | mGeneral->initDescription(topFrame2,topLayout2); | 157 | mGeneral->initDescription(topFrame2,topLayout2); |
152 | 158 | ||
153 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); | 159 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); |
154 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); | 160 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); |
155 | } else { | 161 | } else { |
156 | QFrame *topFrame = addPage(i18n("General")); | 162 | QFrame *topFrame = addPage(i18n("General")); |
157 | 163 | ||
158 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); | 164 | QBoxLayout *topLayout = new QVBoxLayout(topFrame); |
159 | topLayout->setSpacing(spacingHint()); | 165 | topLayout->setSpacing(spacingHint()); |
160 | 166 | ||
161 | mGeneral->initHeader(topFrame,topLayout); | 167 | mGeneral->initHeader(topFrame,topLayout); |
162 | mGeneral->initTime(topFrame,topLayout); | 168 | mGeneral->initTime(topFrame,topLayout); |
163 | QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); | 169 | QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); |
164 | mGeneral->initAlarm(topFrame,alarmLineLayout); | 170 | mGeneral->initAlarm(topFrame,alarmLineLayout); |
165 | mGeneral->initClass(topFrame,alarmLineLayout); | 171 | mGeneral->initClass(topFrame,alarmLineLayout); |
166 | mGeneral->initDescription(topFrame,topLayout); | 172 | mGeneral->initDescription(topFrame,topLayout); |
167 | QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); | 173 | QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); |
168 | mGeneral->initCategories( topFrame, detailsLayout ); | 174 | mGeneral->initCategories( topFrame, detailsLayout ); |
169 | mGeneral->initSecrecy( topFrame, detailsLayout ); | 175 | mGeneral->initSecrecy( topFrame, detailsLayout ); |
170 | } | 176 | } |