Back to index

scribus-ng  1.3.4.dfsg+svn20071115
tree.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 #ifndef TREE_H
00008 #define TREE_H
00009 
00010 #include <qptrlist.h>
00011 #include <qvaluelist.h>
00012 #include <qpixmap.h>
00013 #include <qlistview.h>
00014 
00015 #include "scribusapi.h"
00016 #include "scrpalettebase.h"
00017 
00018 class QVBoxLayout;
00019 class QHBoxLayout;
00020 class QGridLayout;
00021 class ScribusMainWindow;
00022 class ScribusDoc;
00023 class PageItem;
00024 class Page;
00025 class DynamicTip;
00026 
00027 class SCRIBUS_API TreeItem : public QListViewItem
00028 {
00029 public:
00030        TreeItem(TreeItem* parent, TreeItem* after);
00031        TreeItem(QListView* parent, TreeItem* after);
00032        ~TreeItem() {};
00033        PageItem *PageItemObject;
00034        Page *PageObject;
00035        int type;
00036 };
00037 
00038 class SCRIBUS_API Tree : public ScrPaletteBase
00039 {
00040        Q_OBJECT
00041 
00042 public:
00043        Tree( QWidget* parent );
00044        void resizeEvent(QResizeEvent *r);
00045        void setMainWindow(ScribusMainWindow *mw);
00046        void setDoc(ScribusDoc *);
00047        void unsetDoc();
00048        void reopenTree();
00049        QListViewItem* getListItem(uint SNr, int Nr);
00050        void setItemIcon(QListViewItem *item, PageItem *pgItem);
00051        void parseSubGroup(int level, TreeItem* object, QPtrList<PageItem> *subGroupList, int itemType);
00052        void buildReopenVals();
00053 
00054 public slots:
00055        void BuildTree(bool storeVals = true);
00056        void languageChange();
00057        void slotShowSelect(uint SNr, int Nr);
00058        void setPaletteShown(bool);
00059 
00060 signals:
00061        void ToggleAllPalettes();
00062        void selectElement(int, int, bool);
00063        void selectPage(int);
00064        void selectMasterPage(QString);
00065 
00066 protected slots:
00067        void slotRightClick(QListViewItem* ite, const QPoint &, int col);
00068        void slotRenameItem();
00069        void slotDoRename(QListViewItem* ite, int col);
00070        void slotSelect(QListViewItem* ite);
00071 protected:
00072        void clearPalette();
00073        int idElemCol;
00074        QListView* reportDisplay;
00075        QListViewItem* freeObjects;
00076        QListViewItem* rootObject;
00077        QListViewItem* currentObject;
00078        int currentColumn;
00079        ScribusMainWindow* m_MainWindow;
00080        QPixmap imageIcon;
00081        QPixmap textIcon;
00082        QPixmap lineIcon;
00083        QPixmap polygonIcon;
00084        QPixmap polylineIcon;
00085        QPixmap groupIcon;
00086        QPixmap buttonIcon;
00087        QPixmap textFieldIcon;
00088        QPixmap checkBoxIcon;
00089        QPixmap comboBoxIcon;
00090        QPixmap listBoxIcon;
00091        QPixmap annotTextIcon;
00092        QPixmap annotLinkIcon;
00093        bool selectionTriggered;
00094        ScribusDoc *currDoc;
00095        DynamicTip* dynTip;
00096 };
00097 
00098 #endif // TREE_H