kpresenter
KPrMSPresentationSetup.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef mspresentation_h
00024 #define mspresentation_h
00025
00026 #include <kwizard.h>
00027
00028 #include <qdialog.h>
00029 #include <qvaluelist.h>
00030
00031
00032 class KPrDocument;
00033 class KPrView;
00034
00035 class KURLRequester;
00036 class KColorButton;
00037 class KListView;
00038 class KIntNumInput;
00039 class KLineEdit;
00040 class KComboBox;
00041
00042 class QVBox;
00043 class QHBox;
00044
00045 class QListViewItem;
00046 class QCloseEvent;
00047 class KProgress;
00048 class QLabel;
00049 class QGroupBox;
00050 class QVBoxLayout;
00051
00052 class KPrMSPresentation
00053 {
00054 public:
00055
00056 KPrMSPresentation( KPrDocument *_doc, KPrView *_view );
00057 KPrMSPresentation( const KPrMSPresentation &msPres );
00058
00059 void setTitle( const QString &_title )
00060 { title = _title; }
00061 void setBackColour( const QColor &_backColour )
00062 { backColour = _backColour; }
00063 void setTextColour( const QColor &_textColour )
00064 { textColour = _textColour; }
00065 void setPath( const QString &_path )
00066 { path = _path; }
00067
00068 QString getTitle() const { return title; }
00069 QColor getBackColour() const { return backColour; }
00070 QColor getTextColour() const { return textColour; }
00071 QString getPath() const { return path; }
00072
00073 struct SlideInfo {
00074 int pageNumber;
00075 };
00076 QValueList<SlideInfo> getSlideInfos() const { return slideInfos; }
00077
00078 int initSteps() const { return 7; }
00079 int slidesSteps() { return slideInfos.count(); }
00080 int indexFileSteps() const { return 4 + slideInfos.count(); }
00081
00082 void initCreation( KProgress *progressBar );
00083 void createSlidesPictures( KProgress *progressBar );
00084 void createIndexFile( KProgress *progressBar );
00085
00086 protected:
00087 void init();
00088
00089 KPrDocument *doc;
00090 KPrView *view;
00091
00092 QString title;
00093 QValueList<SlideInfo> slideInfos;
00094 QColor backColour, textColour;
00095 QString path;
00096 QString slidePath;
00097
00098 };
00099
00100 class KPrMSPresentationSetup : public QDialog
00101 {
00102 Q_OBJECT
00103
00104 public:
00105 KPrMSPresentationSetup( KPrDocument *_doc, KPrView *_view );
00106 ~KPrMSPresentationSetup();
00107
00108 static void createMSPresentation( KPrDocument *_doc, KPrView *_view );
00109
00110 protected:
00111 KPrDocument *doc;
00112 KPrView *view;
00113 KPrMSPresentation msPres;
00114
00115 KLineEdit *title;
00116 KColorButton *textColour, *backColour;
00117 QGroupBox *colourGroup;
00118 QVBoxLayout *mainLayout;
00119 KURLRequester *path;
00120
00121 protected slots:
00122 void slotChoosePath(const QString &);
00123 virtual void finish();
00124 virtual void helpMe();
00125 void showColourGroup(bool on);
00126 };
00127
00128 class KPrMSPresentationCreateDialog : public QDialog
00129 {
00130 Q_OBJECT
00131
00132 public:
00133 KPrMSPresentationCreateDialog( KPrDocument *_doc, KPrView *_view, const KPrMSPresentation &_msPres );
00134 ~KPrMSPresentationCreateDialog();
00135
00136 static void createMSPresentation( KPrDocument *_doc, KPrView *_view, const KPrMSPresentation &_msPres );
00137
00138 void start();
00139
00140 void initCreation();
00141 void createSlidesPictures();
00142 void createIndexFile();
00143
00144 protected:
00145 void setupGUI();
00146 void resizeEvent( QResizeEvent *e );
00147
00148 KPrView *view;
00149 KPrDocument *doc;
00150 KPrMSPresentation msPres;
00151
00152 KProgress *progressBar;
00153 QLabel *step1, *step2, *step3;
00154 QPushButton *bDone;
00155 QVBox *back;
00156
00157 };
00158 #endif
00159
|