kpresenter

KPrCustomSlideShowDia.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Laurent Montel <montel@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#ifndef __CUSTOM_SLIDE_SHOW__
21#define __CUSTOM_SLIDE_SHOW__
22
23#include <kdialogbase.h>
24#include <tqlistbox.h>
25#include "global.h"
26
27class TQLineEdit;
28class TQPushButton;
29class KPrDocument;
30class TQToolButton;
31class KPrView;
32class KPrPage;
33
34class KPrCustomSlideShowDia : public KDialogBase
35{
36 TQ_OBJECT
37
38
39public:
40 KPrCustomSlideShowDia( KPrView* _view, KPrDocument *_doc, const char* name );
41 ~KPrCustomSlideShowDia();
42public slots:
43 virtual void slotOk();
44 void slotDoubleClicked(TQListBoxItem *);
45 void slotTextClicked(TQListBoxItem*);
46 void slotRemove();
47 void slotAdd();
48 void slotModify();
49 void slotCopy();
50 void slotTest();
51 void slotPresentationFinished();
52
53protected:
54 void hideEvent( TQHideEvent* );
55
56 void init();
57 void updateButton();
58 bool uniqueName( int val, const TQString & name ) const;
59
60 TQListBox * list;
61 TQPushButton* m_pRemove;
62 TQPushButton* m_pAdd;
63 TQPushButton* m_pModify;
64 TQPushButton* m_pCopy;
65 TQPushButton* m_pTest;
66 bool m_bChanged;
67 KPrDocument *m_doc;
68 KPrView *m_view;
69 CustomSlideShowMap m_customSlideShowMap;
70 TQStringList listPageName;
71};
72
73class KPrCustomSlideShowItem : public TQListBoxText
74{
75public:
76 KPrCustomSlideShowItem( TQListBox * listbox, KPrPage * page );
77 KPrCustomSlideShowItem( KPrPage * page );
78 KPrCustomSlideShowItem( TQListBox * listbox, KPrPage * page, TQListBoxItem * after );
79
80 KPrPage * getPage() { return m_page; }
81private:
82 KPrPage * m_page;
83};
84
85class KPrDefineCustomSlideShow : public KDialogBase
86{
87 TQ_OBJECT
88
89public:
90 KPrDefineCustomSlideShow( TQWidget* parent, TQStringList &_listNameSlideShow, const TQPtrList<KPrPage> &pages, const char *name = 0L);
91 KPrDefineCustomSlideShow( TQWidget* parent, const TQString &_customName, TQStringList &_listNameSlideShow,
92 const TQPtrList<KPrPage> &pages, TQValueList<KPrPage *> &customPages, const char* name = 0L );
93
94 TQString customSlideShowName() const;
95 TQValueList<KPrPage *> customSlides();
96
97protected slots:
98 void slotMoveUpSlide();
99 void slotMoveDownSlide();
100 void slotMoveRemoveSlide();
101 void slotMoveInsertSlide();
102 void slideNameChanged( const TQString & _name);
103 void updateButton();
104 virtual void slotOk();
105
106protected:
107 void init();
108 TQStringList listNameCustomSlideShow;
109 TQListBox *listSlide;
110 TQListBox *listSlideShow;
111 TQToolButton *m_insertSlide;
112 TQToolButton *m_removeSlide;
113 TQToolButton *m_moveUpSlide;
114 TQToolButton *m_moveDownSlide;
115 TQLineEdit *m_name;
116
117};
118
119#endif