home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / outlinepalette.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-12-12  |  2.8 KB  |  118 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef OUTLINEPALETTE_H
  8. #define OUTLINEPALETTE_H
  9.  
  10. #include <QPixmap>
  11. #include <QTreeWidget>
  12. #include <QTreeWidgetItem>
  13. #include <QLineEdit>
  14. #include <QList>
  15. #include <QLabel>
  16.  
  17. class QEvent;
  18.  
  19. #include "scribusapi.h"
  20. #include "scrpalettebase.h"
  21.  
  22. class ScribusMainWindow;
  23. class ScribusDoc;
  24. class PageItem;
  25. class Page;
  26.  
  27. class SCRIBUS_API OutlineTreeItem : public QTreeWidgetItem
  28. {
  29. public:
  30.     OutlineTreeItem(OutlineTreeItem* parent, OutlineTreeItem* after);
  31.     OutlineTreeItem(QTreeWidget* parent, OutlineTreeItem* after);
  32.     ~OutlineTreeItem() {};
  33.     PageItem *PageItemObject;
  34.     Page *PageObject;
  35.     int type;
  36. };
  37.  
  38. class SCRIBUS_API OutlineWidget : public QTreeWidget
  39. {
  40. public:
  41.     OutlineWidget(QWidget* parent);
  42.     ~OutlineWidget() {};
  43.  
  44.     void selectItems(QList<QTreeWidgetItem*> items);
  45.  
  46. protected:
  47.     bool viewportEvent(QEvent *event);
  48. };
  49.  
  50. class SCRIBUS_API OutlinePalette : public ScrPaletteBase
  51. {
  52.     Q_OBJECT
  53.  
  54. public:
  55.     OutlinePalette( QWidget* parent );
  56.     
  57.     virtual void changeEvent(QEvent *e);
  58.     
  59. //    void resizeEvent(QResizeEvent *r);
  60.     void setMainWindow(ScribusMainWindow *mw);
  61.     void setDoc(ScribusDoc *);
  62.     void unsetDoc();
  63.     void reopenTree();
  64.     QTreeWidgetItem* getListItem(int SNr, int Nr);
  65.     void setItemIcon(QTreeWidgetItem *item, PageItem *pgItem);
  66.     void parseSubGroup(int level, OutlineTreeItem* object, QList<PageItem*> *subGroupList, int itemType);
  67.     void buildReopenVals();
  68.  
  69. public slots:
  70.     void BuildTree(bool storeVals = true);
  71.     void filterTree(const QString& keyword);
  72.     void languageChange();
  73.     void slotShowSelect(uint SNr, int Nr);
  74.     void setPaletteShown(bool);
  75.     void slotRightClick(QPoint point);
  76.  
  77. signals:
  78.     void ToggleAllPalettes();
  79.     void selectElement(int, int, bool);
  80.     void selectPage(int);
  81.     void selectMasterPage(QString);
  82.  
  83. protected slots:
  84.     void slotRenameItem();
  85.     void slotDoRename(QTreeWidgetItem* ite, int col);
  86.     void slotMultiSelect();
  87.     void slotSelect(QTreeWidgetItem* ite, int col);
  88. protected:
  89.     void filterTree();
  90.     void clearPalette();
  91.     void createContextMenu(PageItem *currItem, double mx, double my);
  92.     OutlineWidget* reportDisplay;
  93.     QTreeWidgetItem* freeObjects;
  94.     QTreeWidgetItem* rootObject;
  95.     QTreeWidgetItem* currentObject;
  96.     QLabel* filterLabel;
  97.     QLineEdit* filterEdit;
  98.     ScribusMainWindow* m_MainWindow;
  99.     QPixmap imageIcon;
  100.     QPixmap latexIcon;
  101.     QPixmap textIcon;
  102.     QPixmap lineIcon;
  103.     QPixmap polygonIcon;
  104.     QPixmap polylineIcon;
  105.     QPixmap groupIcon;
  106.     QPixmap buttonIcon;
  107.     QPixmap textFieldIcon;
  108.     QPixmap checkBoxIcon;
  109.     QPixmap comboBoxIcon;
  110.     QPixmap listBoxIcon;
  111.     QPixmap annotTextIcon;
  112.     QPixmap annotLinkIcon;
  113.     bool selectionTriggered;
  114.     ScribusDoc *currDoc;
  115. };
  116.  
  117. #endif // TREE_H
  118.