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 / smlinestyle.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-06-20  |  2.4 KB  |  92 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.  
  8. #ifndef SMLINESTYLE_H
  9. #define SMLINESTYLE_H
  10.  
  11. class QEvent;
  12.  
  13. #include "scribusstructs.h"
  14. #include "styleitem.h"
  15.  
  16. class ScribusDoc;
  17. class SMLineStyleWidget;
  18.  
  19.  
  20. class SMLineStyle : public StyleItem
  21. {
  22.     Q_OBJECT
  23. public:
  24.     SMLineStyle();
  25.     ~SMLineStyle();
  26.     
  27.     virtual void changeEvent(QEvent *e);
  28.     
  29.     QTabWidget* widget();
  30.     QString typeNamePlural();
  31.     QString typeNameSingular();
  32.     void setCurrentDoc(ScribusDoc *doc);
  33.     QList<StyleName> styles(bool reloadFromDoc = true);
  34.     void reload();
  35.     void selected(const QStringList &styleNames);
  36.     QString fromSelection() const;
  37.     void toSelection(const QString &styleName) const;
  38.     QString newStyle();
  39.     QString newStyle(const QString &fromStyle);
  40.     void apply();
  41.     bool isDefaultStyle(const QString &stylename) const;
  42.     void setDefaultStyle(bool ids);
  43.     QString shortcut(const QString &stylename) const;
  44.     void setShortcut(const QString &shortcut);
  45.     void deleteStyles(const QList<RemoveItem> &removeList);
  46.     void nameChanged(const QString &newName);
  47.     QString getUniqueName(const QString &name);
  48.     void languageChange();
  49.     void unitChange();
  50.  
  51. signals:
  52.     void deleteDone();
  53.     void selectionDirty();
  54.  
  55. private:
  56.     ScribusDoc               *doc_;
  57.     SMLineStyleWidget          *widget_;
  58.     QTabWidget               *twidget_;
  59.     QMap<QString, multiLine>  tmpLines;
  60.     bool                      selectionIsDirty_;
  61.     QMap<QString, multiLine*> selection_;
  62.     QList<RemoveItem>         deleted_;
  63.     int                       currentLine_;
  64.  
  65.     void setSelection(const QString& styleName);
  66.     void setMultiSelection(const QStringList& styles);
  67.     void setupConnections();
  68.     void removeConnections();
  69.     void updateSList();
  70.     void updatePreview();
  71.     void resort();
  72.     void rebuildList();
  73.     QColor calcFarbe(const QString &name, int shade);
  74.  
  75. private slots:
  76.     void slotCurrentLineChanged(int i);
  77.     void slotLineStyle(int i);
  78.     void slotSetEnd(int i);
  79.     void slotSetJoin(int i);
  80.     void slotColor(const QString &s);
  81.     void slotShade(int i);
  82.     void slotLineWidth();
  83.     void slotAddLine();
  84.     void slotDeleteLine();
  85.  
  86.     // FIXME make line styles subclass of Style and remove this hack
  87.     // ugly hack which will be removed once all styles are subclassed from Style
  88.     friend class StyleManager;
  89. };
  90.  
  91. #endif
  92.