Mark2020H

Timer enabled Image Viewer Part2 of 5

Nov 4th, 2020 (edited)
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. // Header file for Timer enabled Image Viewer part 2 of 5
  2. // MD Harrington  using open source QT
  3. // Class  definitions header file
  4.  
  5. // Links for others who may be interested can be found on  git hub at this address
  6. // https://github.com/markh2016/QT_Timer_Imageviewer.git
  7.  
  8. /* Special word of thanks to Brian  Cairns  Void-realms  Facebook who put tutorials together for us whom  cant afford much  right now  Working version   / desktop  recording  available  at this link https://www.facebook.com/groups/1400884323467285 */
  9.  
  10. #ifndef IMAGEDIALOG_H
  11. #define IMAGEDIALOG_H
  12.  
  13. #include <QDialog>
  14. #include <QDir>
  15. #include <QDebug>
  16. #include <QScrollBar>
  17. #include <QTimer>
  18.  
  19. QT_BEGIN_NAMESPACE
  20. namespace Ui { class ImageDialog; }
  21. QT_END_NAMESPACE
  22.  
  23. class ImageDialog : public QDialog
  24. {
  25.     Q_OBJECT
  26.  
  27. public:
  28.     ImageDialog(QWidget *parent = nullptr);
  29.     ~ImageDialog();
  30.     bool loadDir(const QDir &path);
  31.  
  32. private slots:
  33.      void update();
  34.      void start_M_Timer();
  35.  
  36. private:
  37.     Ui::ImageDialog *ui;
  38.     QDir dirOne = QDir("/home/mark/Pictures") ; // initialise  Directory from which we want to load files
  39.     QStringList list ;
  40.     QTimer *timer ;
  41.  
  42.     int stack ;
  43.     int m_counter=2 ;
  44. };
  45. #endif // IMAGEDIALOG_H
  46.  
Add Comment
Please, Sign In to add comment