ctkScreenshotDialog_p.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0.txt
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkScreenshotDialog_p_h
  15. #define __ctkScreenshotDialog_p_h
  16. // Qt includes
  17. #include <QPointer>
  18. #include <QTimer>
  19. // CTK includes
  20. #include "ctkScreenshotDialog.h"
  21. #include "ui_ctkScreenshotDialog.h"
  22. //-----------------------------------------------------------------------------
  23. /// \ingroup Widgets
  24. class ctkScreenshotDialogPrivate : public QObject, public Ui_ctkScreenshotDialog
  25. {
  26. Q_OBJECT
  27. Q_DECLARE_PUBLIC(ctkScreenshotDialog);
  28. protected:
  29. ctkScreenshotDialog* const q_ptr;
  30. public:
  31. explicit ctkScreenshotDialogPrivate(ctkScreenshotDialog& object);
  32. virtual ~ctkScreenshotDialogPrivate();
  33. void init();
  34. void setupUi(QDialog * widget);
  35. void setWaitingForScreenshot(bool waiting);
  36. bool isWaitingForScreenshot()const;
  37. void useScalarFactor(bool use = true);
  38. public Q_SLOTS:
  39. void saveScreenshot(int delayInSeconds);
  40. void updateFullNameLabel();
  41. void setCountDownLabel(int newValue);
  42. void resetCountDownValue();
  43. void updateCountDown();
  44. void selectScaleFactor(bool scale);
  45. void selectOutputResolution(bool scale);
  46. void lockAspectRatio(bool lock);
  47. void onWidthEdited();
  48. void onHeightEdited();
  49. public:
  50. QPointer<QWidget> WidgetToGrab;
  51. QPushButton* CaptureButton;
  52. int CountDownValue;
  53. QTimer CountDownTimer;
  54. double AspectRatio;
  55. bool AllowTransparency;
  56. };
  57. #endif