Changeset 70 for trunk/examples
- Timestamp:
- Mar 22, 2006, 4:03:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/canvas/canvas.cpp
r67 r70 318 318 file->insertItem("&New view", this, SLOT(newView()), CTRL+Key_N); 319 319 file->insertSeparator(); 320 #ifndef QT_NO_PRINTER 320 321 file->insertItem("&Print...", this, SLOT(print()), CTRL+Key_P); 321 322 file->insertSeparator(); 323 #endif 322 324 file->insertItem("E&xit", qApp, SLOT(quit()), CTRL+Key_Q); 323 325 menu->insertItem("&File", file); … … 397 399 Main::~Main() 398 400 { 401 #ifndef QT_NO_PRINTER 399 402 delete printer; 403 #endif 400 404 if ( !--mainCount ) { 401 405 delete[] butterflyimg; … … 522 526 void Main::print() 523 527 { 528 #ifndef QT_NO_PRINTER 524 529 if ( !printer ) printer = new QPrinter; 525 530 if ( printer->setup(this) ) { … … 527 532 canvas.drawArea(QRect(0,0,canvas.width(),canvas.height()),&pp,FALSE); 528 533 } 534 #endif 529 535 } 530 536
Note:
See TracChangeset
for help on using the changeset viewer.