Ignore:
Timestamp:
Nov 16, 2005, 8:36:46 PM (20 years ago)
Author:
dmik
Message:

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/application/application.cpp

    r7 r8  
    3333#include "filesave.xpm"
    3434#include "fileopen.xpm"
     35#ifndef QT_NO_PRINTER
    3536#include "fileprint.xpm"
     37#endif
    3638
    3739ApplicationWindow::ApplicationWindow()
    3840    : QMainWindow( 0, "example application main window", WDestructiveClose | WGroupLeader )
    3941{
     42#ifndef QT_NO_PRINTER
    4043    printer = new QPrinter( QPrinter::HighResolution );
     44#endif
    4145    QPixmap openIcon, saveIcon, printIcon;
    4246
     
    5458                           this, SLOT(save()), fileTools, "save file" );
    5559
     60#ifndef QT_NO_PRINTER
    5661    printIcon = QPixmap( fileprint );
    5762    QToolButton * filePrint
    5863        = new QToolButton( printIcon, "Print File", QString::null,
    5964                           this, SLOT(print()), fileTools, "print file" );
     65#else
     66    Q_UNUSED( printIcon )
     67#endif
    6068
    6169
     
    7886    QWhatsThis::add( fileSave, fileSaveText );
    7987
     88#ifndef QT_NO_PRINTER
    8089    const char * filePrintText = "Click this button to print the file you "
    8190                 "are editing.\n"
     
    8493
    8594    QWhatsThis::add( filePrint, filePrintText );
     95#endif
    8696
    8797
     
    104114    file->setWhatsThis( id, fileSaveText );
    105115
     116#ifndef QT_NO_PRINTER
    106117    file->insertSeparator();
    107118
     
    109120                           this, SLOT(print()), CTRL+Key_P );
    110121    file->setWhatsThis( id, filePrintText );
     122#endif
    111123
    112124    file->insertSeparator();
     
    137149ApplicationWindow::~ApplicationWindow()
    138150{
     151#ifndef QT_NO_PRINTER
    139152    delete printer;
     153#endif
    140154}
    141155
     
    216230void ApplicationWindow::print()
    217231{
     232#ifndef QT_NO_PRINTER
    218233    printer->setFullPage( TRUE );
    219234    if ( printer->setup(this) ) {               // printer dialog
     
    254269        statusBar()->message( "Printing aborted", 2000 );
    255270    }
     271#endif
    256272}
    257273
Note: See TracChangeset for help on using the changeset viewer.