MythTV  master
galleryslideview.h
Go to the documentation of this file.
1 
4 #ifndef GALLERYWIDGET_H
5 #define GALLERYWIDGET_H
6 
7 #include "gallerytransitions.h"
8 #include "galleryinfo.h"
9 
10 
11 class MythMenu;
12 class FlatView;
13 
19 };
20 
21 
24 {
25  Q_OBJECT
26 public:
27  GallerySlideView(MythScreenStack *parent, const char *name, bool editsAllowed);
28  ~GallerySlideView() override;
29  bool Create() override; // MythScreenType
30 
31 public slots:
32  void Start(ImageSlideShowType type, int parentId, int selectedId = 0);
33  void Close() override; // MythScreenType
34  void Pulse() override; // MythScreenType
35 
36 signals:
37  void ImageSelected(int);
38 
39 private:
40  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
41  void customEvent(QEvent *event) override; // MythUIType
42  void MenuMain();
43  void MenuTransforms(MythMenu &mainMenu);
44  void Suspend();
45  void Release();
46  void Transform(ImageFileTransform state);
47  void Zoom(int increment = 0);
48  void Pan(QPoint offset = QPoint(0, 0));
49  void SetStatus(QString msg, bool delay = false);
50  void ClearStatus(Slide &slide);
51 
52 private slots:
53  void ShowPrevSlide(int inc = 1);
54  void ShowNextSlide(int inc = 1, bool useTransition = true);
55  void SlideAvailable(int count);
56  void TransitionComplete();
57  void ShowSlide(int direction = 0);
58  void Stop();
59  void Play(bool useTransition = true);
60  static void RepeatOn(int on = 1) { gCoreContext->SaveSetting("GalleryRepeat", on); }
61  static void RepeatOff() { RepeatOn(0); }
62  void ShowInfo();
63  void HideInfo();
64  void ShowCaptions();
65  void HideCaptions();
66  void PlayVideo();
67  void ShowStatus();
68 
69 private:
70  // Theme widgets
71  MythUIImage *m_uiImage {nullptr};
72  MythUIText *m_uiStatus {nullptr};
76 
78  FlatView *m_view {nullptr};
79 
84 
87  int m_slideShowTime {3000};
88  QTimer m_timer;
89  QTimer m_delay;
90  QString m_statusText;
91  bool m_playing {false};
92  bool m_suspended {false};
93  bool m_showCaptions {true};
94  bool m_transitioning {false};
95  bool m_editsAllowed {false};
96 };
97 
98 #endif // GALLERYWIDGET_H
Slide
A specialised image for slideshows.
Definition: galleryslide.h:157
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
ImageSlideShowType
ImageSlideShowType
Type of slide show.
Definition: galleryslideview.h:15
GallerySlideView::m_showCaptions
bool m_showCaptions
If true, captions are shown.
Definition: galleryslideview.h:93
GallerySlideView::Transform
void Transform(ImageFileTransform state)
Action transform request.
Definition: galleryslideview.cpp:469
GallerySlideView::m_uiSlideCount
MythUIText * m_uiSlideCount
Definition: galleryslideview.h:73
GallerySlideView::m_editsAllowed
bool m_editsAllowed
True when edits are enabled.
Definition: galleryslideview.h:95
GallerySlideView::m_mgr
ImageManagerFe & m_mgr
Manages the images.
Definition: galleryslideview.h:77
kBrowseSlides
@ kBrowseSlides
Definition: galleryslideview.h:16
MythScreenStack
Definition: mythscreenstack.h:16
GallerySlideView::m_infoList
InfoList m_infoList
Image details overlay.
Definition: galleryslideview.h:86
GallerySlideView::customEvent
void customEvent(QEvent *event) override
Handle custom events.
Definition: galleryslideview.cpp:215
GallerySlideView::Start
void Start(ImageSlideShowType type, int parentId, int selectedId=0)
Start slideshow.
Definition: galleryslideview.cpp:358
slots
unsigned int slots[4]
Definition: element.cpp:38
GallerySlideView::m_transitioning
bool m_transitioning
True when a transition is in progress.
Definition: galleryslideview.h:94
GallerySlideView::m_uiHideCaptions
MythUIText * m_uiHideCaptions
Definition: galleryslideview.h:75
FlatView
A datastore of images for display by a screen.
Definition: galleryviews.h:99
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
GallerySlideView::TransitionComplete
void TransitionComplete()
Transition to new slide has finished.
Definition: galleryslideview.cpp:619
GallerySlideView::Suspend
void Suspend()
Pause transition timer temporarily.
Definition: galleryslideview.cpp:447
Transition
Base class of an animated transition that can be accelerated & reversed.
Definition: gallerytransitions.h:29
GallerySlideView::m_uiImage
MythUIImage * m_uiImage
Definition: galleryslideview.h:71
GallerySlideView::m_slides
SlideBuffer m_slides
A queue of slides used to display images.
Definition: galleryslideview.h:85
GallerySlideView::Stop
void Stop()
Stop a playing slideshow.
Definition: galleryslideview.cpp:420
GallerySlideView::m_slideShowTime
int m_slideShowTime
Time to display a slide in a slideshow.
Definition: galleryslideview.h:87
GallerySlideView::SlideAvailable
void SlideAvailable(int count)
Start transition.
Definition: galleryslideview.cpp:571
GallerySlideView::GallerySlideView
GallerySlideView(MythScreenStack *parent, const char *name, bool editsAllowed)
Constructor.
Definition: galleryslideview.cpp:21
GallerySlideView::ShowNextSlide
void ShowNextSlide(int inc=1, bool useTransition=true)
Display the next slide in the sequence.
Definition: galleryslideview.cpp:691
GallerySlideView::PlayVideo
void PlayVideo()
Starts internal player for video.
Definition: galleryslideview.cpp:724
GallerySlideView::ClearStatus
void ClearStatus(Slide &slide)
Definition: galleryslideview.cpp:761
GallerySlideView::m_updateTransition
TransitionNone m_updateTransition
Instant transition that is always used for start-up & image updates.
Definition: galleryslideview.h:83
GallerySlideView::HideCaptions
void HideCaptions()
Hide text widgets.
Definition: galleryslideview.cpp:536
ImageFileTransform
ImageFileTransform
Image transformations.
Definition: imagemetadata.h:46
gallerytransitions.h
Provides transitions for slideshows.
GallerySlideView::ShowPrevSlide
void ShowPrevSlide(int inc=1)
Display the previous slide in the sequence.
Definition: galleryslideview.cpp:671
GallerySlideView::m_view
FlatView * m_view
List of images comprising the slideshow.
Definition: galleryslideview.h:78
GallerySlideView::Play
void Play(bool useTransition=true)
Start a slideshow.
Definition: galleryslideview.cpp:432
GallerySlideView
Slideshow screen.
Definition: galleryslideview.h:24
GallerySlideView::Close
void Close() override
Definition: galleryslideview.cpp:401
GallerySlideView::m_delay
QTimer m_delay
Status delay timer.
Definition: galleryslideview.h:89
kNormalSlideShow
@ kNormalSlideShow
Definition: galleryslideview.h:17
GallerySlideView::m_transition
Transition & m_transition
Selected transition.
Definition: galleryslideview.h:81
GallerySlideView::Zoom
void Zoom(int increment=0)
Zoom current slide.
Definition: galleryslideview.cpp:487
GallerySlideView::m_uiStatus
MythUIText * m_uiStatus
Definition: galleryslideview.h:72
TransitionNone
Switches images instantly with no effects.
Definition: gallerytransitions.h:74
galleryinfo.h
The info/details overlay that shows image metadata.
SlideBuffer
Provides a queue/pool of slides.
Definition: galleryslide.h:216
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:57
GallerySlideView::m_playing
bool m_playing
True when slideshow is running.
Definition: galleryslideview.h:91
GallerySlideView::Create
bool Create() override
Initialises the graphical elements.
Definition: galleryslideview.cpp:72
GallerySlideView::ShowSlide
void ShowSlide(int direction=0)
Display slide.
Definition: galleryslideview.cpp:547
GallerySlideView::m_statusText
QString m_statusText
Text to display as status.
Definition: galleryslideview.h:90
TransitionRegistry
Manages transitions available to s psinter.
Definition: gallerytransitions.h:185
GallerySlideView::ShowCaptions
void ShowCaptions()
Show text widgets.
Definition: galleryslideview.cpp:526
GallerySlideView::m_uiCaptionText
MythUIText * m_uiCaptionText
Definition: galleryslideview.h:74
MythMenu
Definition: mythdialogbox.h:93
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
GallerySlideView::ImageSelected
void ImageSelected(int)
GallerySlideView::SetStatus
void SetStatus(QString msg, bool delay=false)
Displays status text (Loading, Paused etc.)
Definition: galleryslideview.cpp:741
ImageManagerFe
The image manager for use by Frontends.
Definition: imagemanager.h:457
GallerySlideView::m_suspended
bool m_suspended
True when transition is running or video playing.
Definition: galleryslideview.h:92
GallerySlideView::~GallerySlideView
~GallerySlideView() override
Destructor.
Definition: galleryslideview.cpp:61
InfoList
The image info/details buttonlist overlay that displays exif tags.
Definition: galleryinfo.h:23
GallerySlideView::MenuTransforms
void MenuTransforms(MythMenu &mainMenu)
Add Transforms submenu.
Definition: galleryslideview.cpp:323
GallerySlideView::ShowStatus
void ShowStatus()
Definition: galleryslideview.cpp:754
GallerySlideView::HideInfo
void HideInfo()
Hide exif info list.
Definition: galleryslideview.cpp:517
GallerySlideView::Release
void Release()
Unpause transition timer.
Definition: galleryslideview.cpp:457
GallerySlideView::ShowInfo
void ShowInfo()
Show exif info list.
Definition: galleryslideview.cpp:508
GallerySlideView::Pan
void Pan(QPoint offset=QPoint(0, 0))
Pan current slide.
Definition: galleryslideview.cpp:498
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:899
GallerySlideView::m_timer
QTimer m_timer
Slide duration timer.
Definition: galleryslideview.h:88
kRecursiveSlideShow
@ kRecursiveSlideShow
Definition: galleryslideview.h:18
GallerySlideView::Pulse
void Pulse() override
Update transition.
Definition: galleryslideview.cpp:119
GallerySlideView::RepeatOn
static void RepeatOn(int on=1)
Definition: galleryslideview.h:60
GallerySlideView::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Handle keypresses.
Definition: galleryslideview.cpp:133
GallerySlideView::m_availableTransitions
TransitionRegistry m_availableTransitions
Transitions available.
Definition: galleryslideview.h:80
GallerySlideView::MenuMain
void MenuMain()
Shows the popup menu.
Definition: galleryslideview.cpp:268
GallerySlideView::RepeatOff
static void RepeatOff()
Definition: galleryslideview.h:61