#ifndef OE_UI_STITCHLIST_H #define OE_UI_STITCHLIST_H #include "main.h" #include "mainwindow.h" #include #include "listviewdelegate.h" class MainWindow; class OE_controller; class OE_interfaceDisplay; class OE_document; class OE_ui_stitchList : public QListView { Q_OBJECT public: OE_ui_stitchList(MainWindow* window, OE_root* root); void addStitch(OE_stitchs* stitch); void refreshStitches(); OE_controller* getController(); OE_interfaceDisplay* getInterfaceDisplay(); OE_document* getDocument(); private: OE_root* root; MainWindow* window; QStandardItemModel* model; ListviewDelegate* listdelegate; void addItem(QColor color, QIcon icon, QIcon type, QIcon pattern, int stitchCount); void addItem(QColor color, int stitchCount); void keyPressEvent(QKeyEvent *event); protected: void dropEvent(QDropEvent *event); private slots: void on_refreshStitchList(); void on_refreshStitch(OE_stitchs* stitch); void handleSelectionChanged(); }; #endif // OE_UI_STITCHLIST_H