Commit 3455e6ba authored by Volker Krause's avatar Volker Krause

Port VisualFreeBusyWidget and SchedulingDialog to QDateTime

parent ecf80942
......@@ -532,8 +532,8 @@ void IncidenceEditorNG::IncidenceAttendee::slotSolveConflictPressed()
mDateTime->startTime(),
duration, mConflictResolver,
mParentWidget));
dialog->slotUpdateIncidenceStartEnd(mDateTime->currentStartDateTime(),
mDateTime->currentEndDateTime());
dialog->slotUpdateIncidenceStartEnd(mDateTime->currentStartDateTime().dateTime(),
mDateTime->currentEndDateTime().dateTime());
if (dialog->exec() == QDialog::Accepted) {
qCDebug(INCIDENCEEDITOR_LOG) << dialog->selectedStartDate() << dialog->selectedStartTime();
if (dialog->selectedStartDate().isValid() && dialog->selectedStartTime().isValid()) {
......
......@@ -102,8 +102,8 @@ SchedulingDialog::~SchedulingDialog()
{
}
void SchedulingDialog::slotUpdateIncidenceStartEnd(const KDateTime &startDateTime,
const KDateTime &endDateTime)
void SchedulingDialog::slotUpdateIncidenceStartEnd(const QDateTime &startDateTime,
const QDateTime &endDateTime)
{
mVisualWidget->slotUpdateIncidenceStartEnd(startDateTime, endDateTime);
}
......
......@@ -24,7 +24,7 @@
#include "ui_schedulingdialog.h"
#include <QDialog>
#include <KDateTime>
#include <QDateTime>
namespace CalendarSupport {
class FreePeriodModel;
......@@ -46,7 +46,7 @@ public:
QTime selectedStartTime() const;
public Q_SLOTS:
void slotUpdateIncidenceStartEnd(const KDateTime &startDateTime, const KDateTime &endDateTime);
void slotUpdateIncidenceStartEnd(const QDateTime &startDateTime, const QDateTime &endDateTime);
Q_SIGNALS:
void startDateChanged(const QDate &newDate);
......
......@@ -295,12 +295,12 @@ void VisualFreeBusyWidget::showAttendeeStatusMenu()
void VisualFreeBusyWidget::slotCenterOnStart()
{
KGantt::DateTimeGrid *grid = static_cast<KGantt::DateTimeGrid *>(mGanttGraphicsView->grid());
int daysTo = grid->startDateTime().daysTo(mDtStart.dateTime());
int daysTo = grid->startDateTime().daysTo(mDtStart);
mGanttGraphicsView->horizontalScrollBar()->setValue(daysTo * 800);
}
void VisualFreeBusyWidget::slotIntervalColorRectangleMoved(const KDateTime &start,
const KDateTime &end)
void VisualFreeBusyWidget::slotIntervalColorRectangleMoved(const QDateTime &start,
const QDateTime &end)
{
mDtStart = start;
mDtEnd = end;
......@@ -323,8 +323,8 @@ void VisualFreeBusyWidget::slotScaleChanged(int newScale)
mGanttGrid->setScale((KGantt::DateTimeGrid::Scale)value);
}
void VisualFreeBusyWidget::slotUpdateIncidenceStartEnd(const KDateTime &dtFrom,
const KDateTime &dtTo)
void VisualFreeBusyWidget::slotUpdateIncidenceStartEnd(const QDateTime &dtFrom,
const QDateTime &dtTo)
{
mDtStart = dtFrom;
mDtEnd = dtTo;
......
......@@ -21,8 +21,7 @@
#ifndef INCIDENCEEDITOR_VISUALFREEBUSYWIDGET_H
#define INCIDENCEEDITOR_VISUALFREEBUSYWIDGET_H
#include <KDateTime>
#include <QDateTime>
#include <QWidget>
namespace KGantt {
......@@ -50,10 +49,10 @@ public:
~VisualFreeBusyWidget();
public Q_SLOTS:
void slotUpdateIncidenceStartEnd(const KDateTime &, const KDateTime &);
void slotUpdateIncidenceStartEnd(const QDateTime &, const QDateTime &);
Q_SIGNALS:
void dateTimesChanged(const KDateTime &, const KDateTime &);
void dateTimesChanged(const QDateTime &, const QDateTime &);
void manualReload();
protected Q_SLOTS:
......@@ -62,7 +61,7 @@ protected Q_SLOTS:
void slotZoomToTime();
void slotPickDate();
void showAttendeeStatusMenu();
void slotIntervalColorRectangleMoved(const KDateTime &start, const KDateTime &end);
void slotIntervalColorRectangleMoved(const QDateTime &start, const QDateTime &end);
private:
void splitterMoved();
......@@ -74,7 +73,7 @@ private:
KComboBox *mScaleCombo = nullptr;
FreeBusyGanttProxyModel *mModel = nullptr;
KDateTime mDtStart, mDtEnd;
QDateTime mDtStart, mDtEnd;
};
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment