kpresenter

KPrTransEffectDia.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 Ariya Hidayat <ariya@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20// Slide Transition Effect dialog box
21
22#ifndef __TRANSEFFECTDIA_H
23#define __TRANSEFFECTDIA_H
24
25#include <kdialogbase.h>
26#include <tqlabel.h>
27#include <tqtimer.h>
28#include "global.h"
29
30class KPrDocument;
31class KPrView;
32class TQCheckBox;
33class TQSplitter;
34class TQLabel;
35class TQPushButton;
36class TQCheckBox;
37class TQSlider;
38class TQString;
39class TQComboBox;
40class KPrBackGround;
41class KPrObject;
42class KPPresStructObjectItem;
43class KURLRequester;
44class KIntNumInput;
45class KPrSoundPlayer;
46class KPrPageEffects;
47
48class KPrEffectPreview : public TQLabel
49{
50 TQ_OBJECT
51
52
53public:
54 KPrEffectPreview( TQWidget *parent, KPrDocument *_doc, KPrView *_view );
55
56public slots:
57 void setPixmap( const TQPixmap& pixmap );
58 void run( PageEffect effect, EffectSpeed speed );
59
60protected:
61 KPrDocument *doc;
62 KPrView *view;
63 TQPixmap m_pixmap;
64 TQPixmap m_target;
65
66 TQTimer m_pageEffectTimer;
67 KPrPageEffects *m_pageEffect;
68
69protected slots:
70 void slotDoPageEffect();
71};
72
73
74class KPrTransEffectDia: public KDialogBase
75{
76 TQ_OBJECT
77
78
79public:
80 KPrTransEffectDia( TQWidget *parent, const char *name,
81 KPrDocument *_doc, KPrView *_view );
82
83 PageEffect getPageEffect() const { return pageEffect; }
84 EffectSpeed getPageEffectSpeed() const { return speed; }
85 bool getSoundEffect() const { return soundEffect; }
86 TQString getSoundFileName() const { return soundFileName; }
87 bool getAutoAdvance() const { return false; } // FIXME !
88 int getSlideTime() const { return slideTime; }
89
90signals:
91 void apply( bool global );
92
93protected:
94 virtual void slotOk();
95 virtual void slotUser1();
96
97 KPrDocument *doc;
98 KPrView *view;
99
100 PageEffect pageEffect;
101 EffectSpeed speed;
102 bool soundEffect;
103 TQString soundFileName;
104
105 KPrEffectPreview *effectPreview;
106
107 TQListBox *effectList;
108 TQComboBox *speedCombo;
109
110 TQCheckBox *automaticPreview;
111 TQPushButton *previewButton;
112
113 TQCheckBox *checkSoundEffect;
114 TQLabel *lSoundEffect;
115 KURLRequester *requester;
116 TQPushButton *buttonTestPlaySoundEffect, *buttonTestStopSoundEffect;
117
118 KIntNumInput* timeSlider;
119 int slideTime;
120
121 KPrSoundPlayer *soundPlayer;
122
123protected slots:
124
125 void preview();
126 void effectChanged( int );
127 void effectChanged();
128
129 void speedChanged( int );
130 void timeChanged( int );
131
132 void soundEffectChanged();
133 void slotRequesterClicked( KURLRequester * );
134 void slotSoundFileChanged( const TQString& );
135 void playSound();
136 void stopSound();
137};
138
139#endif // __TRANSEFFECTDIA_H