Changeset View
Changeset View
Standalone View
Standalone View
src/calendarview.cpp
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 104 | { | |||
---|---|---|---|---|---|
143 | mSplitterSizesValid = false; | 143 | mSplitterSizesValid = false; | ||
144 | 144 | | |||
145 | mCalPrinter = nullptr; | 145 | mCalPrinter = nullptr; | ||
146 | 146 | | |||
147 | mDateNavigator = new DateNavigator(this); | 147 | mDateNavigator = new DateNavigator(this); | ||
148 | mDateChecker = new DateChecker(this); | 148 | mDateChecker = new DateChecker(this); | ||
149 | 149 | | |||
150 | QVBoxLayout *topLayout = new QVBoxLayout(this); | 150 | QVBoxLayout *topLayout = new QVBoxLayout(this); | ||
151 | topLayout->setMargin(0); | 151 | topLayout->setContentsMargins(0, 0, 0, 0); | ||
152 | 152 | | |||
153 | // create the main layout frames. | 153 | // create the main layout frames. | ||
154 | mPanner = new QSplitter(Qt::Horizontal, this); | 154 | mPanner = new QSplitter(Qt::Horizontal, this); | ||
155 | mPanner->setObjectName(QStringLiteral("CalendarView::Panner")); | 155 | mPanner->setObjectName(QStringLiteral("CalendarView::Panner")); | ||
156 | topLayout->addWidget(mPanner); | 156 | topLayout->addWidget(mPanner); | ||
157 | 157 | | |||
158 | mLeftSplitter = new QSplitter(Qt::Vertical, mPanner); | 158 | mLeftSplitter = new QSplitter(Qt::Vertical, mPanner); | ||
159 | mLeftSplitter->setObjectName(QStringLiteral("CalendarView::LeftFrame")); | 159 | mLeftSplitter->setObjectName(QStringLiteral("CalendarView::LeftFrame")); | ||
160 | // The GUI checkboxes of "show widget XYZ" are confusing when the QSplitter | 160 | // The GUI checkboxes of "show widget XYZ" are confusing when the QSplitter | ||
161 | // hides the widget magically. I know I blamed Akonadi for not showing my | 161 | // hides the widget magically. I know I blamed Akonadi for not showing my | ||
162 | // calendar more than once. | 162 | // calendar more than once. | ||
163 | mLeftSplitter->setChildrenCollapsible(false); | 163 | mLeftSplitter->setChildrenCollapsible(false); | ||
164 | 164 | | |||
165 | mDateNavigatorContainer = new DateNavigatorContainer(mLeftSplitter); | 165 | mDateNavigatorContainer = new DateNavigatorContainer(mLeftSplitter); | ||
166 | mDateNavigatorContainer->setObjectName(QStringLiteral("CalendarView::DateNavigator")); | 166 | mDateNavigatorContainer->setObjectName(QStringLiteral("CalendarView::DateNavigator")); | ||
167 | 167 | | |||
168 | mTodoList = new KOTodoView(true /*sidebar*/, mLeftSplitter); | 168 | mTodoList = new KOTodoView(true /*sidebar*/, mLeftSplitter); | ||
169 | mTodoList->setObjectName(QStringLiteral("todolist")); | 169 | mTodoList->setObjectName(QStringLiteral("todolist")); | ||
170 | 170 | | |||
171 | mEventViewerBox = new QWidget(mLeftSplitter); | 171 | mEventViewerBox = new QWidget(mLeftSplitter); | ||
172 | QVBoxLayout *mEventViewerBoxVBoxLayout = new QVBoxLayout(mEventViewerBox); | 172 | QVBoxLayout *mEventViewerBoxVBoxLayout = new QVBoxLayout(mEventViewerBox); | ||
173 | mEventViewerBoxVBoxLayout->setMargin(0); | 173 | mEventViewerBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); | ||
174 | mEventViewerBoxVBoxLayout->setMargin(0); | 174 | mEventViewerBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); | ||
175 | mEventViewer = new CalendarSupport::IncidenceViewer(mCalendar.data(), mEventViewerBox); | 175 | mEventViewer = new CalendarSupport::IncidenceViewer(mCalendar.data(), mEventViewerBox); | ||
176 | mEventViewer->setObjectName(QStringLiteral("EventViewer")); | 176 | mEventViewer->setObjectName(QStringLiteral("EventViewer")); | ||
177 | mEventViewerBoxVBoxLayout->addWidget(mEventViewer); | 177 | mEventViewerBoxVBoxLayout->addWidget(mEventViewer); | ||
178 | 178 | | |||
179 | QWidget *rightBox = new QWidget(mPanner); | 179 | QWidget *rightBox = new QWidget(mPanner); | ||
180 | QVBoxLayout *rightBoxVBoxLayout = new QVBoxLayout(rightBox); | 180 | QVBoxLayout *rightBoxVBoxLayout = new QVBoxLayout(rightBox); | ||
181 | rightBoxVBoxLayout->setMargin(0); | 181 | rightBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); | ||
182 | mNavigatorBar = new NavigatorBar(rightBox); | 182 | mNavigatorBar = new NavigatorBar(rightBox); | ||
183 | rightBoxVBoxLayout->addWidget(mNavigatorBar); | 183 | rightBoxVBoxLayout->addWidget(mNavigatorBar); | ||
184 | mRightFrame = new QStackedWidget(rightBox); | 184 | mRightFrame = new QStackedWidget(rightBox); | ||
185 | rightBoxVBoxLayout->addWidget(mRightFrame); | 185 | rightBoxVBoxLayout->addWidget(mRightFrame); | ||
186 | mMessageWidget = new CalendarSupport::MessageWidget(rightBox); | 186 | mMessageWidget = new CalendarSupport::MessageWidget(rightBox); | ||
187 | rightBoxVBoxLayout->addWidget(mMessageWidget); | 187 | rightBoxVBoxLayout->addWidget(mMessageWidget); | ||
188 | 188 | | |||
189 | rightBoxVBoxLayout->setStretchFactor(mRightFrame, 1); | 189 | rightBoxVBoxLayout->setStretchFactor(mRightFrame, 1); | ||
▲ Show 20 Lines • Show All 2634 Lines • Show Last 20 Lines |