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 // MythGallery headers 00028 #include "iconview.h" 00029 #include "sequence.h" 00030 00031 class QImage; 00032 class QTimer; 00033 class ThumbItem; 00034 00035 class ImageView 00036 { 00037 public: 00038 ImageView(const ThumbList &itemList, 00039 int *pos, int slideShow, int sortorder); 00040 virtual ~ImageView(); 00041 00042 protected: 00043 // Commands 00044 virtual void Rotate(int angle) = 0; 00045 virtual void DisplayNext(bool reset, bool loadImage) = 0; 00046 virtual void DisplayPrev(bool reset, bool loadImage) = 0; 00047 virtual void Load(void) = 0; 00048 00049 // Sets 00050 virtual void SetZoom(float zoom) = 0; 00051 00052 // Effects 00053 virtual void RegisterEffects(void) = 0; 00054 virtual QString GetRandomEffect(void) const; 00055 virtual void RunEffect(const QString &effect) = 0; 00056 00057 void UpdateLCD(const ThumbItem *item); 00058 QString GetDescriptionStatus(void) const; 00059 void GetScreenShot(QImage& image, const ThumbItem *item); 00060 00061 protected: 00062 QSize m_screenSize; 00063 float m_wmult; 00064 float m_hmult; 00065 int m_pos; 00066 int *m_savedPos; 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.6.3