TDE graphics utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.4KB

  1. /*
  2. Copyright (c) 2003,2004,2005 Clarence Dang <dang@kde.org>
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions
  6. are met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  13. IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  14. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  16. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  17. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  18. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  19. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  21. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. */
  23. #ifndef KP_UNZOOMED_THUMBNAIL_VIEW_H
  24. #define KP_UNZOOMED_THUMBNAIL_VIEW_H
  25. #include <kpthumbnailview.h>
  26. class kpViewScrollableContainer;
  27. /**
  28. * @short Unzoomed thumbnail view of a document.
  29. *
  30. * This is an unzoomed thumbnail view of a document. Unlike
  31. * @ref kpZoomedThumbnailView, it never changes the zoom level. And unlike
  32. * @ref kpZoomedView, it never resizes itself. Instead, it changes its
  33. * origin according to the main view's scrollable container so that the
  34. * top-left most document pixel displayed in the scrollable container will
  35. * be visible.
  36. *
  37. * Do not call setZoomLevel() nor setOrigin().
  38. *
  39. * This class is sealed. Do not derive from it.
  40. *
  41. * @author Clarence Dang <dang@kde.org>
  42. */
  43. /*sealed*/ class kpUnzoomedThumbnailView : public kpThumbnailView
  44. {
  45. Q_OBJECT
  46. public:
  47. /**
  48. * Constructs an unzoomed thumbnail view.
  49. */
  50. kpUnzoomedThumbnailView (kpDocument *document,
  51. kpToolToolBar *toolToolBar,
  52. kpViewManager *viewManager,
  53. kpView *buddyView,
  54. kpViewScrollableContainer *scrollableContainer,
  55. TQWidget *parent, const char *name);
  56. /**
  57. * Destructs an unzoomed thumbnail view.
  58. */
  59. virtual ~kpUnzoomedThumbnailView ();
  60. /**
  61. * Implements @ref kpThumbnailView.
  62. */
  63. TQString caption () const;
  64. public slots:
  65. /**
  66. * Changes its origin according to the main view's scrollable container
  67. * so that the top-left most document pixel displayed in the scrollable
  68. * container will be visible.
  69. *
  70. * It tries to maximise the used area of this view. Unused areas will
  71. * be set to the widget background thanks to the mask.
  72. *
  73. * Call this if the size of the document changes.
  74. * Already connected to buddyViewScrollableContainer()'s
  75. * contentsMovingSoon(int,int) signal.
  76. * Already called by @ref kpThumbnailView resizeEvent().
  77. *
  78. * Implements @ref kpView.
  79. */
  80. virtual void adjustToEnvironment ();
  81. private:
  82. struct kpUnzoomedThumbnailViewPrivate *d;
  83. };
  84. #endif // KP_UNZOOMED_THUMBNAIL_VIEW_H