Warning, file /graphics/kxstitch/src/PaletteManagerDlg.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * Copyright (C) 2010-2015 by Stephen Allewell 0003 * steve.allewell@gmail.com 0004 * 0005 * This program is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation; either version 2 of the License, or 0008 * (at your option) any later version. 0009 */ 0010 0011 #ifndef PaletteManagerDlg_H 0012 #define PaletteManagerDlg_H 0013 0014 #include <QDialog> 0015 #include <QMouseEvent> 0016 0017 #include "Document.h" 0018 #include "FlossScheme.h" 0019 0020 #include "ui_PaletteManager.h" 0021 0022 class Document; 0023 class DocumentFloss; 0024 class SchemeManager; 0025 class SymbolSelectorDlg; 0026 class QHideEvent; 0027 class QShowEvent; 0028 0029 class PaletteManagerDlg : public QDialog 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 PaletteManagerDlg(QWidget *, Document *); 0035 virtual ~PaletteManagerDlg(); 0036 0037 const DocumentPalette &palette() const; 0038 0039 protected: 0040 virtual void hideEvent(QHideEvent *) Q_DECL_OVERRIDE; 0041 virtual void showEvent(QShowEvent *) Q_DECL_OVERRIDE; 0042 virtual void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE; 0043 virtual void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE; 0044 0045 private slots: 0046 void on_ColorList_currentRowChanged(int); 0047 void on_CurrentList_currentRowChanged(int); 0048 void on_AddFloss_clicked(bool); 0049 void on_RemoveFloss_clicked(bool); 0050 void on_StitchStrands_activated(int); 0051 void on_BackstitchStrands_activated(int); 0052 void on_SymbolLibrary_activated(const QString &); 0053 void on_StitchSymbol_clicked(bool); 0054 void on_BackstitchSymbol_activated(int); 0055 void on_NewFloss_clicked(bool); 0056 void on_ClearUnused_clicked(bool); 0057 void on_Calibrate_clicked(bool); 0058 void on_PickColor_clicked(); 0059 void on_DialogButtonBox_accepted(); 0060 void on_DialogButtonBox_rejected(); 0061 void on_DialogButtonBox_helpRequested(); 0062 0063 private: 0064 void fillLists(); 0065 void insertListWidgetItem(QListWidget *, QListWidgetItem *); 0066 bool contains(const QString &) const; 0067 int paletteIndex(const QString &) const; 0068 bool symbolsAvailable() const; 0069 0070 Ui::PaletteManager ui; 0071 0072 Document *m_document; 0073 DocumentPalette m_dialogPalette; 0074 QMap<int, FlossUsage> m_flossUsage; 0075 FlossScheme *m_scheme; 0076 SymbolSelectorDlg *m_symbolSelectorDlg; 0077 }; 0078 0079 #endif // PaletteManagerDlg_H