summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrCustomSlideShowDia.h
blob: 94e6bf2ac9e6b5e04b3967491b9da52fbcc6f001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* This file is part of the KDE project
   Copyright (C) 2004 Laurent Montel <[email protected]>

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
*/

#ifndef __CUSTOM_SLIDE_SHOW__
#define __CUSTOM_SLIDE_SHOW__

#include <kdialogbase.h>
#include <tqlistbox.h>
#include "global.h"

class TQLineEdit;
class TQPushButton;
class KPrDocument;
class TQToolButton;
class KPrView;
class KPrPage;

class KPrCustomSlideShowDia : public KDialogBase
{
    Q_OBJECT
  TQ_OBJECT

public:
    KPrCustomSlideShowDia( KPrView* _view, KPrDocument *_doc, const char* name );
    ~KPrCustomSlideShowDia();
public slots:
    virtual void slotOk();
    void slotDoubleClicked(TQListBoxItem *);
    void slotTextClicked(TQListBoxItem*);
    void slotRemove();
    void slotAdd();
    void slotModify();
    void slotCopy();
    void slotTest();
    void slotPresentationFinished();

protected:
    void hideEvent( TQHideEvent* );

    void init();
    void updateButton();
    bool uniqueName( int val, const TQString & name ) const;

    TQListBox * list;
    TQPushButton* m_pRemove;
    TQPushButton* m_pAdd;
    TQPushButton* m_pModify;
    TQPushButton* m_pCopy;
    TQPushButton* m_pTest;
    bool m_bChanged;
    KPrDocument *m_doc;
    KPrView *m_view;
    CustomSlideShowMap m_customSlideShowMap;
    TQStringList listPageName;
};

class KPrCustomSlideShowItem : public TQListBoxText
{
public:
    KPrCustomSlideShowItem( TQListBox * listbox, KPrPage * page );
    KPrCustomSlideShowItem( KPrPage * page );
    KPrCustomSlideShowItem( TQListBox * listbox, KPrPage * page, TQListBoxItem * after );

    KPrPage * getPage() { return m_page; }
private:
    KPrPage * m_page;
};

class KPrDefineCustomSlideShow : public KDialogBase
{
    Q_OBJECT
  TQ_OBJECT
public:
    KPrDefineCustomSlideShow( TQWidget* tqparent, TQStringList &_listNameSlideShow, const TQPtrList<KPrPage> &pages, const char *name = 0L);
    KPrDefineCustomSlideShow( TQWidget* tqparent, const TQString &_customName, TQStringList &_listNameSlideShow, 
                              const TQPtrList<KPrPage> &pages, TQValueList<KPrPage *> &customPages, const char* name = 0L );

    TQString customSlideShowName() const;
    TQValueList<KPrPage *> customSlides();

protected slots:
    void slotMoveUpSlide();
    void slotMoveDownSlide();
    void slotMoveRemoveSlide();
    void slotMoveInsertSlide();
    void slideNameChanged( const TQString & _name);
    void updateButton();
    virtual void slotOk();

protected:
    void init();
    TQStringList listNameCustomSlideShow;
    TQListBox *listSlide;
    TQListBox *listSlideShow;
    TQToolButton *m_insertSlide;
    TQToolButton *m_removeSlide;
    TQToolButton *m_moveUpSlide;
    TQToolButton *m_moveDownSlide;
    TQLineEdit *m_name;

};

#endif