kpresenter

KPrCustomSlideShowDia.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Laurent Montel <montel@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __CUSTOM_SLIDE_SHOW__
00021 #define __CUSTOM_SLIDE_SHOW__
00022 
00023 #include <kdialogbase.h>
00024 #include <qlistbox.h>
00025 #include "global.h"
00026 
00027 class QLineEdit;
00028 class QPushButton;
00029 class KPrDocument;
00030 class QToolButton;
00031 class KPrView;
00032 class KPrPage;
00033 
00034 class KPrCustomSlideShowDia : public KDialogBase
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039     KPrCustomSlideShowDia( KPrView* _view, KPrDocument *_doc, const char* name );
00040     ~KPrCustomSlideShowDia();
00041 public slots:
00042     virtual void slotOk();
00043     void slotDoubleClicked(QListBoxItem *);
00044     void slotTextClicked(QListBoxItem*);
00045     void slotRemove();
00046     void slotAdd();
00047     void slotModify();
00048     void slotCopy();
00049     void slotTest();
00050     void slotPresentationFinished();
00051 
00052 protected:
00053     void hideEvent( QHideEvent* );
00054 
00055     void init();
00056     void updateButton();
00057     bool uniqueName( int val, const QString & name ) const;
00058 
00059     QListBox * list;
00060     QPushButton* m_pRemove;
00061     QPushButton* m_pAdd;
00062     QPushButton* m_pModify;
00063     QPushButton* m_pCopy;
00064     QPushButton* m_pTest;
00065     bool m_bChanged;
00066     KPrDocument *m_doc;
00067     KPrView *m_view;
00068     CustomSlideShowMap m_customSlideShowMap;
00069     QStringList listPageName;
00070 };
00071 
00072 class KPrCustomSlideShowItem : public QListBoxText
00073 {
00074 public:
00075     KPrCustomSlideShowItem( QListBox * listbox, KPrPage * page );
00076     KPrCustomSlideShowItem( KPrPage * page );
00077     KPrCustomSlideShowItem( QListBox * listbox, KPrPage * page, QListBoxItem * after );
00078 
00079     KPrPage * getPage() { return m_page; }
00080 private:
00081     KPrPage * m_page;
00082 };
00083 
00084 class KPrDefineCustomSlideShow : public KDialogBase
00085 {
00086     Q_OBJECT
00087 public:
00088     KPrDefineCustomSlideShow( QWidget* parent, QStringList &_listNameSlideShow, const QPtrList<KPrPage> &pages, const char *name = 0L);
00089     KPrDefineCustomSlideShow( QWidget* parent, const QString &_customName, QStringList &_listNameSlideShow, 
00090                               const QPtrList<KPrPage> &pages, QValueList<KPrPage *> &customPages, const char* name = 0L );
00091 
00092     QString customSlideShowName() const;
00093     QValueList<KPrPage *> customSlides();
00094 
00095 protected slots:
00096     void slotMoveUpSlide();
00097     void slotMoveDownSlide();
00098     void slotMoveRemoveSlide();
00099     void slotMoveInsertSlide();
00100     void slideNameChanged( const QString & _name);
00101     void updateButton();
00102     virtual void slotOk();
00103 
00104 protected:
00105     void init();
00106     QStringList listNameCustomSlideShow;
00107     QListBox *listSlide;
00108     QListBox *listSlideShow;
00109     QToolButton *m_insertSlide;
00110     QToolButton *m_removeSlide;
00111     QToolButton *m_moveUpSlide;
00112     QToolButton *m_moveDownSlide;
00113     QLineEdit *m_name;
00114 
00115 };
00116 
00117 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys