diff --git a/anno/ApplicationModel.cpp b/anno/ApplicationModel.cpp index 2c6b9ce..a40bc2b 100644 --- a/anno/ApplicationModel.cpp +++ b/anno/ApplicationModel.cpp @@ -39,7 +39,9 @@ using namespace std; ApplicationModel::ApplicationModel(QObject *parent) - : QObject(parent) { + : QObject(parent) + , navigation_model_(nullptr) +{ } ApplicationModel::~ApplicationModel() { @@ -54,6 +56,8 @@ void ApplicationModel::ClearProject() { files_loader_ = QJsonObject(); file_models_.clear(); + navigation_model_.Clear(); + PropertyDatabase::Instance().Clear(); set_is_modified(false); } diff --git a/anno/ApplicationModel.h b/anno/ApplicationModel.h index d11bf13..068bd05 100644 --- a/anno/ApplicationModel.h +++ b/anno/ApplicationModel.h @@ -3,6 +3,7 @@ #include "ImageConverter.h" #include "implement_q_property.h" #include "LabelDefinitionsTreeModel.h" +#include "NavigationModel.h" #include "SourcePicturesTreeModel.h" #include @@ -21,6 +22,8 @@ class ApplicationModel : public QObject, public FileModelProviderInterface Q_PROPERTY(std::shared_ptr filesystem READ get_filesystem WRITE set_filesystem NOTIFY filesystem_changed); Q_PROPERTY(QJsonObject user_data READ get_user_data WRITE set_user_data NOTIFY user_data_changed); + NavigationModel* get_navigation_model() { return &navigation_model_; } + void NewProject(QString images_folder); bool OpenProject(QString filename, QStringList &errors); bool SaveProject(QStringList & errors, QString filename = QString()); @@ -119,6 +122,8 @@ public slots: QString project_script_; + NavigationModel navigation_model_; + public: IMPLEMENT_Q_PROPERTY_READ(is_modified); IMPLEMENT_Q_PROPERTY_READ(user_data); diff --git a/anno/MainWindow.cpp b/anno/MainWindow.cpp index ee2a043..ca7df6a 100644 --- a/anno/MainWindow.cpp +++ b/anno/MainWindow.cpp @@ -9,6 +9,7 @@ #include "ImageSettingsWidget.h" #include "LabelDefinitionPropertiesWidget.h" #include "messagebox.h" +#include "NavigationWidget.h" #include "ProjectDefinitionsDialog.h" #include "ProjectSettingsWidget.h" #include "LabelPropertiesWidget.h" @@ -112,6 +113,21 @@ MainWindow::MainWindow(QWidget *parent) ui.mouse_pos_label->setElideMode(Qt::ElideRight); ui.color_value_label->setElideMode(Qt::ElideRight); + // navigation + ui.mainToolBar->addSeparator(); + + NavigationWidget* navigationWidget = new NavigationWidget(model_.get_navigation_model(), this); + ui.mainToolBar->addWidget(navigationWidget); + + /* + QWidget *spacerWidget = new QWidget(this); + spacerWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + spacerWidget->setVisible(true); + ui.mainToolBar->addWidget(spacerWidget); + */ + + + UpdateApplicationTitle(); UpdateProjectControls(); @@ -435,8 +451,6 @@ void MainWindow::OnImageFileChanged(std::shared_ptr value) { connect(ui.undo_action, &QAction::triggered, stack, &QUndoStack::undo); connect(ui.redo_action, &QAction::triggered, stack, &QUndoStack::redo); } - - ui.desktop_status_label->setText(selected_file_ ? selected_file_->get_id() : QString()); } void MainWindow::CanUndoChanged(bool value) { diff --git a/anno/MainWindow.h b/anno/MainWindow.h index 35ea90d..7b5db7e 100644 --- a/anno/MainWindow.h +++ b/anno/MainWindow.h @@ -47,7 +47,7 @@ public slots: void OnProjectSettings(); void UpdateApplicationTitle(); void UpdateProjectControls(); - void OnEvaluateInROI(); + void OnEvaluateInROI(); private: bool CloseActiveProject(); diff --git a/anno/MainWindow.qrc b/anno/MainWindow.qrc index 25719e3..aa07719 100644 --- a/anno/MainWindow.qrc +++ b/anno/MainWindow.qrc @@ -1,34 +1,35 @@ - - Resources/paste.ico - Resources/3d.ico - Resources/open.ico - Resources/save.ico - Resources/Redo.ico - Resources/Undo.ico - Resources/file.ico - Resources/folder.ico - Resources/image.ico - Resources/delete.ico - Resources/refresh.ico - Resources/configuration.ico - Resources/folder_network.ico - Resources/file_blue.ico - Resources/add.ico - Resources/fit_to_size.ico - Resources/fix.ico - Resources/restart.ico - Resources/select.png - Resources/anno.ico - Resources/new.ico - Resources/copy.ico - Resources/find.ico - Resources/nav_back.ico - Resources/nav_forward.ico - Resources/rename.ico - Resources/clean.ico - Resources/tree_view.ico - Resources/component.ico - Resources/search-inside.ico - + + Resources/paste.ico + Resources/info.ico + Resources/3d.ico + Resources/open.ico + Resources/save.ico + Resources/Redo.ico + Resources/Undo.ico + Resources/file.ico + Resources/folder.ico + Resources/image.ico + Resources/delete.ico + Resources/refresh.ico + Resources/configuration.ico + Resources/folder_network.ico + Resources/file_blue.ico + Resources/add.ico + Resources/fit_to_size.ico + Resources/fix.ico + Resources/restart.ico + Resources/select.png + Resources/anno.ico + Resources/new.ico + Resources/copy.ico + Resources/find.ico + Resources/nav_back.ico + Resources/nav_forward.ico + Resources/rename.ico + Resources/clean.ico + Resources/tree_view.ico + Resources/component.ico + Resources/search-inside.ico + diff --git a/anno/MainWindow.ui b/anno/MainWindow.ui index dd73a5f..8c6f171 100644 --- a/anno/MainWindow.ui +++ b/anno/MainWindow.ui @@ -184,30 +184,17 @@ - - - - 16777215 - 15 - - - - QFrame::Raised - + - Qt::Vertical + Qt::Horizontal - - - - - - - 0 - 0 - + + + 40 + 20 + - + diff --git a/anno/NavigationModel.cpp b/anno/NavigationModel.cpp new file mode 100644 index 0000000..1f349b0 --- /dev/null +++ b/anno/NavigationModel.cpp @@ -0,0 +1,49 @@ +#include "NavigationModel.h" + +void NavigationModel::Clear() { + paths_.clear(); + set_current_path({}); + set_can_back(false); + set_can_forward(false); +} + +void NavigationModel::SetPath(const QString & path) { + if (path.isEmpty()) { + return; + } + + while (index_ + 1 < paths_.size()) { + paths_.removeLast(); + } + + while (paths_.size() > 100) { + paths_.removeFirst(); + } + + paths_ << path; + index_ = paths_.size() - 1; + + set_current_path(path); + set_can_back(index_ > 0); + set_can_forward(false); + +} + +void NavigationModel::Back() { + if (index_ > 0) { + index_--; + set_current_path(paths_[index_]); + set_can_back(index_ > 0); + set_can_forward(true); + } +} + +void NavigationModel::Forward() { + if (index_ + 1 < paths_.size()) { + index_++; + set_current_path(paths_[index_]); + set_can_back(true); + set_can_forward(index_ + 1 < paths_.size()); + } +} + diff --git a/anno/NavigationModel.h b/anno/NavigationModel.h new file mode 100644 index 0000000..71e5064 --- /dev/null +++ b/anno/NavigationModel.h @@ -0,0 +1,48 @@ +#pragma once +#include +#include +#include "implement_q_property.h" + +class NavigationModel : public QObject { + Q_OBJECT + +public: + NavigationModel(QObject *parent) : QObject(parent) {} + ~NavigationModel() {} + + Q_PROPERTY(QString current_path READ get_current_path WRITE set_current_path NOTIFY current_path_changed); + Q_PROPERTY(bool can_back READ get_can_back WRITE set_can_back NOTIFY can_back_changed); + Q_PROPERTY(bool can_forward READ get_can_forward WRITE set_can_forward NOTIFY can_forward_changed); + + void SetPath(const QString & path); + +signals: + void current_path_changed(QString); + void can_back_changed(bool); + void can_forward_changed(bool); + +public slots: + void Back(); + void Forward(); + void Clear(); + +private: + IMPLEMENT_Q_PROPERTY_WRITE(QString, current_path); + IMPLEMENT_Q_PROPERTY_WRITE(bool, can_back); + IMPLEMENT_Q_PROPERTY_WRITE(bool, can_forward); + +private: + QString current_path_; + + bool can_back_ = false; + bool can_forward_ = false; + + int index_ = 0; + + QStringList paths_; + +public: + IMPLEMENT_Q_PROPERTY_READ(current_path); + IMPLEMENT_Q_PROPERTY_READ(can_back); + IMPLEMENT_Q_PROPERTY_READ(can_forward); +}; diff --git a/anno/NavigationWidget.cpp b/anno/NavigationWidget.cpp new file mode 100644 index 0000000..6fa2feb --- /dev/null +++ b/anno/NavigationWidget.cpp @@ -0,0 +1,23 @@ +// Anno Labeling Tool +// 2020-2024 (c) urobots GmbH, https://urobots.io/en/portfolio/anno/ +#include "NavigationWidget.h" + +NavigationWidget::NavigationWidget(NavigationModel *model, QWidget *parent) + : QWidget(parent) + , model_(model) +{ + ui.setupUi(this); + + connect(model_, &NavigationModel::current_path_changed, ui.filename_lineEdit, &QLineEdit::setText); + connect(model_, &NavigationModel::can_back_changed, ui.back_toolButton, &QToolButton::setEnabled); + connect(model_, &NavigationModel::can_forward_changed, ui.forward_toolButton, &QToolButton::setEnabled); + + connect(ui.back_toolButton, &QToolButton::clicked, model_, &NavigationModel::Back); + connect(ui.forward_toolButton, &QToolButton::clicked, model_, &NavigationModel::Forward); + + ui.back_toolButton->setEnabled(false); + ui.forward_toolButton->setEnabled(false); +} + +NavigationWidget::~NavigationWidget() { +} \ No newline at end of file diff --git a/anno/NavigationWidget.h b/anno/NavigationWidget.h new file mode 100644 index 0000000..1ef2abb --- /dev/null +++ b/anno/NavigationWidget.h @@ -0,0 +1,23 @@ +#pragma once +#include "NavigationModel.h" +#include "ui_NavigationWidget.h" +#include + + +class NavigationWidget : public QWidget +{ + Q_OBJECT + +public: + NavigationWidget(NavigationModel *model, QWidget *parent = nullptr); + ~NavigationWidget(); + +signals: + +public slots: + + +private: + Ui::NavigationWidget ui; + NavigationModel *model_; +}; diff --git a/anno/NavigationWidget.ui b/anno/NavigationWidget.ui new file mode 100644 index 0000000..aed5db9 --- /dev/null +++ b/anno/NavigationWidget.ui @@ -0,0 +1,97 @@ + + + NavigationWidget + + + + 0 + 0 + 690 + 210 + + + + + 0 + 0 + + + + NavigationWidget + + + + 2 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + :/MainWindow/Resources/nav_back.ico:/MainWindow/Resources/nav_back.ico + + + + 24 + 24 + + + + true + + + + + + + + + + + :/MainWindow/Resources/nav_forward.ico:/MainWindow/Resources/nav_forward.ico + + + + 24 + 24 + + + + true + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + diff --git a/anno/Resources/info.ico b/anno/Resources/info.ico new file mode 100644 index 0000000..db44b6b Binary files /dev/null and b/anno/Resources/info.ico differ diff --git a/anno/SourcePicturesTreeModel.cpp b/anno/SourcePicturesTreeModel.cpp index bd652a3..14f4bb5 100644 --- a/anno/SourcePicturesTreeModel.cpp +++ b/anno/SourcePicturesTreeModel.cpp @@ -152,6 +152,43 @@ QVariant SourcePicturesTreeModel::headerData(int section, Qt::Orientation orient return QVariant(); } +QModelIndex SourcePicturesTreeModel::index(QString path) { + if (path.isEmpty()) { + return GetFilesRootIndex(); + } + + auto parts = path.split('/'); + + // search for the element startig from files + int child_index = 0; + FileTreeElement *child = root_->children[0]; + FileTreeElement *parent = nullptr; + + for (auto s : parts) { + parent = child; + child = nullptr; + child_index = -1; + + for (size_t t = 0; t < parent->children.size(); ++t) { + if (parent->children[t]->name == s) { + child_index = int(t); + child = parent->children[t]; + break; + } + } + + if (!child) + break; + } + + if (child) { + return createIndex(child_index, 0, child); + } + else { + return QModelIndex(); + } +} + QModelIndex SourcePicturesTreeModel::index(int row, int column, const QModelIndex &parent) const { if (!hasIndex(row, column, parent)) return QModelIndex(); diff --git a/anno/SourcePicturesTreeModel.h b/anno/SourcePicturesTreeModel.h index c09566d..58e516c 100644 --- a/anno/SourcePicturesTreeModel.h +++ b/anno/SourcePicturesTreeModel.h @@ -43,6 +43,8 @@ class SourcePicturesTreeModel : public QAbstractItemModel int rowCount(const QModelIndex &parent = QModelIndex()) const override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; + QModelIndex index(QString path); + std::shared_ptr GetFileModel(const QModelIndex &); FileTreeItemInfo GetFileInfo(const QModelIndex &); @@ -105,7 +107,7 @@ public slots: int objects_to_copy_count_; int copied_objects_count_; QProgressDialog* current_progress_dialog_; - bool completely_loaded_ = false; + bool completely_loaded_ = false; }; diff --git a/anno/SourcePicturesWidget.cpp b/anno/SourcePicturesWidget.cpp index 4dfa5b3..7ef10b6 100644 --- a/anno/SourcePicturesWidget.cpp +++ b/anno/SourcePicturesWidget.cpp @@ -66,6 +66,9 @@ void SourcePicturesWidget::Init(ApplicationModel *model) { folder_menu_->addSeparator(); delete_folder_action_ = AddAction(folder_menu_, "delete.ico", tr("Delete folder"), &SourcePicturesWidget::OnDeleteFile); AddAction(folder_menu_, "clean.ico", tr("Remove markers"), &SourcePicturesWidget::OnRemoveMarkers); + + + connect(model_->get_navigation_model(), &NavigationModel::current_path_changed, this, &SourcePicturesWidget::OnNavigationPathChanged); } SourcePicturesWidget::~SourcePicturesWidget() @@ -103,13 +106,45 @@ void SourcePicturesWidget::OnTextFilterChanged() { #endif } +void SourcePicturesWidget::OnNavigationPathChanged(QString path) { + if (!is_tree_callback_) { + is_navigation_callback_ = true; + + if (!path.isEmpty() && path[0] == '/') { + path.remove(0, 1); + } + + auto index = tree_model_->index(path); + if (index.isValid()) { + ui.treeView->setCurrentIndex(sort_filter_model_->mapFromSource(index)); + } + + is_navigation_callback_ = false; + } +} + void SourcePicturesWidget::OnCurrentChanged(const QModelIndex ¤t, const QModelIndex &previous) { Q_UNUSED(previous) if (tree_model_) { - emit FileModelSelected(tree_model_->GetFileModel(sort_filter_model_->mapToSource(current))); + auto index = sort_filter_model_->mapToSource(current); + auto file_info = tree_model_->GetFileInfo(index); + auto file = tree_model_->GetFileModel(index); + emit FileModelSelected(file); + + if (!is_navigation_callback_) { + is_tree_callback_ = true; + model_->get_navigation_model()->SetPath("/" + file_info.name); + is_tree_callback_ = false; + } } else { emit FileModelSelected({}); + + if (!is_navigation_callback_) { + is_tree_callback_ = true; + model_->get_navigation_model()->SetPath("/"); + is_tree_callback_ = false; + } } } @@ -159,8 +194,9 @@ void SourcePicturesWidget::SelectFile(int offset) { // xxx next_index = model->root_path_index_.child(0, 0); } - if (next_index.isValid()) + if (next_index.isValid()) { ui.treeView->setCurrentIndex(next_index); + } } void SourcePicturesWidget::SelectNextFile() { diff --git a/anno/SourcePicturesWidget.h b/anno/SourcePicturesWidget.h index 97cf0c0..cf0c472 100644 --- a/anno/SourcePicturesWidget.h +++ b/anno/SourcePicturesWidget.h @@ -29,6 +29,8 @@ public slots: void OnRemoveMarkers(); void OnCreateFolder(); + void OnNavigationPathChanged(QString); + private: void SelectFile(int offset); @@ -56,4 +58,7 @@ private slots: QAction *delete_folder_action_ = nullptr; QAction *rename_folder_action_ = nullptr; QAction *remove_markers_in_folder_action_ = nullptr; + + bool is_navigation_callback_ = false; + bool is_tree_callback_ = false; }; diff --git a/anno/anno.pro b/anno/anno.pro index b5adbaf..e60ca35 100644 --- a/anno/anno.pro +++ b/anno/anno.pro @@ -32,28 +32,76 @@ PRE_TARGETDEPS += git_rev #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ - AboutDialog.cpp ApplicationModel.cpp CircleLabel.cpp ColorDisplayWidget.cpp CreateLabelFileModelCommand.cpp \ + AboutDialog.cpp \ + ApplicationModel.cpp \ + CircleLabel.cpp ColorDisplayWidget.cpp \ + CreateLabelFileModelCommand.cpp \ CustomPropertiesEditorTableItemDelegate.cpp \ CustomPropertiesEditorTableModel.cpp \ - CustomPropertyTableItemDelegate.cpp CustomPropertyTableModel.cpp DeleteAllLabelsFileModelCommand.cpp \ - DeleteLabelFileModelCommand.cpp Desktop3dWindow.cpp DesktopWidget.cpp ElidedLabelWidget.cpp ErrorsListDialog.cpp FileModel.cpp Highlighter.cpp \ - FileTreeElement.cpp FilenamesEditorWidget.cpp \ - ImageLoader.cpp ImageModel.cpp ImageSettingsWidgetQt.cpp Label.cpp LabelCategory.cpp LabelDefinition.cpp LabelDefinitionPropertiesWidget.cpp \ + CustomPropertyTableItemDelegate.cpp \ + CustomPropertyTableModel.cpp \ + DeleteAllLabelsFileModelCommand.cpp \ + DeleteLabelFileModelCommand.cpp \ + Desktop3dWindow.cpp DesktopWidget.cpp \ + ElidedLabelWidget.cpp ErrorsListDialog.cpp \ + FileModel.cpp \ + Highlighter.cpp \ + FileTreeElement.cpp \ + FilenamesEditorWidget.cpp \ + ImageLoader.cpp ImageModel.cpp \ + ImageSettingsWidgetQt.cpp Label.cpp \ + LabelCategory.cpp \ + LabelDefinition.cpp \ + LabelDefinitionPropertiesWidget.cpp \ ImagePropertiesTableModel.cpp \ ImagePropertiesWidget.cpp \ ImageModelQt.cpp \ LabelDefinitionPropertiesDialog.cpp \ - LabelDefinitionsTreeModel.cpp LabelHandle.cpp LabelPropertiesWidget.cpp LocalFilesystem.cpp main.cpp \ - MainWindow.cpp messagebox.cpp ModifyLabelCategoryFileModelCommand.cpp ModifyLabelGeometryFileModelCommand.cpp \ - ModifyLabelTextFileModelCommand.cpp OrientedCircleLabel.cpp OrientedPointLabel.cpp OrientedRectLabel.cpp PointCloudDisplayWidget.cpp \ - PointLabel.cpp PolygonLabel.cpp PolylineLabel.cpp ProjectDefinitionsDialog.cpp ProjectSettingsWidget.cpp \ - PropertyTableModel.cpp PropertyTableItemDelegate.cpp \ - PropertyDatabase.cpp qjson_helpers.cpp RecentActionsList.cpp RectLabel.cpp rest.cpp \ - RestDatasetFilesystem.cpp SharedPropertiesEditorTableModel.cpp ScriptPainter.cpp settings.cpp SourcePicturesTreeModel.cpp \ + LabelDefinitionsTreeModel.cpp \ + LabelHandle.cpp \ + LabelPropertiesWidget.cpp \ + LocalFilesystem.cpp \ + main.cpp \ + MainWindow.cpp messagebox.cpp \ + ModifyLabelCategoryFileModelCommand.cpp \ + ModifyLabelGeometryFileModelCommand.cpp \ + ModifyLabelTextFileModelCommand.cpp \ + NavigationModel.cpp \ + NavigationWidget.cpp \ + OrientedCircleLabel.cpp \ + OrientedPointLabel.cpp OrientedRectLabel.cpp \ + PointCloudDisplayWidget.cpp \ + PointLabel.cpp \ + PolygonLabel.cpp \ + PolylineLabel.cpp \ + ProjectDefinitionsDialog.cpp \ + ProjectSettingsWidget.cpp \ + PropertyTableModel.cpp \ + PropertyTableItemDelegate.cpp \ + PropertyDatabase.cpp \ + qjson_helpers.cpp \ + RecentActionsList.cpp \ + RectLabel.cpp \ + rest.cpp \ + RestDatasetFilesystem.cpp \ + SharedPropertiesEditorTableModel.cpp \ + ScriptPainter.cpp \ + settings.cpp \ + SourcePicturesTreeModel.cpp \ StartupDialog.cpp \ - stdafx.cpp Serialization.cpp StampPropertiesEditorTableModel.cpp \ - SourcePicturesWidget.cpp ToolLabel.cpp ToolboxProxyModel.cpp ToolboxWidget.cpp win_helpers.cpp \ - triangulation/construct.c triangulation/misc.c triangulation/monotone.c triangulation/tri.c triangulation/xtime.c + stdafx.cpp \ + Serialization.cpp \ + StampPropertiesEditorTableModel.cpp \ + SourcePicturesWidget.cpp \ + ToolLabel.cpp \ + ToolboxProxyModel.cpp \ + ToolboxWidget.cpp \ + win_helpers.cpp \ + triangulation/construct.c \ + triangulation/misc.c \ + triangulation/monotone.c \ + triangulation/tri.c \ + triangulation/xtime.c HEADERS += \ CustomPropertiesEditorTableItemDelegate.h \ @@ -61,34 +109,106 @@ HEADERS += \ ImagePropertiesWidget.h \ LabelDefinitionPropertiesDialog.h \ StartupDialog.h \ - AboutDialog.h ApplicationModel.h ArcBall.h CircleLabel.h ColorDisplayWidget.h ColoredVertexData.h \ + AboutDialog.h \ + ApplicationModel.h \ + ArcBall.h \ + CircleLabel.h \ + ColorDisplayWidget.h \ + ColoredVertexData.h \ ColorTransformer.h \ CustomPropertiesEditorTableModel.h \ - CreateLabelFileModelCommand.h CustomProperty.h CustomPropertyTableItemDelegate.h CustomPropertyTableModel.h \ - DeleteAllLabelsFileModelCommand.h DeleteLabelFileModelCommand.h Desktop3dWindow.h DesktopWidget.h ElidedLabelWidget.h ErrorsListDialog.h \ + CreateLabelFileModelCommand.h \ + CustomProperty.h \ + CustomPropertyTableItemDelegate.h \ + CustomPropertyTableModel.h \ + DeleteAllLabelsFileModelCommand.h \ + DeleteLabelFileModelCommand.h \ + Desktop3dWindow.h \ + DesktopWidget.h \ + ElidedLabelWidget.h \ + ErrorsListDialog.h \ FilenamesEditorWidget.h \ - FileModel.h FilesystemInterface.h FileTreeItemInfo.h geometry.h Highlighter.h ImageConverter.h ImageData.h ImageLoader.h \ + FileModel.h \ + FilesystemInterface.h \ + FileTreeItemInfo.h \ + geometry.h \ + Highlighter.h \ + ImageConverter.h \ + ImageData.h \ + ImageLoader.h \ FileTreeElement.h \ - ImageModel.h ImageSettingsWidgetQt.h implement_q_property.h Label.h LabelCategory.h LabelDefinition.h LabelDefinitionPropertiesWidget.h \ - LabelDefinitionsTreeModel.h LabelFactory.h LabelHandle.h LabelPropertiesWidget.h LabelType.h LocalFilesystem.h \ - MainWindow.h messagebox.h ModifyLabelCategoryFileModelCommand.h ModifyLabelGeometryFileModelCommand.h \ - ModifyLabelTextFileModelCommand.h OrientedCircleLabel.h OrientedPointLabel.h OrientedRectLabel.h PaintInfo.h PointCloudDisplayShaders.h \ - PointCloudDisplayWidget.h PointLabel.h PolygonLabel.h PolylineLabel.h ProjectDefinitionsDialog.h ProjectSettingsWidget.h \ - PropertyDatabase.h ProxyLabel.h qjson_helpers.h RecentActionsList.h RectLabel.h rest.h RestDatasetFilesystem.h \ - PropertyTableModel.h PropertyTableItemDelegate.h \ - ScriptPainter.h settings.h SharedPropertyDefinition.h SharedPropertiesEditorTableModel.h SourcePicturesTreeModel.h SourcePicturesWidget.h \ + ImageModel.h \ + ImageSettingsWidgetQt.h \ + implement_q_property.h \ + Label.h \ + LabelCategory.h \ + LabelDefinition.h \ + LabelDefinitionPropertiesWidget.h \ + LabelDefinitionsTreeModel.h \ + LabelFactory.h \ + LabelHandle.h \ + LabelPropertiesWidget.h \ + LabelType.h \ + LocalFilesystem.h \ + MainWindow.h \ + messagebox.h \ + ModifyLabelCategoryFileModelCommand.h \ + ModifyLabelGeometryFileModelCommand.h \ + ModifyLabelTextFileModelCommand.h \ + NavigationModel.h \ + NavigationWidget.h \ + OrientedCircleLabel.h \ + OrientedPointLabel.h \ + OrientedRectLabel.h \ + PaintInfo.h \ + PointCloudDisplayShaders.h \ + PointCloudDisplayWidget.h \ + PointLabel.h \ + PolygonLabel.h \ + PolylineLabel.h \ + ProjectDefinitionsDialog.h \ + ProjectSettingsWidget.h \ + PropertyDatabase.h \ + ProxyLabel.h \ + qjson_helpers.h \ + RecentActionsList.h \ + RectLabel.h rest.h \ + RestDatasetFilesystem.h \ + PropertyTableModel.h \ + PropertyTableItemDelegate.h \ + ScriptPainter.h \ + settings.h SharedPropertyDefinition.h \ + SharedPropertiesEditorTableModel.h \ + SourcePicturesTreeModel.h \ + SourcePicturesWidget.h \ migration_helpers.h \ - stdafx.h Serialization.h StampPropertiesEditorTableModel.h \ - ToolboxProxyModel.h ToolboxWidget.h ToolLabel.h win_helpers.h WorldInfo.h \ - triangulation/xtime.c triangulation/interface.h triangulation/triangulate.h triangulation/xtime.h + stdafx.h \ + Serialization.h \ + StampPropertiesEditorTableModel.h \ + ToolboxProxyModel.h \ + ToolboxWidget.h \ + ToolLabel.h win_helpers.h\ + WorldInfo.h \ + triangulation/xtime.c \ + triangulation/interface.h \ + triangulation/triangulate.h \ + triangulation/xtime.h FORMS += \ - AboutDialog.ui Desktop3dWindow.ui \ - ErrorsListDialog.ui ImageSettingsWidgetQt.ui LabelDefinitionPropertiesWidget.ui \ + AboutDialog.ui \ + Desktop3dWindow.ui \ + ErrorsListDialog.ui \ + ImageSettingsWidgetQt.ui \ + LabelDefinitionPropertiesWidget.ui \ ImagePropertiesWidget.ui \ LabelDefinitionPropertiesDialog.ui \ - LabelPropertiesWidget.ui MainWindow.ui ProjectDefinitionsDialog.ui \ - ProjectSettingsWidget.ui SourcePicturesWidget.ui ToolboxWidget.ui \ + LabelPropertiesWidget.ui \ + MainWindow.ui \ + NavigationWidget.ui \ + ProjectDefinitionsDialog.ui \ + ProjectSettingsWidget.ui \ + SourcePicturesWidget.ui \ + ToolboxWidget.ui \ StartupDialog.ui RESOURCES += MainWindow.qrc diff --git a/anno/anno.vcxproj b/anno/anno.vcxproj index 3fa380a..e5207cd 100644 --- a/anno/anno.vcxproj +++ b/anno/anno.vcxproj @@ -190,6 +190,12 @@ xcopy /E /D /Y /I $(OPENCV_BIN_DIR)\opencv_imgcodecs$(OPENCV_VER).dll "$(OutDir) true + + true + + + true + true @@ -295,6 +301,12 @@ xcopy /E /D /Y /I $(OPENCV_BIN_DIR)\opencv_imgcodecs$(OPENCV_VER).dll "$(OutDir) true + + true + + + true + true @@ -349,6 +361,8 @@ xcopy /E /D /Y /I $(OPENCV_BIN_DIR)\opencv_imgcodecs$(OPENCV_VER).dll "$(OutDir) + + @@ -498,6 +512,7 @@ xcopy /E /D /Y /I $(OPENCV_BIN_DIR)\opencv_imgcodecs$(OPENCV_VER).dll "$(OutDir) + @@ -532,6 +547,26 @@ xcopy /E /D /Y /I $(OPENCV_BIN_DIR)\opencv_imgcodecs$(OPENCV_VER).dll "$(OutDir) "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../%(Filename)%(Extension)" -DANNO_USE_OPENCV -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_SCRIPT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WINEXTRAS_LIB -DQT_WIDGETS_LIB -DQT_QML_LIB -D%(PreprocessorDefinitions) "-I.\GeneratedFiles" "-I$(ProjectDir).." "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(OPENCV_DIR)\include" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\IlmImf" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Half" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Iex" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Imath" "-I$(QTDIR)\include\QtScript" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQml" + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../%(Filename)%(Extension)" -DANNO_USE_OPENCV -DUNICODE -DWIN32 -DWIN64 -DQT_SCRIPT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WINEXTRAS_LIB -DQT_WIDGETS_LIB -DQT_QML_LIB -D%(PreprocessorDefinitions) "-I.\GeneratedFiles" "-I$(ProjectDir).." "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(OPENCV_DIR)\include" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\IlmImf" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Half" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Iex" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Imath" "-I$(QTDIR)\include\QtScript" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQml" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../%(Filename)%(Extension)" -DANNO_USE_OPENCV -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_SCRIPT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WINEXTRAS_LIB -DQT_WIDGETS_LIB -DQT_QML_LIB -D%(PreprocessorDefinitions) "-I.\GeneratedFiles" "-I$(ProjectDir).." "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(OPENCV_DIR)\include" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\IlmImf" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Half" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Iex" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Imath" "-I$(QTDIR)\include\QtScript" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQml" + + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../%(Filename)%(Extension)" -DANNO_USE_OPENCV -DUNICODE -DWIN32 -DWIN64 -DQT_SCRIPT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WINEXTRAS_LIB -DQT_WIDGETS_LIB -DQT_QML_LIB -D%(PreprocessorDefinitions) "-I.\GeneratedFiles" "-I$(ProjectDir).." "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(OPENCV_DIR)\include" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\IlmImf" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Half" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Iex" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Imath" "-I$(QTDIR)\include\QtScript" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQml" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../%(Filename)%(Extension)" -DANNO_USE_OPENCV -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_SCRIPT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WINEXTRAS_LIB -DQT_WIDGETS_LIB -DQT_QML_LIB -D%(PreprocessorDefinitions) "-I.\GeneratedFiles" "-I$(ProjectDir).." "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)" "-I$(OPENCV_DIR)\include" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\IlmImf" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Half" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Iex" "-I$(OPENCV_DIR)\..\..\opencv\3rdparty\openexr\Imath" "-I$(QTDIR)\include\QtScript" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQml" + @@ -1114,6 +1149,17 @@ xcopy /E /D /Y /I $(OPENCV_BIN_DIR)\opencv_imgcodecs$(OPENCV_VER).dll "$(OutDir) .\GeneratedFiles\ui_%(Filename).h;%(Outputs) "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + Designer + diff --git a/anno/anno.vcxproj.filters b/anno/anno.vcxproj.filters index 1de8439..961f01c 100644 --- a/anno/anno.vcxproj.filters +++ b/anno/anno.vcxproj.filters @@ -561,6 +561,24 @@ Source Files\UI + + Generated Files\Debug + + + Generated Files\Release + + + Source Files\UI + + + Source Files + + + Generated Files\Debug + + + Generated Files\Release + @@ -761,6 +779,9 @@ Generated Files + + Generated Files + @@ -937,6 +958,15 @@ Form Files + + Form Files + + + Header Files\UI + + + Header Files + diff --git a/anno/product_info.h b/anno/product_info.h index a5cef66..8cfc36e 100644 --- a/anno/product_info.h +++ b/anno/product_info.h @@ -3,7 +3,7 @@ #define ANNO_PRODUCT_NAME "anno" #define ANNO_PRODUCT_VERSION_MAJOR 1 -#define ANNO_PRODUCT_VERSION_MINOR 12 +#define ANNO_PRODUCT_VERSION_MINOR 13 #define ANNO_PRODUCT_VERSION_MAINTENANCE 1 #define ANNO_PRODUCT_VERSION_BUILD 0