PageRenderTime 32ms CodeModel.GetById 17ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/vp_plugins/print_monitor/viewport.h

http://cupsfilter.googlecode.com/
C++ Header | 88 lines | 41 code | 13 blank | 34 comment | 0 complexity | fdfc57fe43ffd1858ddc93d3d0346a3e MD5 | raw file
 1#ifndef VIEWPORT_H
 2#define VIEWPORT_H
 3#include <QtGui/QFrame>
 4#include <QtGui/QResizeEvent>
 5#include <QtCore/QMap>
 6
 7QT_FORWARD_DECLARE_CLASS(QGraphicsView)
 8QT_FORWARD_DECLARE_CLASS(QLabel)
 9QT_FORWARD_DECLARE_CLASS(QSlider)
10QT_FORWARD_DECLARE_CLASS(QToolButton)
11QT_FORWARD_DECLARE_CLASS(QUndoStack)
12QT_FORWARD_DECLARE_CLASS(QGraphicsScene)
13
14#include "mytypes.h"
15using namespace VPrn;
16
17
18
19class ViewPort : public QFrame
20{
21    Q_OBJECT
22public:
23    ViewPort (QWidget *parent = 0);
24    /**
25      * @fn void showThumbNail(bool thumb,QSize t_size);
26      * @brief ???????? ?????? ??????????? ?????? ????????
27      * @param thumb;(true/false) ???./???? ????? "????????"
28      * @param t_size; ?????? ??????? ????????
29      */
30    void showThumbNail(bool thumb,QSize t_size);
31    /**
32      * @fn void setPixMapList(PixmapList pList);
33      * @brief ?????? ?????? ???????? ??? ??????????? ? ???? <int,QPixmap>
34      */
35    void setPixMapList(PixmapList pList);
36
37    void setDescList(PixmapDescList descImagesList);
38signals:
39    /**
40      * @fn void selectPixmap(int p_number);
41      * @brief ?????? ????? ????? ????????? "???????"
42      */
43    void selectPixmap(int p_number);
44public slots:
45    void showPage(int p_number);
46
47    /**
48      * @fn void setupMatrix(int zoom);
49      * @brief ????????? ???????? ???????????
50      */
51    void setupMatrix(int zoom);
52
53    void zoomToFullSize();
54    void zoomToFit();
55
56private slots:
57    /**
58      * @fn void onSceneSecletionChnaged();
59      * @brief ??? ?????? ?? ????? ??????? ???????, ??????????? ??? ????????:
60      * - ???? ???. ????? "????????", ?? ????????? ????? ??????? ???????
61      * ? ??????? ????? ??? ?????????? ?????. ????? ?????? ?? ?????
62      */
63    void onSceneSecletionChnaged();
64
65private:
66    int curPixmapNumber;
67    QGraphicsView *graphicsView;
68    bool m_thumb;
69    QGraphicsScene *scene;
70    QSize thumb_size;
71    PixmapList m_pixmap_list;
72    PixmapDescList m_desc_list;
73
74    //-------------------------------------------------------------------------
75    /**
76      * @fn qreal addPairItem (qreal xPos,qreal yPos,int p_number,bool selected);
77      * @brief ?????? ?? ?????? ???? ????????? ???????? ? ??????? ??? ???
78      * @param qreal xPos    ??????? ???????? ?? ???????????
79      * @param qreal yPos    ??????? ???????? ?? ?????????
80      * @param int p_number  ????? ???????? ? ??????
81      * @param bool selected ???????? ???????? ??? ???
82      * @return qreal yPos   ?????????? ??????? ?? ?????? ????? ????????? ???????????? ????????
83      */
84      qreal addPairItem (qreal xPos,qreal yPos,int p_number,bool selected);
85
86};
87
88#endif // VIEWPORT_H