Changeset 516 for trunk/examples/painting
- Timestamp:
- Feb 4, 2010, 8:08:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/painting/fontsampler/mainwindow.cpp
r2 r516 221 221 void MainWindow::on_printAction_triggered() 222 222 { 223 223 224 pageMap = currentPageMap(); 224 225 … … 237 238 238 239 printDocument(&printer); 240 239 241 } 240 242 241 243 void MainWindow::printDocument(QPrinter *printer) 242 244 { 245 243 246 printer->setFromTo(1, pageMap.count()); 244 247 … … 269 272 270 273 painter.end(); 274 271 275 } 272 276 273 277 void MainWindow::on_printPreviewAction_triggered() 274 278 { 279 275 280 pageMap = currentPageMap(); 276 281 … … 283 288 this, SLOT(printDocument(QPrinter *))); 284 289 preview.exec(); 290 285 291 } 286 292 … … 310 316 void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer) 311 317 { 318 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.