source: trunk/examples/demo/opengl/printpreview.ui.h@ 203

Last change on this file since 203 was 160, checked in by dmik, 19 years ago

Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/****************************************************************************
2** ui.h extension file, included from the uic-generated form implementation.
3**
4** If you wish to add, delete or rename functions respectively slots use
5** Qt Designer which will update this file, preserving your code. Create an
6** init() function in place of a constructor, and a destroy() function in
7** place of a destructor.
8*****************************************************************************/
9
10void PrintPreview::init()
11{
12
13}
14
15void PrintPreview::destroy()
16{
17
18}
19
20void PrintPreview::updatePreview()
21{
22 QImage img = pix.convertToImage();
23 if ( checkInvert->isChecked() ) {
24 img.invertPixels();
25 }
26 if ( checkMirror->isChecked() ) {
27 img = img.mirror( TRUE, FALSE );
28 }
29 if ( checkFlip->isChecked() ) {
30 img = img.mirror( FALSE, TRUE );
31 }
32 if ( checkLeft->isEnabled() && checkLeft->isChecked() ) {
33 }
34 if ( checkRight->isEnabled() && checkRight->isChecked() ) {
35 }
36 QPixmap pm;
37 pm.convertFromImage( img );
38 pixmapLabel->setPixmap( pm );
39}
40
41void PrintPreview::flip( bool )
42{
43 updatePreview();
44}
45
46void PrintPreview::invertColors( bool )
47{
48 updatePreview();
49}
50
51void PrintPreview::mirror( bool )
52{
53 updatePreview();
54}
55
56void PrintPreview::rotateLeft( bool )
57{
58 updatePreview();
59}
60
61void PrintPreview::rotateRight( bool )
62{
63 updatePreview();
64}
65
66void PrintPreview::setPixmap( const QPixmap & pm )
67{
68 pix = pm;
69 updatePreview();
70}
Note: See TracBrowser for help on using the repository browser.