Enable single-click to show object details.
+ Use run-clang-tidy in format script. + Fix missing return in QtkWidgetManager. + Fix CI tag ref. + Add output when starting GUI to explain controls.
This commit is contained in:
		
							parent
							
								
									0a71bdc1c0
								
							
						
					
					
						commit
						c9004027b9
					
				
							
								
								
									
										5
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -363,7 +363,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  release:
 | 
					  release:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    if: startsWith(github.event.workflow_run.head_branch, 'v')
 | 
					    if: startsWith(github.ref, 'refs/tags/')
 | 
				
			||||||
    needs: [Qtk, Qtk-Library, Qtk-Plugins]
 | 
					    needs: [Qtk, Qtk-Library, Qtk-Plugins]
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Download Installer Artifact
 | 
					      - name: Download Installer Artifact
 | 
				
			||||||
@ -378,8 +378,7 @@ jobs:
 | 
				
			|||||||
        id: create_release
 | 
					        id: create_release
 | 
				
			||||||
        uses: softprops/action-gh-release@v1
 | 
					        uses: softprops/action-gh-release@v1
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          tag_name: ${{ github.event.workflow_run.head_branch }}
 | 
					          name: Qtk ${{ github.ref_name }}
 | 
				
			||||||
          name: Qtk ${{ github.event.workflow_run.head_branch }}
 | 
					 | 
				
			||||||
          draft: true
 | 
					          draft: true
 | 
				
			||||||
          prerelease: false
 | 
					          prerelease: false
 | 
				
			||||||
          generate_release_notes: true
 | 
					          generate_release_notes: true
 | 
				
			||||||
 | 
				
			|||||||
@ -98,6 +98,18 @@ void QtkWidget::initializeGL()
 | 
				
			|||||||
            this,
 | 
					            this,
 | 
				
			||||||
            SLOT(messageLogged(QOpenGLDebugMessage)));
 | 
					            SLOT(messageLogged(QOpenGLDebugMessage)));
 | 
				
			||||||
    mDebugLogger->startLogging();
 | 
					    mDebugLogger->startLogging();
 | 
				
			||||||
 | 
					    mConsole->sendLog(
 | 
				
			||||||
 | 
					        "Object files such as .obj can be dragged into the scene to load new "
 | 
				
			||||||
 | 
					        "models.",
 | 
				
			||||||
 | 
					        DebugContext::Warn);
 | 
				
			||||||
 | 
					    mConsole->sendLog("Click and hold LMB or RMB to move the camera with WASD.",
 | 
				
			||||||
 | 
					                      DebugContext::Warn);
 | 
				
			||||||
 | 
					    mConsole->sendLog(
 | 
				
			||||||
 | 
					        "Click an object name in the side panel to view or modify properties.",
 | 
				
			||||||
 | 
					        DebugContext::Warn);
 | 
				
			||||||
 | 
					    mConsole->sendLog(
 | 
				
			||||||
 | 
					        "Double click an object name to move the camera to it's position.",
 | 
				
			||||||
 | 
					        DebugContext::Warn);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  printContextInformation();
 | 
					  printContextInformation();
 | 
				
			||||||
 | 
				
			|||||||
@ -264,6 +264,7 @@ namespace Qtk
 | 
				
			|||||||
              << "[QtkWidgetManager " << this
 | 
					              << "[QtkWidgetManager " << this
 | 
				
			||||||
              << " ] Failed to add a QtkWidget with the previously used name '"
 | 
					              << " ] Failed to add a QtkWidget with the previously used name '"
 | 
				
			||||||
              << name << "'";
 | 
					              << name << "'";
 | 
				
			||||||
 | 
					          return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        qDebug() << this << " Adding new QtkWidget named '" << name << "'";
 | 
					        qDebug() << this << " Adding new QtkWidget named '" << name << "'";
 | 
				
			||||||
        mQtkWidgets[name] = widget;
 | 
					        mQtkWidgets[name] = widget;
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,8 @@ Qtk::TreeView::TreeView(QWidget * parent) :
 | 
				
			|||||||
    QDockWidget(parent), ui(new Ui::TreeView)
 | 
					    QDockWidget(parent), ui(new Ui::TreeView)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  ui->setupUi(this);
 | 
					  ui->setupUi(this);
 | 
				
			||||||
 | 
					  connect(
 | 
				
			||||||
 | 
					      ui->treeWidget, &QTreeWidget::itemClicked, this, &TreeView::itemSelect);
 | 
				
			||||||
  connect(ui->treeWidget,
 | 
					  connect(ui->treeWidget,
 | 
				
			||||||
          &QTreeWidget::itemDoubleClicked,
 | 
					          &QTreeWidget::itemDoubleClicked,
 | 
				
			||||||
          this,
 | 
					          this,
 | 
				
			||||||
@ -72,3 +74,10 @@ void Qtk::TreeView::itemFocus(QTreeWidgetItem * item, int column)
 | 
				
			|||||||
  // Emit signal from qtk widget for new object focus. Triggers GUI updates.
 | 
					  // Emit signal from qtk widget for new object focus. Triggers GUI updates.
 | 
				
			||||||
  emit QtkWidget::mWidgetManager.get_widget()->objectFocusChanged(name);
 | 
					  emit QtkWidget::mWidgetManager.get_widget()->objectFocusChanged(name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Qtk::TreeView::itemSelect(QTreeWidgetItem * item, int column)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  // Emit signal from qtk widget for new object focus. Triggers GUI updates.
 | 
				
			||||||
 | 
					  const QString & name = item->text(column);
 | 
				
			||||||
 | 
					  emit QtkWidget::mWidgetManager.get_widget()->objectFocusChanged(name);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -58,6 +58,16 @@ namespace Qtk
 | 
				
			|||||||
       */
 | 
					       */
 | 
				
			||||||
      void itemFocus(QTreeWidgetItem * item, int column);
 | 
					      void itemFocus(QTreeWidgetItem * item, int column);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      /**
 | 
				
			||||||
 | 
					       * Set the object to show details for.
 | 
				
			||||||
 | 
					       * Triggered by QTreeWidget::itemClicked signal.
 | 
				
			||||||
 | 
					       *
 | 
				
			||||||
 | 
					       * @param item The item that was clicked
 | 
				
			||||||
 | 
					       * @param column The column of the item that was double clicked.
 | 
				
			||||||
 | 
					       *    This param is currently not used but required for this signal.
 | 
				
			||||||
 | 
					       */
 | 
				
			||||||
 | 
					      void itemSelect(QTreeWidgetItem * item, int column);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private:
 | 
					    private:
 | 
				
			||||||
      /*************************************************************************
 | 
					      /*************************************************************************
 | 
				
			||||||
       * Private Members
 | 
					       * Private Members
 | 
				
			||||||
 | 
				
			|||||||
@ -11,5 +11,6 @@ cmake -B build && cmake --build build -- -j $(nproc --ignore=1)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Run clang-tidy and clang-format
 | 
					# Run clang-tidy and clang-format
 | 
				
			||||||
SOURCES="src/**/*.cpp src/**/*.h example-app/*.cpp example-app/*.h"
 | 
					SOURCES="src/**/*.cpp src/**/*.h example-app/*.cpp example-app/*.h"
 | 
				
			||||||
clang-tidy -p build/ --fix --config-file=.clang-tidy $SOURCES
 | 
					run-clang-tidy \
 | 
				
			||||||
 | 
					    -p build/ -j $(nproc --ignore=1) -fix -config-file=.clang-tidy $SOURCES
 | 
				
			||||||
clang-format -i --style=file:.clang-format $SOURCES
 | 
					clang-format -i --style=file:.clang-format $SOURCES
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user