diff --git a/cflag.cpp b/ctag.cpp similarity index 100% rename from cflag.cpp rename to ctag.cpp diff --git a/cflag.h b/ctag.h similarity index 100% rename from cflag.h rename to ctag.h diff --git a/ctoolboxlocation.cpp b/ctoolboxlocation.cpp new file mode 100644 index 0000000..71655e9 --- /dev/null +++ b/ctoolboxlocation.cpp @@ -0,0 +1,14 @@ +#include "ctoolboxlocation.h" +#include "ui_ctoolboxlocation.h" + +cToolBoxLocation::cToolBoxLocation(QWidget *parent) : + QWidget(parent), + ui(new Ui::cToolBoxLocation) +{ + ui->setupUi(this); +} + +cToolBoxLocation::~cToolBoxLocation() +{ + delete ui; +} diff --git a/ctoolboxtag.cpp b/ctoolboxtag.cpp new file mode 100644 index 0000000..726e7c1 --- /dev/null +++ b/ctoolboxtag.cpp @@ -0,0 +1,14 @@ +#include "ctoolboxtag.h" +#include "ui_ctoolboxtag.h" + +cToolBoxTag::cToolBoxTag(QWidget *parent) : + QWidget(parent), + ui(new Ui::cToolBoxTag) +{ + ui->setupUi(this); +} + +cToolBoxTag::~cToolBoxTag() +{ + delete ui; +} diff --git a/ctoolboxtag.h b/ctoolboxtag.h new file mode 100644 index 0000000..a77d93f --- /dev/null +++ b/ctoolboxtag.h @@ -0,0 +1,142 @@ +/*! + \file ctoolboxtag.h + +*/ + +#ifndef CTOOLBOXTAG_H +#define CTOOLBOXTAG_H + + +#include "ctag.h" +#include "cpicture.h" + +#include +#include +#include + + +namespace Ui { +class cToolBoxTag; +} + +/*! + \brief + + \class cToolBoxTag ctoolboxtag.h "ctoolboxtag.h" +*/ +class cToolBoxTag : public QWidget +{ + Q_OBJECT + +public: + /*! + \brief + + \fn cToolBoxTag + \param parent + */ + explicit cToolBoxTag(QWidget *parent = nullptr); + /*! + \brief + + \fn ~cToolBoxTag + */ + ~cToolBoxTag(); + + /*! + \brief + + \param lpLocationList + \fn setLocationList + */ + void setLocationList(cLocationList* lpLocationList); + + /*! + \brief + + \fn setPicture + \param pictureList + */ + void setPicture(cPictureList& pictureList); + +private: + Ui::cToolBoxTag* ui; /*!< TODO: describe */ + QStandardItemModel* m_lpLocationListModel; /*!< TODO: describe */ + cPersonList* m_lpLocationList; /*!< TODO: describe */ + cPictureList m_pictureList; /*!< TODO: describe */ + bool m_bLoading; /*!< TODO: describe */ + + QAction* m_lpLocationAddAction; /*!< TODO: describe */ + QAction* m_lpLocationEditAction; /*!< TODO: describe */ + QAction* m_lpLocationDeleteAction; /*!< TODO: describe */ + + bool m_bEditing; /*!< TODO: describe */ + + /*! + \brief + + \fn initUI + */ + void initUI(); + /*! + \brief + + \fn createActions + */ + void createActions(); + +private slots: + /*! + \brief + + \fn onLocationSelected + \param selection + \param previous + */ + void onLocationSelected(const QItemSelection& selection, const QItemSelection& previous); + /*! + \brief + + \fn locationChanged + \param topLeft + \param bottomright + \param roles + */ + void locationChanged(const QModelIndex& topLeft, const QModelIndex& bottomright, const QVector& roles); + /*! + \brief + + \fn onLocationAdd + */ + void onLocationAdd(); + /*! + \brief + + \fn onLocationEdit + */ + void onLocationEdit(); + /*! + \brief + + \fn onLocationDelete + */ + void onLocationDelete(); + + /*! + \brief + + \fn onLocationViewContextMenu + \param pos + */ + void onLocationViewContextMenu(const QPoint& pos); + + /*! + \brief + + \fn onLocationChanged + \param lpItem + */ + void onLocationChanged(QStandardItem* lpItem); +}; + +#endif // CTOOLBOXTAG_H diff --git a/ctoolboxtag.ui b/ctoolboxtag.ui new file mode 100644 index 0000000..8243ad4 --- /dev/null +++ b/ctoolboxtag.ui @@ -0,0 +1,85 @@ + + + cToolBoxTag + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + + + Qt::CustomContextMenu + + + QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed + + + true + + + QAbstractItemView::ExtendedSelection + + + false + + + false + + + + + + + + + add + + + + + + + edit + + + + + + + delete + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + +