src/docs.cpp

changeset 455
c5d14d112034
parent 421
7d26db0be944
child 493
16766ac1bbd9
equal deleted inserted replaced
454:d6b4ed3bf169 455:c5d14d112034
1 /* 1 /*
2 * LDForge: LDraw parts authoring CAD 2 * LDForge: LDraw parts authoring CAD
3 * Copyright (C) 2013 Santeri Piippo 3 * Copyright (C) 2013 Santeri Piippo
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or 7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include <QDialog> 19 #include <QDialog>
21 #include <QDialogButtonBox> 21 #include <QDialogButtonBox>
22 #include <QBoxLayout> 22 #include <QBoxLayout>
23 #include "common.h" 23 #include "common.h"
24 #include "types.h" 24 #include "types.h"
25 25
26 // =============================================================================
27 // -----------------------------------------------------------------------------
26 class DocumentViewer : public QDialog { 28 class DocumentViewer : public QDialog {
27 public: 29 public:
28 explicit DocumentViewer (QWidget* parent = null, Qt::WindowFlags f = 0) : QDialog (parent, f) { 30 explicit DocumentViewer (QWidget* parent = null, Qt::WindowFlags f = 0) : QDialog (parent, f) {
29 te_text = new QTextEdit (this); 31 te_text = new QTextEdit (this);
30 te_text->setMinimumSize (QSize (400, 300)); 32 te_text->setMinimumSize (QSize (400, 300));
59 "<p>The image should then be cropped with the knowledge of the image's LDU " 61 "<p>The image should then be cropped with the knowledge of the image's LDU "
60 "dimensions in mind. The offset should then be identified in the image in pixels.</p>" 62 "dimensions in mind. The offset should then be identified in the image in pixels.</p>"
61 "<p>Finally, use the \"Set Overlay Image\" dialog and fill in the details. The " 63 "<p>Finally, use the \"Set Overlay Image\" dialog and fill in the details. The "
62 "overlay image should then be ready for use."; 64 "overlay image should then be ready for use.";
63 65
66 // =============================================================================
67 // -----------------------------------------------------------------------------
64 void showDocumentation (const char* text) { 68 void showDocumentation (const char* text) {
65 DocumentViewer dlg; 69 DocumentViewer dlg;
66 dlg.setText (text); 70 dlg.setText (text);
67 dlg.exec(); 71 dlg.exec();
68 } 72 }

mercurial