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:
@@ -98,6 +98,18 @@ void QtkWidget::initializeGL()
|
||||
this,
|
||||
SLOT(messageLogged(QOpenGLDebugMessage)));
|
||||
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();
|
||||
|
||||
@@ -264,6 +264,7 @@ namespace Qtk
|
||||
<< "[QtkWidgetManager " << this
|
||||
<< " ] Failed to add a QtkWidget with the previously used name '"
|
||||
<< name << "'";
|
||||
return;
|
||||
}
|
||||
qDebug() << this << " Adding new QtkWidget named '" << name << "'";
|
||||
mQtkWidgets[name] = widget;
|
||||
|
||||
@@ -19,6 +19,8 @@ Qtk::TreeView::TreeView(QWidget * parent) :
|
||||
QDockWidget(parent), ui(new Ui::TreeView)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(
|
||||
ui->treeWidget, &QTreeWidget::itemClicked, this, &TreeView::itemSelect);
|
||||
connect(ui->treeWidget,
|
||||
&QTreeWidget::itemDoubleClicked,
|
||||
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 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);
|
||||
|
||||
/**
|
||||
* 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 Members
|
||||
|
||||
Reference in New Issue
Block a user