Update Plangrid to make each Box 2h
This commit is contained in:
@@ -417,6 +417,16 @@ CMakeFiles/EinsatzplanQT.dir/EinsatzplanQT_autogen/mocs_compilation.cpp.o: \
|
|||||||
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/B7S36HPG3O/../../../src/View/EinsatzplanFrame/../../Controller/EinsatzplanFrameController/EinsatzplanFrameController.hpp \
|
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/B7S36HPG3O/../../../src/View/EinsatzplanFrame/../../Controller/EinsatzplanFrameController/EinsatzplanFrameController.hpp \
|
||||||
/usr/include/x86_64-linux-gnu/qt6/QtCore/QString \
|
/usr/include/x86_64-linux-gnu/qt6/QtCore/QString \
|
||||||
/usr/include/x86_64-linux-gnu/qt6/QtCore/qstring.h \
|
/usr/include/x86_64-linux-gnu/qt6/QtCore/qstring.h \
|
||||||
|
/usr/include/c++/11/iostream /usr/include/c++/11/ostream \
|
||||||
|
/usr/include/c++/11/ios /usr/include/c++/11/bits/basic_ios.h \
|
||||||
|
/usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \
|
||||||
|
/usr/include/wctype.h /usr/include/x86_64-linux-gnu/bits/wctype-wchar.h \
|
||||||
|
/usr/include/x86_64-linux-gnu/c++/11/bits/ctype_base.h \
|
||||||
|
/usr/include/x86_64-linux-gnu/c++/11/bits/ctype_inline.h \
|
||||||
|
/usr/include/c++/11/bits/locale_facets.tcc \
|
||||||
|
/usr/include/c++/11/bits/basic_ios.tcc \
|
||||||
|
/usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \
|
||||||
|
/usr/include/c++/11/bits/istream.tcc \
|
||||||
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/2XIRNZAGIE/moc_EinsatzplanWindow.cpp \
|
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/2XIRNZAGIE/moc_EinsatzplanWindow.cpp \
|
||||||
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/2XIRNZAGIE/../../../src/View/EinsatzplanWindow/EinsatzplanWindow.hpp \
|
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/2XIRNZAGIE/../../../src/View/EinsatzplanWindow/EinsatzplanWindow.hpp \
|
||||||
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/62475FYGHL/moc_PlanGrid.cpp \
|
/home/aj/Dokumente/Studium/Studium\ Dokumente/4.\ Semester/SWE/EinsatzplanQT/build/EinsatzplanQT_autogen/62475FYGHL/moc_PlanGrid.cpp \
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ void EinsatzplanFrameController::createMember(QString name, QString email, QStri
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void EinsatzplanFrameController::createVeranstaltung(QString name, QString raum, QString campus, QString begin, QString ende){
|
void EinsatzplanFrameController::createVeranstaltung(QString name, QString raum, QString campus, QString time){
|
||||||
/*
|
/*
|
||||||
DatabaseHandler db = new DatabaseHandler();
|
DatabaseHandler db = new DatabaseHandler();
|
||||||
db.executeQuery()
|
db.executeQuery()
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ public:
|
|||||||
void deleteMember(QString id);
|
void deleteMember(QString id);
|
||||||
void deleteVeranstaltung(QString veranstaltungsname);
|
void deleteVeranstaltung(QString veranstaltungsname);
|
||||||
void createMember(QString name, QString email, QString passwort, bool admin);
|
void createMember(QString name, QString email, QString passwort, bool admin);
|
||||||
void createVeranstaltung(QString name, QString raum, QString campus, QString begin, QString ende);
|
void createVeranstaltung(QString name, QString raum, QString campus, QString time);
|
||||||
};
|
};
|
||||||
@@ -217,9 +217,8 @@ void EinsatzplanFrame::createVeranstaltung(){
|
|||||||
QString name = dialog.getName();
|
QString name = dialog.getName();
|
||||||
QString raum = dialog.getRaum();
|
QString raum = dialog.getRaum();
|
||||||
QString campus = dialog.getCampus();
|
QString campus = dialog.getCampus();
|
||||||
QString begin = dialog.getBegin();
|
QString time = dialog.getTime();
|
||||||
QString ende = dialog.getEnde();
|
controller_m->createVeranstaltung(name,raum, campus, time);
|
||||||
controller_m->createVeranstaltung(name,raum, campus, begin, ende);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +389,7 @@ bool createMemDialog::isAdmin() const {
|
|||||||
createVerDialog::createVerDialog(QWidget* parent)
|
createVerDialog::createVerDialog(QWidget* parent)
|
||||||
: QDialog(parent) {
|
: QDialog(parent) {
|
||||||
setWindowTitle("Veranstaltung Hinzufügen");
|
setWindowTitle("Veranstaltung Hinzufügen");
|
||||||
setFixedSize(300,440);
|
setFixedSize(300,400);
|
||||||
setObjectName("createMemDialog");
|
setObjectName("createMemDialog");
|
||||||
setStyleSheet(R"(
|
setStyleSheet(R"(
|
||||||
#createMemDialog{
|
#createMemDialog{
|
||||||
@@ -455,51 +454,26 @@ createVerDialog::createVerDialog(QWidget* parent)
|
|||||||
)");
|
)");
|
||||||
layout->addWidget(campus_m,1,Qt::AlignCenter);
|
layout->addWidget(campus_m,1,Qt::AlignCenter);
|
||||||
|
|
||||||
begin_m = new QComboBox(this);
|
time_m = new QComboBox(this);
|
||||||
begin_m->addItem("08:00");
|
time_m->addItem("2h");
|
||||||
begin_m->addItem("10:00");
|
time_m->addItem("4h");
|
||||||
begin_m->addItem("12:00");
|
time_m->setFixedSize(220,40);
|
||||||
begin_m->addItem("14:00");
|
time_m->setObjectName("time");
|
||||||
begin_m->addItem("16:00");
|
time_m->setStyleSheet(R"(
|
||||||
begin_m->setFixedSize(220,40);
|
#time{
|
||||||
begin_m->setObjectName("begin");
|
|
||||||
begin_m->setStyleSheet(R"(
|
|
||||||
#begin{
|
|
||||||
color: #DADADA;
|
color: #DADADA;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
background-color: #313131;
|
background-color: #313131;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
#begin::Item{
|
#time::Item{
|
||||||
color: #DADADA;
|
color: #DADADA;
|
||||||
background-color: #313131;
|
background-color: #313131;
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
layout->addWidget(begin_m,1,Qt::AlignCenter);
|
layout->addWidget(time_m,1,Qt::AlignCenter);
|
||||||
|
|
||||||
ende_m = new QComboBox(this);
|
|
||||||
ende_m->addItem("10:00");
|
|
||||||
ende_m->addItem("12:00");
|
|
||||||
ende_m->addItem("14:00");
|
|
||||||
ende_m->addItem("16:00");
|
|
||||||
ende_m->addItem("18:00");
|
|
||||||
ende_m->setFixedSize(220,40);
|
|
||||||
ende_m->setObjectName("ende");
|
|
||||||
ende_m->setStyleSheet(R"(
|
|
||||||
#ende{
|
|
||||||
color: #DADADA;
|
|
||||||
font-size: 16px;
|
|
||||||
background-color: #313131;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
#ende::Item{
|
|
||||||
color: #DADADA;
|
|
||||||
background-color: #313131;
|
|
||||||
}
|
|
||||||
)");
|
|
||||||
layout->addWidget(ende_m,1,Qt::AlignCenter);
|
|
||||||
|
|
||||||
QHBoxLayout* buttonLayout = new QHBoxLayout();
|
QHBoxLayout* buttonLayout = new QHBoxLayout();
|
||||||
|
|
||||||
@@ -550,10 +524,6 @@ QString createVerDialog::getCampus() const {
|
|||||||
return campus_m->currentText();
|
return campus_m->currentText();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString createVerDialog::getBegin() const {
|
QString createVerDialog::getTime() const{
|
||||||
return begin_m->currentText();
|
return time_m->currentText();
|
||||||
}
|
|
||||||
|
|
||||||
QString createVerDialog::getEnde() const {
|
|
||||||
return ende_m->currentText();
|
|
||||||
}
|
}
|
||||||
@@ -50,8 +50,7 @@ class createVerDialog : public QDialog{
|
|||||||
QLineEdit* name_m;
|
QLineEdit* name_m;
|
||||||
QLineEdit* raum_m;
|
QLineEdit* raum_m;
|
||||||
QComboBox* campus_m;
|
QComboBox* campus_m;
|
||||||
QComboBox* begin_m;
|
QComboBox* time_m;
|
||||||
QComboBox* ende_m;
|
|
||||||
QPushButton* okButton_m;
|
QPushButton* okButton_m;
|
||||||
QPushButton* cancelButton_m;
|
QPushButton* cancelButton_m;
|
||||||
|
|
||||||
@@ -62,8 +61,7 @@ public:
|
|||||||
QString getName() const;
|
QString getName() const;
|
||||||
QString getRaum() const;
|
QString getRaum() const;
|
||||||
QString getCampus() const;
|
QString getCampus() const;
|
||||||
QString getBegin() const;
|
QString getTime() const;
|
||||||
QString getEnde() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class createMemDialog : public QDialog{
|
class createMemDialog : public QDialog{
|
||||||
|
|||||||
@@ -16,16 +16,11 @@ PlanGrid::PlanGrid(QWidget* parent)
|
|||||||
weekdays[3] = "Donnerstag";
|
weekdays[3] = "Donnerstag";
|
||||||
weekdays[4] = "Freitag";
|
weekdays[4] = "Freitag";
|
||||||
|
|
||||||
times[0] = "8:00 - 9:00";
|
times[0] = "8:00 - 10:00";
|
||||||
times[1] = "9:00 - 10:00";
|
times[1] = "10:00 - 12:00";
|
||||||
times[2] = "10:00 - 11:00";
|
times[2] = "12:00 - 14:00";
|
||||||
times[3] = "11:00 - 12:00";
|
times[3] = "14:00 - 16:00";
|
||||||
times[4] = "12:00 - 13:00";
|
times[4] = "16:00 - 18:00";
|
||||||
times[5] = "13:00 - 14:00";
|
|
||||||
times[6] = "14:00 - 15:00";
|
|
||||||
times[7] = "15:00 - 16:00";
|
|
||||||
times[8] = "16:00 - 17:00";
|
|
||||||
times[9] = "17:00 - 18:00";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -34,7 +29,7 @@ PlanGrid::PlanGrid(QWidget* parent)
|
|||||||
gridLayout = new QGridLayout(this);
|
gridLayout = new QGridLayout(this);
|
||||||
|
|
||||||
for (int i = 0; i < 5; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
for (int j = 0; j < 10; ++j) {
|
for (int j = 0; j < 5; ++j) {
|
||||||
QLabel* temp = new QLabel();
|
QLabel* temp = new QLabel();
|
||||||
temp->setObjectName("temp");
|
temp->setObjectName("temp");
|
||||||
temp->setStyleSheet(R"(
|
temp->setStyleSheet(R"(
|
||||||
@@ -42,7 +37,7 @@ PlanGrid::PlanGrid(QWidget* parent)
|
|||||||
|
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
temp->setFixedSize(240, 50);
|
temp->setFixedSize(240, 100);
|
||||||
planMap->insert(qMakePair(weekdays[i], times[j]), temp);
|
planMap->insert(qMakePair(weekdays[i], times[j]), temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,9 +82,9 @@ PlanGrid::PlanGrid(QWidget* parent)
|
|||||||
gridLayout->addWidget(temp, 0, i + 1);
|
gridLayout->addWidget(temp, 0, i + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
QLabel* temp = new QLabel(times[i]);
|
QLabel* temp = new QLabel(times[i]);
|
||||||
temp->setFixedSize(130,50);
|
temp->setFixedSize(130,100);
|
||||||
temp->setObjectName("temp");
|
temp->setObjectName("temp");
|
||||||
if (i == 9) {
|
if (i == 9) {
|
||||||
temp->setStyleSheet(R"(
|
temp->setStyleSheet(R"(
|
||||||
@@ -119,9 +114,9 @@ PlanGrid::PlanGrid(QWidget* parent)
|
|||||||
|
|
||||||
void PlanGrid::populateGrid( ) {
|
void PlanGrid::populateGrid( ) {
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
for (int j = 0; j < 10; ++j) {
|
for (int j = 0; j < 5; ++j) {
|
||||||
gridLayout->addWidget(planMap->value(qMakePair(weekdays[i], times[j])), j + 1, i + 1);
|
gridLayout->addWidget(planMap->value(qMakePair(weekdays[i], times[j])), j + 1, i + 1);
|
||||||
if (i == 4 && j == 9) {
|
if (i == 4 && j == 4) {
|
||||||
(planMap->value(qMakePair(weekdays[i], times[j])))->setStyleSheet(R"(
|
(planMap->value(qMakePair(weekdays[i], times[j])))->setStyleSheet(R"(
|
||||||
border-bottom-right-radius:10px;
|
border-bottom-right-radius:10px;
|
||||||
)");
|
)");
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class PlanGrid : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QString weekdays[5];
|
QString weekdays[5];
|
||||||
QString times[10];
|
QString times[5];
|
||||||
|
|
||||||
void populateGrid();
|
void populateGrid();
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user