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 |
|
---|
10 | void PrintPreview::init()
|
---|
11 | {
|
---|
12 |
|
---|
13 | }
|
---|
14 |
|
---|
15 | void PrintPreview::destroy()
|
---|
16 | {
|
---|
17 |
|
---|
18 | }
|
---|
19 |
|
---|
20 | void 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 |
|
---|
41 | void PrintPreview::flip( bool )
|
---|
42 | {
|
---|
43 | updatePreview();
|
---|
44 | }
|
---|
45 |
|
---|
46 | void PrintPreview::invertColors( bool )
|
---|
47 | {
|
---|
48 | updatePreview();
|
---|
49 | }
|
---|
50 |
|
---|
51 | void PrintPreview::mirror( bool )
|
---|
52 | {
|
---|
53 | updatePreview();
|
---|
54 | }
|
---|
55 |
|
---|
56 | void PrintPreview::rotateLeft( bool )
|
---|
57 | {
|
---|
58 | updatePreview();
|
---|
59 | }
|
---|
60 |
|
---|
61 | void PrintPreview::rotateRight( bool )
|
---|
62 | {
|
---|
63 | updatePreview();
|
---|
64 | }
|
---|
65 |
|
---|
66 | void PrintPreview::setPixmap( const QPixmap & pm )
|
---|
67 | {
|
---|
68 | pix = pm;
|
---|
69 | updatePreview();
|
---|
70 | }
|
---|