Rev 19168 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4430 | cbradney | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
3 | paul | 7 | #ifndef NEWDOC_H |
8 | #define NEWDOC_H |
||
9 | |||
9894 | fschmid | 10 | #include <QDialog> |
19153 | craig | 11 | #include <QDropEvent> |
12 | #include <QDragEnterEvent> |
||
13 | #include <QDragLeaveEvent> |
||
14 | #include <QDragMoveEvent> |
||
9897 | fschmid | 15 | #include <QListWidget> |
12594 | cbradney | 16 | class QFormLayout; |
9894 | fschmid | 17 | class QGridLayout; |
18 | class QHBoxLayout; |
||
19 | class QVBoxLayout; |
||
20 | class QFrame; |
||
21 | class QListWidgetItem; |
||
22 | class QGroupBox; |
||
23 | class QSpinBox; |
||
24 | class QLabel; |
||
25 | class QCheckBox; |
||
26 | class QPushButton; |
||
2969 | craig | 27 | #include "scribusapi.h" |
3252 | craig | 28 | #include "scribusstructs.h" |
29 | |||
13552 | cbradney | 30 | #include "ui/customfdialog.h" |
13544 | cbradney | 31 | #include "ui/nftwidget.h" |
3 | paul | 32 | |
2834 | cbradney | 33 | class PrefsManager; |
2769 | fschmid | 34 | class MarginWidget; |
8602 | cbradney | 35 | class ScrSpinBox; |
7025 | fschmid | 36 | class ScComboBox; |
18454 | craig | 37 | class QFileDialog; |
838 | cbradney | 38 | |
9897 | fschmid | 39 | class SCRIBUS_API PageLayoutsWidget : public QListWidget |
40 | { |
||
41 | Q_OBJECT |
||
3071 | subik | 42 | |
9897 | fschmid | 43 | public: |
44 | PageLayoutsWidget(QWidget* parent); |
||
45 | ~PageLayoutsWidget() {}; |
||
46 | void arrangeIcons(); |
||
47 | const QSize minimumSizeHint(); |
||
48 | int maxX; |
||
49 | int maxY; |
||
50 | }; |
||
51 | |||
52 | |||
2969 | craig | 53 | class SCRIBUS_API NewDoc : public QDialog |
2769 | fschmid | 54 | { |
55 | Q_OBJECT |
||
3 | paul | 56 | |
57 | public: |
||
13380 | subik | 58 | |
59 | //! \brief Indexes of the dialog's tabs. |
||
60 | enum { |
||
61 | NewDocumentTab = 0, |
||
62 | NewFromTemplateTab, |
||
63 | OpenExistingTab, |
||
64 | OpenRecentTab |
||
65 | } ActionSelected; |
||
66 | |||
15417 | craig | 67 | NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp = false, QString lang = ""); |
2769 | fschmid | 68 | ~NewDoc() {}; |
2830 | fschmid | 69 | void createNewDocPage(); |
13188 | fschmid | 70 | void createNewFromTempPage(); |
2830 | fschmid | 71 | void createOpenDocPage(); |
2833 | fschmid | 72 | void createRecentDocPage(); |
73 | void setSize(QString gr); |
||
2830 | fschmid | 74 | QTabWidget* tabWidget; |
9894 | fschmid | 75 | QFrame* newDocFrame; |
9897 | fschmid | 76 | PageLayoutsWidget* layoutsView; |
7025 | fschmid | 77 | QLabel* layoutLabel1; |
78 | ScComboBox* firstPage; |
||
9894 | fschmid | 79 | QGroupBox* pageSizeGroupBox; |
5786 | cbradney | 80 | MarginWidget* marginGroup; |
9894 | fschmid | 81 | QGroupBox* optionsGroupBox; |
2769 | fschmid | 82 | QLabel* TextLabel1; |
83 | QLabel* TextLabel2; |
||
84 | QLabel* TextLabel3; |
||
85 | QLabel* TextLabel4; |
||
86 | QLabel* TextLabel1_2; |
||
87 | QLabel* TextLabel1_3; |
||
5918 | cbradney | 88 | QLabel* pageCountLabel; |
2769 | fschmid | 89 | QLabel* TextLabel2_2; |
5918 | cbradney | 90 | QLabel* unitOfMeasureLabel; |
4555 | cbradney | 91 | QComboBox* pageSizeComboBox; |
92 | QComboBox* pageOrientationComboBox; |
||
5918 | cbradney | 93 | QComboBox* unitOfMeasureComboBox; |
2833 | fschmid | 94 | QCheckBox* startUpDialog; |
7023 | fschmid | 95 | QCheckBox* autoTextFrame; |
96 | QCheckBox* startDocSetup; |
||
8602 | cbradney | 97 | ScrSpinBox* Distance; |
5786 | cbradney | 98 | QSpinBox* numberOfCols; |
5918 | cbradney | 99 | QSpinBox* pageCountSpinBox; |
8602 | cbradney | 100 | ScrSpinBox* widthSpinBox; |
101 | ScrSpinBox* heightSpinBox; |
||
9894 | fschmid | 102 | QFrame* openDocFrame; |
10034 | fschmid | 103 | QFileDialog *fileDialog; |
13188 | fschmid | 104 | QFrame* newFromTempFrame; |
105 | nftwidget *nftGui; |
||
9894 | fschmid | 106 | QFrame* recentDocFrame; |
107 | QListWidget* recentDocListBox; |
||
2769 | fschmid | 108 | QPushButton* OKButton; |
109 | QPushButton* CancelB; |
||
3 | paul | 110 | |
13236 | jghali | 111 | bool onStartup(void) const { return m_onStartup;} |
112 | int tabSelected(void) const { return m_tabSelected;} |
||
113 | QString selectedFile(void) const { return m_selectedFile; } |
||
114 | |||
115 | int unitIndex(void) const { return m_unitIndex;} |
||
116 | QString unitSuffix(void) const { return m_unitSuffix;} |
||
117 | double unitRatio(void) const { return m_unitRatio; } |
||
118 | |||
119 | int orientation(void) const { return m_orientation;} |
||
120 | int precision(void) const { return m_precision;} |
||
121 | int choosenLayout(void) const { return m_choosenLayout;} |
||
122 | double pageWidth(void) const { return m_pageWidth;} |
||
123 | double pageHeight(void) const { return m_pageHeight;} |
||
124 | double distance(void) const { return m_distance;} |
||
125 | double bleedBottom(void) const { return m_bleedBottom;} |
||
126 | double bleedTop(void) const { return m_bleedTop;} |
||
127 | double bleedLeft(void) const { return m_bleedLeft;} |
||
128 | double bleedRight(void) const { return m_bleedRight;} |
||
129 | |||
3 | paul | 130 | public slots: |
8687 | cbradney | 131 | void setHeight(double v); |
132 | void setWidth(double v); |
||
7025 | fschmid | 133 | void selectItem(uint nr); |
9894 | fschmid | 134 | void itemSelected(QListWidgetItem* ic); |
7023 | fschmid | 135 | void handleAutoFrame(); |
13236 | jghali | 136 | void setDistance(double v); |
168 | Franz | 137 | void setUnit(int u); |
138 | void ExitOK(); |
||
13236 | jghali | 139 | void setOrientation(int ori); |
140 | void setPageSize(const QString &); |
||
141 | void setDocLayout(int layout); |
||
2874 | subik | 142 | /*! Opens document on doubleclick |
12071 | subik | 143 | \author Petr Vanek <petr@yarpen.cz> |
2874 | subik | 144 | */ |
9894 | fschmid | 145 | void recentDocListBox_doubleClicked(); |
10034 | fschmid | 146 | void openFile(); |
14452 | fschmid | 147 | void adjustTitles(int tab); |
19168 | craig | 148 | void locationDropped(QString fileUrl); |
19180 | craig | 149 | void gotoParentDirectory(); |
150 | void gotoSelectedDirectory(); |
||
151 | void gotoDesktopDirectory(); |
||
152 | void gotoHomeDirectory(); |
||
3 | paul | 153 | |
154 | protected: |
||
9894 | fschmid | 155 | QVBoxLayout* TabbedNewDocLayout; |
156 | QHBoxLayout* Layout1; |
||
157 | QGridLayout* NewDocLayout; |
||
158 | QGridLayout* pageSizeGroupBoxLayout; |
||
12594 | cbradney | 159 | QFormLayout* optionsGroupBoxLayout; |
9894 | fschmid | 160 | QVBoxLayout* openDocLayout; |
161 | QVBoxLayout* recentDocLayout; |
||
13188 | fschmid | 162 | QVBoxLayout *verticalLayout; |
2834 | cbradney | 163 | PrefsManager* prefsManager; |
5781 | cbradney | 164 | QStringList recentDocList; |
13236 | jghali | 165 | |
166 | double m_unitRatio; |
||
167 | int m_orientation; |
||
168 | int m_precision; |
||
169 | int m_choosenLayout; |
||
170 | double m_pageWidth; |
||
171 | double m_pageHeight; |
||
172 | double m_distance; |
||
173 | QString m_unitSuffix; |
||
174 | QString m_selectedFile; |
||
175 | int m_unitIndex; |
||
176 | int m_tabSelected; |
||
177 | bool m_onStartup; |
||
178 | double m_bleedBottom; |
||
179 | double m_bleedTop; |
||
180 | double m_bleedLeft; |
||
181 | double m_bleedRight; |
||
3 | paul | 182 | }; |
183 | |||
184 | #endif // NEWDOC_H |