Back to index

scribus-ng  1.3.4.dfsg+svn20071115
nftdialog.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008  *   Riku Leino, tsoots@gmail.com                                          *
00009  ***************************************************************************/
00010 
00011 #ifndef NFTDIALOG_H
00012 #define NFTDIALOG_H
00013 
00014 #include <utility>
00015 #include <vector>
00016 #include <qcursor.h>
00017 #include <qdialog.h>
00018 #include <qframe.h>
00019 #include <qiconview.h> 
00020 #include <qiconset.h>
00021 #include <qiconview.h> 
00022 #include <qlabel.h>
00023 #include <qlayout.h>
00024 #include <qlistbox.h>
00025 #include <qpixmap.h> 
00026 #include <qpopupmenu.h>
00027 #include <qpushbutton.h>
00028 #include <qsplitter.h>
00029 #include <qtextbrowser.h> 
00030 #include <qtoolbutton.h>
00031 #include "nftsettings.h"
00032 
00033 typedef std::pair<nfttemplate*, QIconViewItem*> ListItem;
00034 
00035 class nftdialog: public QDialog
00036 {
00037        Q_OBJECT
00038 
00039 private:
00040        nftsettings* settings;
00041        QListBox* categoryList;
00042        QIconView* tnailGrid;
00043        QFrame* detailBar;
00044        QTextBrowser* infoLabel;
00045        QIconView* imgLabel;
00046        QTextBrowser* aboutLabel;
00047        QWidget* tmpSpacer;
00048        QToolButton* imgButton;
00049        QToolButton* infoButton;
00050        QToolButton* aboutButton;
00051        QPushButton* settingsButton;
00052        QPushButton* okButton;
00053        QPushButton* cancelButton;
00054        QBoxLayout* mainlo;
00055        QBoxLayout* detaillo;
00056        QBoxLayout* dtbarlo;
00057        QPopupMenu* popUp;
00058        std::vector<ListItem*> iconItems;
00059        void setupCategories();
00060        void setupListItems();
00061        void setupAbout();
00062 public:
00063        nfttemplate* currentDocumentTemplate;
00064        nftdialog(QWidget* parent, QString lang, QString templateDir);
00065        ~nftdialog();
00066 private slots: 
00067        void setTNails();
00068        void infoToggle();
00069        void imgToggle();
00070        void aboutToggle();
00071        void setInfo(QIconViewItem* item);
00072        void exitOK();
00073        void exitCancel();
00074        void getCurrentDocumentTemplate(QIconViewItem* item);
00075        void showPopup(QIconViewItem* item, const QPoint& point);
00076        void removeTemplate();
00077 };
00078 
00079 #endif