Warning, file /plasma/latte-dock/app/settings/viewsdialog/viewstableview.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #include "viewstableview.h"
0007 
0008 //! Qt
0009 #include <QDebug>
0010 #include <QModelIndex>
0011 
0012 
0013 namespace Latte {
0014 namespace Settings {
0015 namespace View {
0016 
0017 ViewsTableView::ViewsTableView(QWidget *parent)
0018     : QTableView(parent)
0019 {
0020 }
0021 
0022 void ViewsTableView::mousePressEvent(QMouseEvent *event)
0023 {
0024     QModelIndex eventIndex = indexAt(event->pos());
0025 
0026     if (!eventIndex.isValid()) {
0027         clearSelection();
0028     }
0029 
0030     QTableView::mousePressEvent(event);
0031 }
0032 
0033 void ViewsTableView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
0034 {
0035     QAbstractItemView::selectionChanged(selected, deselected);
0036     emit selectionsChanged();
0037 }
0038 
0039 }
0040 }
0041 }
0042