00001 // -*- Mode: c++ -*- 00002 /* ============================================================ 00003 * File : imageview.h 00004 * Description : 00005 * 00006 * Copyright 2004-2006 Renchi Raju, Daniel Kristjansson 00007 * 00008 * This program is free software; you can redistribute it 00009 * and/or modify it under the terms of the GNU General 00010 * Public License as published bythe Free Software Foundation; 00011 * either version 2, or (at your option) 00012 * any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * ============================================================ */ 00020 00021 #ifndef IMAGEVIEW_H 00022 #define IMAGEVIEW_H 00023 00024 #include <vector> 00025 using namespace std; 00026 00027 // Qt headers 00028 #include <qpointarray.h> 00029 00030 // MythGallery headers 00031 #include "iconview.h" 00032 #include "sequence.h" 00033 00034 class QImage; 00035 class QTimer; 00036 class ThumbItem; 00037 00038 class ImageView 00039 { 00040 public: 00041 ImageView(const ThumbList &itemList, 00042 int pos, int slideShow, int sortorder); 00043 virtual ~ImageView(); 00044 00045 protected: 00046 // Commands 00047 virtual void Rotate(int angle) = 0; 00048 virtual void DisplayNext(bool reset, bool loadImage) = 0; 00049 virtual void DisplayPrev(bool reset, bool loadImage) = 0; 00050 virtual void Load(void) = 0; 00051 00052 // Sets 00053 virtual void SetZoom(float zoom) = 0; 00054 00055 // Effects 00056 virtual void RegisterEffects(void) = 0; 00057 virtual QString GetRandomEffect(void) const; 00058 virtual void RunEffect(const QString &effect) = 0; 00059 00060 void UpdateLCD(const ThumbItem *item); 00061 QString GetDescriptionStatus(void) const; 00062 protected: 00063 QSize m_screenSize; 00064 float m_wmult; 00065 float m_hmult; 00066 int m_pos; 00067 ThumbList m_itemList; 00068 int m_movieState; 00069 float m_zoom; 00070 00071 bool m_info_show; 00072 bool m_info_show_short; 00073 00074 // Common slideshow variables 00075 bool m_slideshow_running; 00076 int m_slideshow_sequencing; 00077 int m_slideshow_sequencing_inc_order; 00078 SequenceBase *m_slideshow_sequence; 00079 int m_slideshow_frame_delay; 00080 int m_slideshow_frame_delay_state; 00081 QTimer *m_slideshow_timer; 00082 const char *m_slideshow_mode; 00083 00084 // Common effect state variables 00085 bool m_effect_running; 00086 int m_effect_current_frame; 00087 QString m_effect_method; 00088 QMap<QString,QString> m_effect_map; 00089 bool m_effect_random; 00090 }; 00091 00092 #endif /* IMAGEVIEW_H */
1.5.5