change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 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();
}
}
}