Undeg HARD dev - calendar dialog for helping CSV exporter
This commit is contained in:
parent
df791d62b4
commit
bc7d61fa38
|
@ -13,7 +13,8 @@ CONFIG += console
|
||||||
|
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
main/mainscreen.ui
|
main/mainscreen.ui \
|
||||||
|
src/jceData/Calendar/calendardialog.ui
|
||||||
|
|
||||||
OTHER_FILES +=
|
OTHER_FILES +=
|
||||||
|
|
||||||
|
@ -38,7 +39,8 @@ HEADERS += \
|
||||||
src/jceData/Calendar/calendarCourse.h \
|
src/jceData/Calendar/calendarCourse.h \
|
||||||
src/jceData/Calendar/calendarSchedule.h \
|
src/jceData/Calendar/calendarSchedule.h \
|
||||||
src/jceData/CSV/csv_exporter.h \
|
src/jceData/CSV/csv_exporter.h \
|
||||||
src/appDatabase/simplecrypt.h
|
src/appDatabase/simplecrypt.h \
|
||||||
|
src/jceData/Calendar/calendardialog.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
main/CalendarTab/CalendarManager.cpp \
|
main/CalendarTab/CalendarManager.cpp \
|
||||||
|
@ -57,5 +59,6 @@ SOURCES += \
|
||||||
src/jceData/Calendar/calendarCourse.cpp \
|
src/jceData/Calendar/calendarCourse.cpp \
|
||||||
src/jceData/Calendar/calendarSchedule.cpp \
|
src/jceData/Calendar/calendarSchedule.cpp \
|
||||||
src/jceData/CSV/csv_exporter.cpp \
|
src/jceData/CSV/csv_exporter.cpp \
|
||||||
src/appDatabase/simplecrypt.cpp
|
src/appDatabase/simplecrypt.cpp \
|
||||||
|
src/jceData/Calendar/calendardialog.cpp
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "./src/jceData/Calendar/calendarPage.h"
|
#include "./src/jceData/Calendar/calendarPage.h"
|
||||||
#include "./src/jceData/Calendar/calendarSchedule.h"
|
#include "./src/jceData/Calendar/calendarSchedule.h"
|
||||||
#include "./src/jceData/CSV/csv_exporter.h"
|
#include "./src/jceData/CSV/csv_exporter.h"
|
||||||
|
#include "./src/jceData/Calendar/calendardialog.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
@ -21,6 +22,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
calendarSchedule * caliSchedPtr;
|
calendarSchedule * caliSchedPtr;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CALENDARMANAGER_H
|
#endif // CALENDARMANAGER_H
|
||||||
|
|
|
@ -337,8 +337,15 @@ void MainScreen::on_actionHow_To_triggered()
|
||||||
void MainScreen::on_exportToCVSBtn_clicked()
|
void MainScreen::on_exportToCVSBtn_clicked()
|
||||||
{
|
{
|
||||||
if (loginHandel->isLoggedInFlag())
|
if (loginHandel->isLoggedInFlag())
|
||||||
|
{
|
||||||
|
CalendarDialog calDialog;
|
||||||
|
int buttonClicked = calDialog.exec();
|
||||||
|
if(buttonClicked == 0)
|
||||||
|
return;
|
||||||
|
//calDialog.getStartDate(),calDialog.getEndDate()
|
||||||
this->calendar->exportCalendarCSV();
|
this->calendar->exportCalendarCSV();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainScreen::on_actionHebrew_triggered()
|
void MainScreen::on_actionHebrew_triggered()
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r
|
||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="documentMode">
|
<property name="documentMode">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
|
41
src/jceData/Calendar/calendardialog.cpp
Normal file
41
src/jceData/Calendar/calendardialog.cpp
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#include "calendardialog.h"
|
||||||
|
#include "ui_calendardialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
CalendarDialog::CalendarDialog(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::CalendarDialog)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
ui->calEnd->showToday();
|
||||||
|
ui->calStart->showToday();
|
||||||
|
}
|
||||||
|
|
||||||
|
CalendarDialog::~CalendarDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDate CalendarDialog::getStartDate()
|
||||||
|
{
|
||||||
|
return ui->calStart->selectedDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
QDate CalendarDialog::getEndDate()
|
||||||
|
{
|
||||||
|
return ui->calEnd->selectedDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void CalendarDialog::on_calStart_clicked(const QDate &date)
|
||||||
|
{
|
||||||
|
qDebug() << "FUCK!!!";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CalendarDialog::on_calStart_selectionChanged()
|
||||||
|
{
|
||||||
|
qDebug() << "selection **************************************";
|
||||||
|
}
|
33
src/jceData/Calendar/calendardialog.h
Normal file
33
src/jceData/Calendar/calendardialog.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#ifndef CALENDARDIALOG_H
|
||||||
|
#define CALENDARDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QDate>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CalendarDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CalendarDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit CalendarDialog(QWidget *parent = 0);
|
||||||
|
~CalendarDialog();
|
||||||
|
QDate getStartDate();
|
||||||
|
QDate getEndDate();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_calStart_activated(const QDate &date);
|
||||||
|
|
||||||
|
void on_calStart_selectionChanged();
|
||||||
|
|
||||||
|
void on_calStart_clicked(const QDate &date);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::CalendarDialog *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CALENDARDIALOG_H
|
118
src/jceData/Calendar/calendardialog.ui
Normal file
118
src/jceData/Calendar/calendardialog.ui
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CalendarDialog</class>
|
||||||
|
<widget class="QDialog" name="CalendarDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>671</width>
|
||||||
|
<height>343</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string><h1><b>For The Best CSV Export, Please Enter Correctly</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Semester Starts At:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Semester Ends At:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCalendarWidget" name="calStart"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCalendarWidget" name="calEnd"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_status">
|
||||||
|
<property name="text">
|
||||||
|
<string>[ ! ] Start & End cannot be the same</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>CalendarDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>248</x>
|
||||||
|
<y>254</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>CalendarDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>316</x>
|
||||||
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>274</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
Loading…
Reference in a new issue