/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. QT_FORWARD_DECLARE_CLASS(QGraphicsView)
  7. QT_FORWARD_DECLARE_CLASS(QLabel)
  8. QT_FORWARD_DECLARE_CLASS(QSlider)
  9. QT_FORWARD_DECLARE_CLASS(QToolButton)
  10. QT_FORWARD_DECLARE_CLASS(QUndoStack)
  11. QT_FORWARD_DECLARE_CLASS(QGraphicsScene)
  12. #include "mytypes.h"
  13. using namespace VPrn;
  14. class ViewPort : public QFrame
  15. {
  16. Q_OBJECT
  17. public:
  18. ViewPort (QWidget *parent = 0);
  19. /**
  20. * @fn void showThumbNail(bool thumb,QSize t_size);
  21. * @brief ???????? ?????? ??????????? ?????? ????????
  22. * @param thumb;(true/false) ???./???? ????? "????????"
  23. * @param t_size; ?????? ??????? ????????
  24. */
  25. void showThumbNail(bool thumb,QSize t_size);
  26. /**
  27. * @fn void setPixMapList(PixmapList pList);
  28. * @brief ?????? ?????? ???????? ??? ??????????? ? ???? <int,QPixmap>
  29. */
  30. void setPixMapList(PixmapList pList);
  31. void setDescList(PixmapDescList descImagesList);
  32. signals:
  33. /**
  34. * @fn void selectPixmap(int p_number);
  35. * @brief ?????? ????? ????? ????????? "???????"
  36. */
  37. void selectPixmap(int p_number);
  38. public slots:
  39. void showPage(int p_number);
  40. /**
  41. * @fn void setupMatrix(int zoom);
  42. * @brief ????????? ???????? ???????????
  43. */
  44. void setupMatrix(int zoom);
  45. void zoomToFullSize();
  46. void zoomToFit();
  47. private slots:
  48. /**
  49. * @fn void onSceneSecletionChnaged();
  50. * @brief ??? ?????? ?? ????? ??????? ???????, ??????????? ??? ????????:
  51. * - ???? ???. ????? "????????", ?? ????????? ????? ??????? ???????
  52. * ? ??????? ????? ??? ?????????? ?????. ????? ?????? ?? ?????
  53. */
  54. void onSceneSecletionChnaged();
  55. private:
  56. int curPixmapNumber;
  57. QGraphicsView *graphicsView;
  58. bool m_thumb;
  59. QGraphicsScene *scene;
  60. QSize thumb_size;
  61. PixmapList m_pixmap_list;
  62. PixmapDescList m_desc_list;
  63. //-------------------------------------------------------------------------
  64. /**
  65. * @fn qreal addPairItem (qreal xPos,qreal yPos,int p_number,bool selected);
  66. * @brief ?????? ?? ?????? ???? ????????? ???????? ? ??????? ??? ???
  67. * @param qreal xPos ??????? ???????? ?? ???????????
  68. * @param qreal yPos ??????? ???????? ?? ?????????
  69. * @param int p_number ????? ???????? ? ??????
  70. * @param bool selected ???????? ???????? ??? ???
  71. * @return qreal yPos ?????????? ??????? ?? ?????? ????? ????????? ???????????? ????????
  72. */
  73. qreal addPairItem (qreal xPos,qreal yPos,int p_number,bool selected);
  74. };
  75. #endif // VIEWPORT_H