ctkScreenshotDialog_p.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 <QTimer>
  18. // CTK includes
  19. #include "ctkScreenshotDialog.h"
  20. #include "ui_ctkScreenshotDialog.h"
  21. //-----------------------------------------------------------------------------
  22. /// \ingroup Widgets
  23. class ctkScreenshotDialogPrivate : public QObject, public Ui_ctkScreenshotDialog
  24. {
  25. Q_OBJECT
  26. Q_DECLARE_PUBLIC(ctkScreenshotDialog);
  27. protected:
  28. ctkScreenshotDialog* const q_ptr;
  29. public:
  30. explicit ctkScreenshotDialogPrivate(ctkScreenshotDialog& object);
  31. virtual ~ctkScreenshotDialogPrivate();
  32. void init();
  33. void setupUi(QDialog * widget);
  34. void setWaitingForScreenshot(bool waiting);
  35. bool isWaitingForScreenshot()const;
  36. public Q_SLOTS:
  37. void saveScreenshot(int delayInSeconds);
  38. void updateFullNameLabel();
  39. void setCountDownLabel(int newValue);
  40. void resetCountDownValue();
  41. void updateCountDown();
  42. public:
  43. QWeakPointer<QWidget> WidgetToGrab;
  44. QPushButton* CaptureButton;
  45. int CountDownValue;
  46. QTimer CountDownTimer;
  47. };
  48. #endif