Changeset 516 for trunk/examples
- Timestamp:
- Feb 4, 2010, 8:08:50 PM (15 years ago)
- Location:
- trunk/examples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/dialogs/licensewizard/licensewizard.cpp
r2 r516 352 352 void ConclusionPage::printButtonClicked() 353 353 { 354 #ifndef QT_NO_PRINTER 354 355 QPrinter printer; 355 356 QPrintDialog dialog(&printer, this); … … 358 359 tr("As an environmentally friendly measure, the " 359 360 "license text will not actually be printed.")); 360 } 361 #endif 362 } -
trunk/examples/painting/fontsampler/mainwindow.cpp
r2 r516 221 221 void MainWindow::on_printAction_triggered() 222 222 { 223 #if !defined(QT_NO_PRINTER) 223 224 pageMap = currentPageMap(); 224 225 … … 237 238 238 239 printDocument(&printer); 240 #endif 239 241 } 240 242 241 243 void MainWindow::printDocument(QPrinter *printer) 242 244 { 245 #if !defined(QT_NO_PRINTER) 243 246 printer->setFromTo(1, pageMap.count()); 244 247 … … 269 272 270 273 painter.end(); 274 #endif 271 275 } 272 276 273 277 void MainWindow::on_printPreviewAction_triggered() 274 278 { 279 #if !defined(QT_NO_PRINTER) 275 280 pageMap = currentPageMap(); 276 281 … … 283 288 this, SLOT(printDocument(QPrinter *))); 284 289 preview.exec(); 290 #endif 285 291 } 286 292 … … 310 316 void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer) 311 317 { 318 #if !defined(QT_NO_PRINTER) 312 319 QString family = pageMap.keys()[index]; 313 320 StyleItems items = pageMap[family]; … … 371 378 372 379 painter->restore(); 373 } 380 #endif 381 }
Note:
See TracChangeset
for help on using the changeset viewer.