change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 22:50:34 +08:00
parent 1df31fbdfe
commit c4f47b6217
788 changed files with 77112 additions and 68888 deletions
@@ -22,36 +22,37 @@
#include <QMouseEvent>
namespace olive {
ProjectExplorerTreeView::ProjectExplorerTreeView(QWidget *parent) :
QTreeView(parent)
namespace olive
{
// Set selection mode (allows multiple item selection)
setSelectionMode(QAbstractItemView::ExtendedSelection);
// Allow dragging and dropping
setDragDropMode(QAbstractItemView::DragDrop);
ProjectExplorerTreeView::ProjectExplorerTreeView(QWidget *parent)
: QTreeView(parent)
{
// Set selection mode (allows multiple item selection)
setSelectionMode(QAbstractItemView::ExtendedSelection);
// Enable dragging
setDragEnabled(true);
// Allow dragging and dropping
setDragDropMode(QAbstractItemView::DragDrop);
// Allow dropping from external sources
setAcceptDrops(true);
// Enable dragging
setDragEnabled(true);
// Set context menu to emit a signal
setContextMenuPolicy(Qt::CustomContextMenu);
// Allow dropping from external sources
setAcceptDrops(true);
// Set context menu to emit a signal
setContextMenuPolicy(Qt::CustomContextMenu);
}
void ProjectExplorerTreeView::mouseDoubleClickEvent(QMouseEvent *event)
{
// Perform default double click functions
QTreeView::mouseDoubleClickEvent(event);
// Perform default double click functions
QTreeView::mouseDoubleClickEvent(event);
// QAbstractItemView already has a doubleClicked() signal, but we emit another here for double clicking empty space
if (!indexAt(event->pos()).isValid()) {
emit DoubleClickedEmptyArea();
}
// QAbstractItemView already has a doubleClicked() signal, but we emit another here for double clicking empty space
if (!indexAt(event->pos()).isValid()) {
emit DoubleClickedEmptyArea();
}
}
}