1 /*************************************************************************** 2 FET 3 ------------------- 4 copyright : (C) by Liviu Lalescu, Volker Dirr 5 email : Liviu Lalescu: see https://lalescu.ro/liviu/ , Volker Dirr: see https://www.timetabling.de/ 6 *************************************************************************** 7 timetableprintform.h - description 8 ------------------- 9 begin : March 2010 10 copyright : (C) by Volker Dirr 11 : https://www.timetabling.de/ 12 *************************************************************************** 13 * * 14 * This program is free software: you can redistribute it and/or modify * 15 * it under the terms of the GNU Affero General Public License as * 16 * published by the Free Software Foundation, either version 3 of the * 17 * License, or (at your option) any later version. * 18 * * 19 ***************************************************************************/ 20 21 #ifndef TIMETABLEPRINTFORM_H 22 #define TIMETABLEPRINTFORM_H 23 24 #include <QObject> 25 #include <QList> 26 27 #include <QTextDocument> //maybe better TextEdit, so you can also edit?! 28 #include <QSpinBox> 29 #include <QDialog> 30 31 #ifndef QT_NO_PRINTER 32 #include <QPrinter> 33 #endif 34 35 class QTableWidget; 36 class QRadioButton; 37 class QCheckBox; 38 class QPushButton; 39 class QTableWidgetItem; 40 class QComboBox; 41 class QGroupBox; 42 class QToolButton; 43 class QSizePolicy; 44 class QListWidget; 45 46 class StartTimetablePrint: public QObject{ 47 Q_OBJECT 48 49 public: 50 StartTimetablePrint(); 51 ~StartTimetablePrint(); 52 53 static void startTimetablePrint(QWidget* parent); 54 }; 55 56 class TimetablePrintForm: public QDialog{ 57 Q_OBJECT 58 59 public: 60 TimetablePrintForm(QWidget* parent); 61 ~TimetablePrintForm(); 62 63 private: 64 QList<int> subgroupsSortedOrder; 65 66 QComboBox* CBTables; 67 QListWidget* namesList; 68 QPushButton* pbSelectAll; 69 QPushButton* pbUnselectAll; 70 71 QGroupBox* actionsBox; 72 QRadioButton* RBDaysHorizontal; 73 QRadioButton* RBDaysVertical; 74 QRadioButton* RBTimeHorizontal; 75 QRadioButton* RBTimeVertical; 76 //By Liviu Lalescu - unused anymore 77 //QCheckBox* CBDivideTimeAxisByDay; 78 QRadioButton* RBTimeHorizontalDay; 79 QRadioButton* RBTimeVerticalDay; 80 81 QGroupBox* optionsBox; 82 QComboBox* CBBreak; 83 QComboBox* CBWhiteSpace; 84 // QComboBox* CBprinterMode; 85 QComboBox* CBpaperSize; 86 QComboBox* CBorientationMode; 87 QSpinBox* activitiesPadding; 88 QSpinBox* tablePadding; 89 QSpinBox* fontSizeTable; 90 QSpinBox* maxNames; 91 92 QSpinBox* leftPageMargin; 93 QSpinBox* topPageMargin; 94 QSpinBox* rightPageMargin; 95 QSpinBox* bottomPageMargin; 96 97 // QCheckBox* markNotAvailable; 98 // QCheckBox* markBreak; 99 // QCheckBox* printSameStartingTime; 100 QCheckBox* printDetailedTables; 101 QCheckBox* printActivityTags; //TODO: to this with combo box: "always", "never", "if available". 102 //maybe TODO: do it similar with students, teachers, rooms, ... 103 QCheckBox* repeatNames; 104 QCheckBox* automaticColors; 105 106 QPushButton* pbPrintPreviewSmall; 107 QPushButton* pbPrintPreviewFull; 108 QPushButton* pbPrint; 109 110 QPushButton* pbClose; 111 112 private slots: 113 void selectAll(); 114 void unselectAll(); 115 116 void updateNamesList(); 117 QString updateHtmlPrintString(bool printAll); 118 119 //void updateCBDivideTimeAxisByDay(); 120 121 void print(); 122 void printPreviewFull(); 123 void updatePreviewFull(QPrinter* printer); 124 void printPreviewSmall(); 125 void updatePreviewSmall(QPrinter* printer); 126 }; 127 128 #endif 129