change: change code style to Linux style except indent.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user