Merge lp:~daggerstab/stellarium/printsky into lp:~peppujols/stellarium/printsky
- printsky
- Merge into printsky
Proposed by
Bogdan Marinov
Status: | Merged |
---|---|
Merged at revision: | 4712 |
Proposed branch: | lp:~daggerstab/stellarium/printsky |
Merge into: | lp:~peppujols/stellarium/printsky |
Diff against target: |
590 lines (+264/-163) 6 files modified
plugins/PrintSky/PrintSky.qrc (+3/-1) plugins/PrintSky/nightStyle.css (+31/-0) plugins/PrintSky/normalStyle.css (+31/-0) plugins/PrintSky/src/PrintSky.cpp (+3/-0) plugins/PrintSky/src/gui/PrintSkyDialog.cpp (+28/-20) plugins/PrintSky/src/gui/printskyDialog.ui (+168/-142) |
To merge this branch: | bzr merge lp:~daggerstab/stellarium/printsky |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pep Pujols | Approve | ||
Review via email: mp+40229@code.launchpad.net |
Commit message
Description of the change
These are the changes I had made to the PrintSky's code when I included it in the second experimental build, with some additional modifications.
Note that most of this is just quick fixes to make the plug-in functional. Some of the problems need to be addressed more deeply. Please see the comments in the code.
To post a comment you must log in.
Revision history for this message
Pep Pujols (peppujols) wrote : | # |
Revision history for this message
Pep Pujols (peppujols) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'plugins/PrintSky/PrintSky.qrc' | |||
2 | --- plugins/PrintSky/PrintSky.qrc 2010-07-02 17:07:11 +0000 | |||
3 | +++ plugins/PrintSky/PrintSky.qrc 2010-11-05 20:04:43 +0000 | |||
4 | @@ -1,4 +1,6 @@ | |||
5 | 1 | <RCC> | 1 | <RCC> |
7 | 2 | <qresource prefix="printSky" > | 2 | <qresource prefix="printsky"> |
8 | 3 | <file>nightStyle.css</file> | ||
9 | 4 | <file>normalStyle.css</file> | ||
10 | 3 | </qresource> | 5 | </qresource> |
11 | 4 | </RCC> | 6 | </RCC> |
12 | 5 | 7 | ||
13 | === added file 'plugins/PrintSky/nightStyle.css' | |||
14 | --- plugins/PrintSky/nightStyle.css 1970-01-01 00:00:00 +0000 | |||
15 | +++ plugins/PrintSky/nightStyle.css 2010-11-05 20:04:43 +0000 | |||
16 | @@ -0,0 +1,31 @@ | |||
17 | 1 | QTabBar { | ||
18 | 2 | border: none; | ||
19 | 3 | margin: 0px; | ||
20 | 4 | padding: 0px; | ||
21 | 5 | font-weight: bold; | ||
22 | 6 | color: rgb(120, 0, 0); | ||
23 | 7 | background-color: rgb(22, 0, 0); | ||
24 | 8 | font-size: 14px; | ||
25 | 9 | } | ||
26 | 10 | |||
27 | 11 | QTabBar::tab { | ||
28 | 12 | border: 0px; | ||
29 | 13 | margin: 0px; | ||
30 | 14 | padding: 4px 1ex; | ||
31 | 15 | min-height: 28px; | ||
32 | 16 | /*font-size: 14px; <-- Causes text being cut by the frame*/ | ||
33 | 17 | } | ||
34 | 18 | |||
35 | 19 | QTabBar::tab:selected { | ||
36 | 20 | border: none; | ||
37 | 21 | margin: 0px; | ||
38 | 22 | border-top-left-radius: 10px; | ||
39 | 23 | border-top-right-radius: 10px; | ||
40 | 24 | color: rgb(220, 0, 0); | ||
41 | 25 | background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(68, 0, 0), stop: 1 rgb(86, 0, 0)); | ||
42 | 26 | } | ||
43 | 27 | |||
44 | 28 | QTabWidget::pane { | ||
45 | 29 | margin-top: 0px; | ||
46 | 30 | border-top: none; | ||
47 | 31 | } | ||
48 | 0 | 32 | ||
49 | === added file 'plugins/PrintSky/normalStyle.css' | |||
50 | --- plugins/PrintSky/normalStyle.css 1970-01-01 00:00:00 +0000 | |||
51 | +++ plugins/PrintSky/normalStyle.css 2010-11-05 20:04:43 +0000 | |||
52 | @@ -0,0 +1,31 @@ | |||
53 | 1 | QTabBar { | ||
54 | 2 | border: none; | ||
55 | 3 | margin: 0px; | ||
56 | 4 | padding: 0px; | ||
57 | 5 | font-weight: bold; | ||
58 | 6 | color: rgb(170, 173, 164); | ||
59 | 7 | background-color: rgb(31, 31, 31); | ||
60 | 8 | font-size: 14px; | ||
61 | 9 | } | ||
62 | 10 | |||
63 | 11 | QTabBar::tab { | ||
64 | 12 | border: 0px; | ||
65 | 13 | margin: 0px; | ||
66 | 14 | padding: 4px 1ex; | ||
67 | 15 | min-height: 28px; | ||
68 | 16 | /*font-size: 14px; <-- Causes text being cut by the frame*/ | ||
69 | 17 | } | ||
70 | 18 | |||
71 | 19 | QTabBar::tab:selected { | ||
72 | 20 | border: none; | ||
73 | 21 | margin: 0px; | ||
74 | 22 | border-top-left-radius: 10px; | ||
75 | 23 | border-top-right-radius: 10px; | ||
76 | 24 | color: rgb(220, 223, 214); | ||
77 | 25 | background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(68, 69, 72), stop: 1 rgb(86, 87, 90)); | ||
78 | 26 | } | ||
79 | 27 | |||
80 | 28 | QTabWidget::pane { | ||
81 | 29 | margin-top: 0px; | ||
82 | 30 | border-top: none; | ||
83 | 31 | } | ||
84 | 0 | 32 | ||
85 | === modified file 'plugins/PrintSky/src/PrintSky.cpp' | |||
86 | --- plugins/PrintSky/src/PrintSky.cpp 2010-07-02 17:07:11 +0000 | |||
87 | +++ plugins/PrintSky/src/PrintSky.cpp 2010-11-05 20:04:43 +0000 | |||
88 | @@ -66,6 +66,9 @@ | |||
89 | 66 | 66 | ||
90 | 67 | try | 67 | try |
91 | 68 | { | 68 | { |
92 | 69 | //Make sure that "/modules/PrintSky" exists | ||
93 | 70 | StelFileMgr::makeSureDirExistsAndIsWritable(StelFileMgr::getUserDir() + "/modules/PrintSky/"); | ||
94 | 71 | |||
95 | 69 | StelFileMgr::Flags flags = (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable); | 72 | StelFileMgr::Flags flags = (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable); |
96 | 70 | QString printskyIniPath = StelFileMgr::findFile("modules/PrintSky/", flags) + "printsky.ini"; | 73 | QString printskyIniPath = StelFileMgr::findFile("modules/PrintSky/", flags) + "printsky.ini"; |
97 | 71 | 74 | ||
98 | 72 | 75 | ||
99 | === modified file 'plugins/PrintSky/src/gui/PrintSkyDialog.cpp' | |||
100 | --- plugins/PrintSky/src/gui/PrintSkyDialog.cpp 2010-07-02 17:07:11 +0000 | |||
101 | +++ plugins/PrintSky/src/gui/PrintSkyDialog.cpp 2010-11-05 20:04:43 +0000 | |||
102 | @@ -83,7 +83,7 @@ | |||
103 | 83 | Q_ASSERT(gui); | 83 | Q_ASSERT(gui); |
104 | 84 | const StelStyle pluginStyle = GETSTELMODULE(PrintSky)->getModuleStyleSheet(gui->getStelStyle()); | 84 | const StelStyle pluginStyle = GETSTELMODULE(PrintSky)->getModuleStyleSheet(gui->getStelStyle()); |
105 | 85 | dialog->setStyleSheet(pluginStyle.qtStyleSheet); | 85 | dialog->setStyleSheet(pluginStyle.qtStyleSheet); |
107 | 86 | ui->textBrowser->document()->setDefaultStyleSheet(QString(pluginStyle.htmlStyleSheet)); | 86 | //ui->textBrowser->document()->setDefaultStyleSheet(QString(pluginStyle.htmlStyleSheet)); |
108 | 87 | } | 87 | } |
109 | 88 | } | 88 | } |
110 | 89 | 89 | ||
111 | @@ -313,18 +313,16 @@ | |||
112 | 313 | 313 | ||
113 | 314 | //Initialize the style | 314 | //Initialize the style |
114 | 315 | updateStyle(); | 315 | updateStyle(); |
115 | 316 | |||
116 | 317 | |||
117 | 318 | } | 316 | } |
118 | 319 | 317 | ||
119 | 320 | //! Print report on a preview window | 318 | //! Print report on a preview window |
120 | 321 | void PrintSkyDialog::previewSky() | 319 | void PrintSkyDialog::previewSky() |
121 | 322 | { | 320 | { |
123 | 323 | currentVisibilityGui=gui->getVisible(); | 321 | currentVisibilityGui = gui->getVisible(); |
124 | 324 | gui->setVisible(false); | 322 | gui->setVisible(false); |
125 | 325 | dialog->setVisible(false); | 323 | dialog->setVisible(false); |
126 | 326 | 324 | ||
128 | 327 | outputOption=true; | 325 | outputOption = true; |
129 | 328 | 326 | ||
130 | 329 | QTimer::singleShot(50, this, SLOT(executePrinterOutputOption())); | 327 | QTimer::singleShot(50, this, SLOT(executePrinterOutputOption())); |
131 | 330 | } | 328 | } |
132 | @@ -361,7 +359,13 @@ | |||
133 | 361 | StelLocation locationData=core->getNavigator()->getCurrentLocation(); | 359 | StelLocation locationData=core->getNavigator()->getCurrentLocation(); |
134 | 362 | double jd = core->getNavigator()->getJDay(); | 360 | double jd = core->getNavigator()->getJDay(); |
135 | 363 | 361 | ||
137 | 364 | painter.setFont(QFont("DejaVu Sans", 10)); | 362 | QFont font("DejaVu Sans", 10, QFont::Normal); |
138 | 363 | painter.setFont(font); | ||
139 | 364 | qDebug() << "PrintSky: printer debugging information:"; | ||
140 | 365 | qDebug() << "Current printer resolution:" << printer->resolution(); | ||
141 | 366 | qDebug() << "Supported printer resolutions:" << printer->supportedResolutions(); | ||
142 | 367 | qDebug() << "Page size (size index, 0-30)" << printer->paperSize(); | ||
143 | 368 | //For the paper size index, see http://doc.qt.nokia.com/qprinter.html#PaperSize-enum | ||
144 | 365 | 369 | ||
145 | 366 | if (printDataOption) | 370 | if (printDataOption) |
146 | 367 | { | 371 | { |
147 | @@ -372,14 +376,12 @@ | |||
148 | 372 | // painter.drawRect(surfaceData); | 376 | // painter.drawRect(surfaceData); |
149 | 373 | 377 | ||
150 | 374 | 378 | ||
154 | 375 | painter.drawText(surfaceData.adjusted(0, 0, 0, -200), Qt::AlignCenter, "STELLARIUM GENERAL DATA"); | 379 | painter.drawText(surfaceData.adjusted(0, 0, 0, -200), Qt::AlignCenter, "CHART INFORMATION"); |
152 | 376 | |||
153 | 377 | QString location="Location: "; | ||
155 | 378 | 380 | ||
156 | 379 | QString printLatitude=StelUtils::radToDmsStr((std::fabs(locationData.latitude)/180.)*M_PI); | 381 | QString printLatitude=StelUtils::radToDmsStr((std::fabs(locationData.latitude)/180.)*M_PI); |
157 | 380 | QString printLongitude=StelUtils::radToDmsStr((std::fabs(locationData.longitude)/180.)*M_PI); | 382 | QString printLongitude=StelUtils::radToDmsStr((std::fabs(locationData.longitude)/180.)*M_PI); |
158 | 381 | 383 | ||
160 | 382 | location+=QString("%1\t%2\t%3\t%4\t%5\t%6m") | 384 | QString location = QString("Location: %1\t%2\t%3\t%4\t%5\t%6m") |
161 | 383 | .arg(locationData.name) | 385 | .arg(locationData.name) |
162 | 384 | .arg(locationData.country) | 386 | .arg(locationData.country) |
163 | 385 | .arg(locationData.planetName) | 387 | .arg(locationData.planetName) |
164 | @@ -396,7 +398,7 @@ | |||
165 | 396 | 398 | ||
166 | 397 | QString str; | 399 | QString str; |
167 | 398 | QTextStream wos(&str); | 400 | QTextStream wos(&str); |
169 | 399 | wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr()->getCurrentFov() << QChar(0x00B0); | 401 | wos << "FOV: " << qSetRealNumberPrecision(3) << core->getMovementMgr()->getCurrentFov() << QChar(0x00B0); |
170 | 400 | painter.drawText(surfaceData.adjusted(50, 150, 0, 0), Qt::AlignLeft, *wos.string()); | 402 | painter.drawText(surfaceData.adjusted(50, 150, 0, 0), Qt::AlignLeft, *wos.string()); |
171 | 401 | 403 | ||
172 | 402 | painter.drawText(surfaceData.adjusted(surfaceData.width()-700, 0, 0, 0), Qt::AlignLeft, "Radius-magnitude relation"); | 404 | painter.drawText(surfaceData.adjusted(surfaceData.width()-700, 0, 0, 0), Qt::AlignLeft, "Radius-magnitude relation"); |
173 | @@ -423,15 +425,15 @@ | |||
174 | 423 | if (printSSEphemeridesOption) | 425 | if (printSSEphemeridesOption) |
175 | 424 | { | 426 | { |
176 | 425 | printer->newPage(); | 427 | printer->newPage(); |
178 | 426 | painter.drawText(0, 0, printer->paperRect().width(), 50, Qt::AlignCenter, "STELLARIUM SOLAR SYSTEM EPHEMERIDES"); | 428 | painter.drawText(0, 0, printer->paperRect().width(), 50, Qt::AlignCenter, "SOLAR SYSTEM EPHEMERIDES"); |
179 | 427 | painter.drawText(QRect(50, 150, 300, 50), Qt::AlignCenter, "Name"); | 429 | painter.drawText(QRect(50, 150, 300, 50), Qt::AlignCenter, "Name"); |
182 | 428 | painter.drawText(QRect(400, 150, 300, 50), Qt::AlignCenter, "A.R."); | 430 | painter.drawText(QRect(400, 150, 300, 50), Qt::AlignCenter, "RA"); |
183 | 429 | painter.drawText(QRect(700, 150, 300, 50), Qt::AlignCenter, "DEC."); | 431 | painter.drawText(QRect(700, 150, 300, 50), Qt::AlignCenter, "Dec"); |
184 | 430 | painter.drawText(QRect(950, 100, 750, 50), Qt::AlignCenter, "Local Time"); | 432 | painter.drawText(QRect(950, 100, 750, 50), Qt::AlignCenter, "Local Time"); |
185 | 431 | painter.drawText(QRect(950, 150, 250, 50), Qt::AlignCenter, "Rising"); | 433 | painter.drawText(QRect(950, 150, 250, 50), Qt::AlignCenter, "Rising"); |
186 | 432 | painter.drawText(QRect(1200, 150, 250, 50), Qt::AlignCenter, "Transit"); | 434 | painter.drawText(QRect(1200, 150, 250, 50), Qt::AlignCenter, "Transit"); |
187 | 433 | painter.drawText(QRect(1450, 150, 250, 50), Qt::AlignCenter, "Setting"); | 435 | painter.drawText(QRect(1450, 150, 250, 50), Qt::AlignCenter, "Setting"); |
189 | 434 | painter.drawText(QRect(1700, 150, 300, 50), Qt::AlignCenter, "Distance (UA)"); | 436 | painter.drawText(QRect(1700, 150, 300, 50), Qt::AlignCenter, "Distance (AU)"); |
190 | 435 | painter.drawText(QRect(2000, 150, 300, 50), Qt::AlignCenter, "Ap.Magnitude"); | 437 | painter.drawText(QRect(2000, 150, 300, 50), Qt::AlignCenter, "Ap.Magnitude"); |
191 | 436 | 438 | ||
192 | 437 | SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); | 439 | SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); |
193 | @@ -442,6 +444,9 @@ | |||
194 | 442 | PlanetP pHome=ssmgr->searchByEnglishName(locationData.planetName); | 444 | PlanetP pHome=ssmgr->searchByEnglishName(locationData.planetName); |
195 | 443 | double standardSideralTime=pHome->getSiderealTime(((int) jd)+0.5)*M_PI/180.; | 445 | double standardSideralTime=pHome->getSiderealTime(((int) jd)+0.5)*M_PI/180.; |
196 | 444 | 446 | ||
197 | 447 | //After the introduction of the Comets and Asteroids plug-in, | ||
198 | 448 | //there will be *lots* of planet names. At the very least, | ||
199 | 449 | //this needs a mechanism for creating page breaks. | ||
200 | 445 | QStringList allBodiesNames=ssmgr->getAllPlanetEnglishNames(); | 450 | QStringList allBodiesNames=ssmgr->getAllPlanetEnglishNames(); |
201 | 446 | allBodiesNames.sort(); | 451 | allBodiesNames.sort(); |
202 | 447 | for (int iBodyName=1, yPos=200; iBodyName<=allBodiesNames.count(); ++iBodyName) | 452 | for (int iBodyName=1, yPos=200; iBodyName<=allBodiesNames.count(); ++iBodyName) |
203 | @@ -538,19 +543,23 @@ | |||
204 | 538 | } | 543 | } |
205 | 539 | 544 | ||
206 | 540 | 545 | ||
208 | 541 | QPrinter printer(QPrinter::HighResolution); | 546 | //QPrinter printer(QPrinter::HighResolution); |
209 | 547 | QPrinter printer(QPrinter::ScreenResolution); | ||
210 | 548 | printer.setResolution(300); | ||
211 | 542 | printer.setDocName("STELLARIUM REPORT"); | 549 | printer.setDocName("STELLARIUM REPORT"); |
212 | 543 | printer.setOrientation((orientationOption=="Portrait"? QPrinter::Portrait: QPrinter::Landscape)); | 550 | printer.setOrientation((orientationOption=="Portrait"? QPrinter::Portrait: QPrinter::Landscape)); |
213 | 544 | 551 | ||
214 | 545 | if (outputOption) | 552 | if (outputOption) |
215 | 546 | { | 553 | { |
217 | 547 | QPrintPreviewDialog oPrintPreviewDialog(&printer, &StelMainGraphicsView::getInstance()); | 554 | //QPrintPreviewDialog oPrintPreviewDialog(&printer, &StelMainGraphicsView::getInstance()); |
218 | 555 | QPrintPreviewDialog oPrintPreviewDialog(&printer); | ||
219 | 548 | connect(&oPrintPreviewDialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(printDataSky(QPrinter *))); | 556 | connect(&oPrintPreviewDialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(printDataSky(QPrinter *))); |
220 | 549 | oPrintPreviewDialog.exec(); | 557 | oPrintPreviewDialog.exec(); |
221 | 550 | } | 558 | } |
222 | 551 | else | 559 | else |
223 | 552 | { | 560 | { |
225 | 553 | QPrintDialog dialogPrinter(&printer, &StelMainGraphicsView::getInstance()); | 561 | //QPrintDialog dialogPrinter(&printer, &StelMainGraphicsView::getInstance()); |
226 | 562 | QPrintDialog dialogPrinter(&printer); | ||
227 | 554 | if (dialogPrinter.exec() == QDialog::Accepted) | 563 | if (dialogPrinter.exec() == QDialog::Accepted) |
228 | 555 | printDataSky(&printer); | 564 | printDataSky(&printer); |
229 | 556 | } | 565 | } |
230 | @@ -563,8 +572,7 @@ | |||
231 | 563 | 572 | ||
232 | 564 | void PrintSkyDialog::enableOutputOptions(bool enable) | 573 | void PrintSkyDialog::enableOutputOptions(bool enable) |
233 | 565 | { | 574 | { |
236 | 566 | ui->previewSkyPushButton->setEnabled(enable); | 575 | ui->buttonsFrame->setVisible(enable); |
235 | 567 | ui->printSkyPushButton->setEnabled(enable); | ||
237 | 568 | } | 576 | } |
238 | 569 | 577 | ||
239 | 570 | 578 | ||
240 | 571 | 579 | ||
241 | === modified file 'plugins/PrintSky/src/gui/printskyDialog.ui' | |||
242 | --- plugins/PrintSky/src/gui/printskyDialog.ui 2010-07-02 17:07:11 +0000 | |||
243 | +++ plugins/PrintSky/src/gui/printskyDialog.ui 2010-11-05 20:04:43 +0000 | |||
244 | @@ -6,8 +6,8 @@ | |||
245 | 6 | <rect> | 6 | <rect> |
246 | 7 | <x>0</x> | 7 | <x>0</x> |
247 | 8 | <y>0</y> | 8 | <y>0</y> |
250 | 9 | <width>513</width> | 9 | <width>500</width> |
251 | 10 | <height>342</height> | 10 | <height>300</height> |
252 | 11 | </rect> | 11 | </rect> |
253 | 12 | </property> | 12 | </property> |
254 | 13 | <property name="sizePolicy"> | 13 | <property name="sizePolicy"> |
255 | @@ -19,12 +19,9 @@ | |||
256 | 19 | <property name="minimumSize"> | 19 | <property name="minimumSize"> |
257 | 20 | <size> | 20 | <size> |
258 | 21 | <width>300</width> | 21 | <width>300</width> |
260 | 22 | <height>320</height> | 22 | <height>300</height> |
261 | 23 | </size> | 23 | </size> |
262 | 24 | </property> | 24 | </property> |
263 | 25 | <property name="windowTitle"> | ||
264 | 26 | <string>Form</string> | ||
265 | 27 | </property> | ||
266 | 28 | <layout class="QVBoxLayout" name="verticalLayout_2"> | 25 | <layout class="QVBoxLayout" name="verticalLayout_2"> |
267 | 29 | <property name="spacing"> | 26 | <property name="spacing"> |
268 | 30 | <number>0</number> | 27 | <number>0</number> |
269 | @@ -156,149 +153,166 @@ | |||
270 | 156 | <attribute name="title"> | 153 | <attribute name="title"> |
271 | 157 | <string>General</string> | 154 | <string>General</string> |
272 | 158 | </attribute> | 155 | </attribute> |
384 | 159 | <widget class="QWidget" name="layoutWidget"> | 156 | <layout class="QVBoxLayout" name="verticalLayout_3"> |
385 | 160 | <property name="geometry"> | 157 | <property name="spacing"> |
386 | 161 | <rect> | 158 | <number>0</number> |
387 | 162 | <x>170</x> | 159 | </property> |
388 | 163 | <y>180</y> | 160 | <property name="margin"> |
389 | 164 | <width>158</width> | 161 | <number>0</number> |
390 | 165 | <height>25</height> | 162 | </property> |
391 | 166 | </rect> | 163 | <item> |
392 | 167 | </property> | 164 | <widget class="QGroupBox" name="groupBox"> |
393 | 168 | <layout class="QHBoxLayout" name="horizontalLayout"> | 165 | <property name="title"> |
394 | 169 | <item> | 166 | <string>Options</string> |
395 | 170 | <widget class="QPushButton" name="previewSkyPushButton"> | 167 | </property> |
396 | 171 | <property name="text"> | 168 | <layout class="QGridLayout" name="gridLayout_2"> |
397 | 172 | <string>Preview</string> | 169 | <property name="margin"> |
398 | 173 | </property> | 170 | <number>0</number> |
399 | 174 | </widget> | 171 | </property> |
400 | 175 | </item> | 172 | <item row="0" column="0" colspan="2"> |
401 | 176 | <item> | 173 | <layout class="QVBoxLayout" name="verticalLayout"> |
402 | 177 | <widget class="QPushButton" name="printSkyPushButton"> | 174 | <item> |
403 | 178 | <property name="text"> | 175 | <widget class="QCheckBox" name="invertColorsCheckBox"> |
404 | 179 | <string>Print</string> | 176 | <property name="text"> |
405 | 180 | </property> | 177 | <string>Invert colors</string> |
406 | 181 | </widget> | 178 | </property> |
407 | 182 | </item> | 179 | </widget> |
408 | 183 | </layout> | 180 | </item> |
409 | 184 | </widget> | 181 | <item> |
410 | 185 | <widget class="QGroupBox" name="orientationGroupBox"> | 182 | <widget class="QCheckBox" name="scaleToFitCheckBox"> |
411 | 186 | <property name="geometry"> | 183 | <property name="text"> |
412 | 187 | <rect> | 184 | <string>Scale to fit</string> |
413 | 188 | <x>270</x> | 185 | </property> |
414 | 189 | <y>10</y> | 186 | </widget> |
415 | 190 | <width>181</width> | 187 | </item> |
416 | 191 | <height>110</height> | 188 | <item> |
417 | 192 | </rect> | 189 | <widget class="QCheckBox" name="printDataCheckBox"> |
418 | 193 | </property> | 190 | <property name="text"> |
419 | 194 | <property name="title"> | 191 | <string>Print scene information</string> |
420 | 195 | <string>Orientation</string> | 192 | </property> |
421 | 196 | </property> | 193 | </widget> |
422 | 197 | <property name="alignment"> | 194 | </item> |
423 | 198 | <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> | 195 | <item> |
424 | 199 | </property> | 196 | <widget class="QCheckBox" name="printSSEphemeridesCheckBox"> |
425 | 200 | <widget class="QRadioButton" name="orientationPortraitRadioButton"> | 197 | <property name="text"> |
426 | 201 | <property name="geometry"> | 198 | <string>Print Solar System ephemerides</string> |
427 | 202 | <rect> | 199 | </property> |
428 | 203 | <x>20</x> | 200 | </widget> |
429 | 204 | <y>44</y> | 201 | </item> |
430 | 205 | <width>131</width> | 202 | </layout> |
431 | 206 | <height>17</height> | 203 | </item> |
432 | 207 | </rect> | 204 | <item row="0" column="2"> |
433 | 208 | </property> | 205 | <widget class="QGroupBox" name="orientationGroupBox"> |
434 | 209 | <property name="text"> | 206 | <property name="title"> |
435 | 210 | <string>Portrait</string> | 207 | <string>Orientation</string> |
436 | 211 | </property> | 208 | </property> |
437 | 212 | <property name="checked"> | 209 | <layout class="QVBoxLayout" name="verticalLayout_5"> |
438 | 213 | <bool>true</bool> | 210 | <property name="margin"> |
439 | 214 | </property> | 211 | <number>0</number> |
440 | 215 | </widget> | 212 | </property> |
441 | 216 | <widget class="QRadioButton" name="orientationLandscapeRadioButton"> | 213 | <item> |
442 | 217 | <property name="geometry"> | 214 | <widget class="QRadioButton" name="orientationPortraitRadioButton"> |
443 | 218 | <rect> | 215 | <property name="text"> |
444 | 219 | <x>20</x> | 216 | <string>Portrait</string> |
445 | 220 | <y>70</y> | 217 | </property> |
446 | 221 | <width>131</width> | 218 | <property name="checked"> |
447 | 222 | <height>17</height> | 219 | <bool>true</bool> |
448 | 223 | </rect> | 220 | </property> |
449 | 224 | </property> | 221 | </widget> |
450 | 225 | <property name="text"> | 222 | </item> |
451 | 226 | <string>Landscape</string> | 223 | <item> |
452 | 227 | </property> | 224 | <widget class="QRadioButton" name="orientationLandscapeRadioButton"> |
453 | 228 | </widget> | 225 | <property name="text"> |
454 | 229 | </widget> | 226 | <string>Landscape</string> |
455 | 230 | <widget class="QWidget" name="layoutWidget"> | 227 | </property> |
456 | 231 | <property name="geometry"> | 228 | </widget> |
457 | 232 | <rect> | 229 | </item> |
458 | 233 | <x>18</x> | 230 | </layout> |
459 | 234 | <y>18</y> | 231 | </widget> |
460 | 235 | <width>251</width> | 232 | </item> |
461 | 236 | <height>88</height> | 233 | <item row="1" column="0" colspan="3"> |
462 | 237 | </rect> | 234 | <widget class="QFrame" name="buttonsFrame"> |
463 | 238 | </property> | 235 | <layout class="QHBoxLayout" name="horizontalLayout"> |
464 | 239 | <layout class="QVBoxLayout" name="verticalLayout"> | 236 | <item> |
465 | 240 | <item> | 237 | <widget class="QPushButton" name="previewSkyPushButton"> |
466 | 241 | <widget class="QCheckBox" name="invertColorsCheckBox"> | 238 | <property name="text"> |
467 | 242 | <property name="text"> | 239 | <string>Preview</string> |
468 | 243 | <string>Invert colors</string> | 240 | </property> |
469 | 244 | </property> | 241 | </widget> |
470 | 245 | </widget> | 242 | </item> |
471 | 246 | </item> | 243 | <item> |
472 | 247 | <item> | 244 | <widget class="QPushButton" name="printSkyPushButton"> |
473 | 248 | <widget class="QCheckBox" name="scaleToFitCheckBox"> | 245 | <property name="text"> |
474 | 249 | <property name="text"> | 246 | <string>Print</string> |
475 | 250 | <string>Scale to fit</string> | 247 | </property> |
476 | 251 | </property> | 248 | </widget> |
477 | 252 | </widget> | 249 | </item> |
478 | 253 | </item> | 250 | </layout> |
479 | 254 | <item> | 251 | </widget> |
480 | 255 | <widget class="QCheckBox" name="printDataCheckBox"> | 252 | </item> |
481 | 256 | <property name="text"> | 253 | </layout> |
482 | 257 | <string>Print general data</string> | 254 | </widget> |
483 | 258 | </property> | 255 | </item> |
484 | 259 | </widget> | 256 | <item> |
485 | 260 | </item> | 257 | <spacer name="verticalSpacer"> |
486 | 261 | <item> | 258 | <property name="orientation"> |
487 | 262 | <widget class="QCheckBox" name="printSSEphemeridesCheckBox"> | 259 | <enum>Qt::Vertical</enum> |
488 | 263 | <property name="text"> | 260 | </property> |
489 | 264 | <string>Print Solar System ephemerides</string> | 261 | <property name="sizeHint" stdset="0"> |
490 | 265 | </property> | 262 | <size> |
491 | 266 | </widget> | 263 | <width>20</width> |
492 | 267 | </item> | 264 | <height>40</height> |
493 | 268 | </layout> | 265 | </size> |
494 | 269 | </widget> | 266 | </property> |
495 | 267 | </spacer> | ||
496 | 268 | </item> | ||
497 | 269 | </layout> | ||
498 | 270 | </widget> | 270 | </widget> |
499 | 271 | <widget class="QWidget" name="About"> | 271 | <widget class="QWidget" name="About"> |
500 | 272 | <attribute name="title"> | 272 | <attribute name="title"> |
501 | 273 | <string>About</string> | 273 | <string>About</string> |
502 | 274 | </attribute> | 274 | </attribute> |
503 | 275 | <layout class="QGridLayout" name="gridLayout"> | 275 | <layout class="QGridLayout" name="gridLayout"> |
516 | 276 | <property name="leftMargin"> | 276 | <item row="1" column="0"> |
517 | 277 | <number>12</number> | 277 | <widget class="QLabel" name="labelAbout"> |
518 | 278 | </property> | 278 | <property name="text"> |
519 | 279 | <property name="topMargin"> | 279 | <string>This plugin allows the user to preview and print the current screen and some aditional data as the current location, the screen time adding the GMT difference, and also a relation radius magnitude as a field reference. |
520 | 280 | <number>0</number> | 280 | |
521 | 281 | </property> | 281 | In a optional second page you can get some Solar System ephemerides. |
522 | 282 | <property name="rightMargin"> | 282 | |
523 | 283 | <number>12</number> | 283 | Use Ctrl+P to open the print window.</string> |
524 | 284 | </property> | 284 | </property> |
525 | 285 | <property name="bottomMargin"> | 285 | <property name="textFormat"> |
526 | 286 | <number>12</number> | 286 | <enum>Qt::AutoText</enum> |
527 | 287 | </property> | 287 | </property> |
528 | 288 | <property name="alignment"> | ||
529 | 289 | <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
530 | 290 | </property> | ||
531 | 291 | <property name="wordWrap"> | ||
532 | 292 | <bool>true</bool> | ||
533 | 293 | </property> | ||
534 | 294 | </widget> | ||
535 | 295 | </item> | ||
536 | 296 | <item row="2" column="0"> | ||
537 | 297 | <spacer name="verticalSpacer_2"> | ||
538 | 298 | <property name="orientation"> | ||
539 | 299 | <enum>Qt::Vertical</enum> | ||
540 | 300 | </property> | ||
541 | 301 | <property name="sizeHint" stdset="0"> | ||
542 | 302 | <size> | ||
543 | 303 | <width>20</width> | ||
544 | 304 | <height>40</height> | ||
545 | 305 | </size> | ||
546 | 306 | </property> | ||
547 | 307 | </spacer> | ||
548 | 308 | </item> | ||
549 | 288 | <item row="0" column="0"> | 309 | <item row="0" column="0"> |
563 | 289 | <widget class="QTextBrowser" name="textBrowser"> | 310 | <widget class="QLabel" name="label"> |
564 | 290 | <property name="html"> | 311 | <property name="text"> |
565 | 291 | <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | 312 | <string>Author: <a href="mailto:maslarocaxica@gmail.com">Pep Pujols</a> (with fixes by Bogdan Marinov)</string> |
566 | 292 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> | 313 | </property> |
567 | 293 | p, li { white-space: pre-wrap; } | 314 | <property name="openExternalLinks"> |
568 | 294 | </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> | 315 | <bool>true</bool> |
556 | 295 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Author: </span><a href="maslarocaxica@gmail.com"><span style=" font-size:12pt; text-decoration: underline; color:#0000ff;">Pep Pujols</span></a></p> | ||
557 | 296 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:30px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande'; font-size:13pt;"></p> | ||
558 | 297 | <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:30px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">This plugin allow the user preview and print the current screen and some aditional data as the current location, the screen time adding the GMT difference, and also a relation radius magnitude as a field reference.</span></p> | ||
559 | 298 | <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:30px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande'; font-size:13pt;"></p> | ||
560 | 299 | <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:30px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">In a optional second page you can get some Solar System ephemerides.</span></p> | ||
561 | 300 | <p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:30px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande'; font-size:13pt;"></p> | ||
562 | 301 | <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:30px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Use the key Ctrl-P to activate the print dialog.</span></p></body></html></string> | ||
569 | 302 | </property> | 316 | </property> |
570 | 303 | </widget> | 317 | </widget> |
571 | 304 | </item> | 318 | </item> |
572 | @@ -319,6 +333,18 @@ | |||
573 | 319 | <container>1</container> | 333 | <container>1</container> |
574 | 320 | </customwidget> | 334 | </customwidget> |
575 | 321 | </customwidgets> | 335 | </customwidgets> |
576 | 336 | <tabstops> | ||
577 | 337 | <tabstop>Tabs</tabstop> | ||
578 | 338 | <tabstop>invertColorsCheckBox</tabstop> | ||
579 | 339 | <tabstop>scaleToFitCheckBox</tabstop> | ||
580 | 340 | <tabstop>printDataCheckBox</tabstop> | ||
581 | 341 | <tabstop>printSSEphemeridesCheckBox</tabstop> | ||
582 | 342 | <tabstop>orientationPortraitRadioButton</tabstop> | ||
583 | 343 | <tabstop>orientationLandscapeRadioButton</tabstop> | ||
584 | 344 | <tabstop>previewSkyPushButton</tabstop> | ||
585 | 345 | <tabstop>printSkyPushButton</tabstop> | ||
586 | 346 | <tabstop>labelAbout</tabstop> | ||
587 | 347 | </tabstops> | ||
588 | 322 | <resources/> | 348 | <resources/> |
589 | 323 | <connections/> | 349 | <connections/> |
590 | 324 | </ui> | 350 | </ui> |
> Bogdan Marinov has proposed merging lp:~daggerstab/stellarium/printsky into lp:~peppujols/stellarium/printsky.
>
> Requested reviews:
> Pep Pujols (peppujols)
>
>
> These are the changes I had made to the PrintSky's code when I included it in the second experimental build, with some additional modifications.
>
> Note that most of this is just quick fixes to make the plug-in functional. Some of the problems need to be addressed more deeply. Please see the comments in the code.
Good job Bogdan.
I will look the code and merge your branch in few days.
Pep.