kpresenter
KPrTransEffectDia.h
00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- 00002 /* This file is part of the KDE project 00003 Copyright (C) 2002 Ariya Hidayat <ariya@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 // Slide Transition Effect dialog box 00022 00023 #ifndef __TRANSEFFECTDIA_H 00024 #define __TRANSEFFECTDIA_H 00025 00026 #include <kdialogbase.h> 00027 #include <qlabel.h> 00028 #include <qtimer.h> 00029 #include "global.h" 00030 00031 class KPrDocument; 00032 class KPrView; 00033 class QCheckBox; 00034 class QSplitter; 00035 class QLabel; 00036 class QPushButton; 00037 class QCheckBox; 00038 class QSlider; 00039 class QString; 00040 class QComboBox; 00041 class KPrBackGround; 00042 class KPrObject; 00043 class KPPresStructObjectItem; 00044 class KURLRequester; 00045 class KIntNumInput; 00046 class KPrSoundPlayer; 00047 class KPrPageEffects; 00048 00049 class KPrEffectPreview : public QLabel 00050 { 00051 Q_OBJECT 00052 00053 public: 00054 KPrEffectPreview( QWidget *parent, KPrDocument *_doc, KPrView *_view ); 00055 00056 public slots: 00057 void setPixmap( const QPixmap& pixmap ); 00058 void run( PageEffect effect, EffectSpeed speed ); 00059 00060 protected: 00061 KPrDocument *doc; 00062 KPrView *view; 00063 QPixmap m_pixmap; 00064 QPixmap m_target; 00065 00066 QTimer m_pageEffectTimer; 00067 KPrPageEffects *m_pageEffect; 00068 00069 protected slots: 00070 void slotDoPageEffect(); 00071 }; 00072 00073 00074 class KPrTransEffectDia: public KDialogBase 00075 { 00076 Q_OBJECT 00077 00078 public: 00079 KPrTransEffectDia( QWidget *parent, const char *name, 00080 KPrDocument *_doc, KPrView *_view ); 00081 00082 PageEffect getPageEffect() const { return pageEffect; } 00083 EffectSpeed getPageEffectSpeed() const { return speed; } 00084 bool getSoundEffect() const { return soundEffect; } 00085 QString getSoundFileName() const { return soundFileName; } 00086 bool getAutoAdvance() const { return false; } // FIXME ! 00087 int getSlideTime() const { return slideTime; } 00088 00089 signals: 00090 void apply( bool global ); 00091 00092 protected: 00093 virtual void slotOk(); 00094 virtual void slotUser1(); 00095 00096 KPrDocument *doc; 00097 KPrView *view; 00098 00099 PageEffect pageEffect; 00100 EffectSpeed speed; 00101 bool soundEffect; 00102 QString soundFileName; 00103 00104 KPrEffectPreview *effectPreview; 00105 00106 QListBox *effectList; 00107 QComboBox *speedCombo; 00108 00109 QCheckBox *automaticPreview; 00110 QPushButton *previewButton; 00111 00112 QCheckBox *checkSoundEffect; 00113 QLabel *lSoundEffect; 00114 KURLRequester *requester; 00115 QPushButton *buttonTestPlaySoundEffect, *buttonTestStopSoundEffect; 00116 00117 KIntNumInput* timeSlider; 00118 int slideTime; 00119 00120 KPrSoundPlayer *soundPlayer; 00121 00122 protected slots: 00123 00124 void preview(); 00125 void effectChanged( int ); 00126 void effectChanged(); 00127 00128 void speedChanged( int ); 00129 void timeChanged( int ); 00130 00131 void soundEffectChanged(); 00132 void slotRequesterClicked( KURLRequester * ); 00133 void slotSoundFileChanged( const QString& ); 00134 void playSound(); 00135 void stopSound(); 00136 }; 00137 00138 #endif // __TRANSEFFECTDIA_H