Eventviews

todoviewview.h
1/*
2 This file is part of KOrganizer.
3
4 SPDX-FileCopyrightText: 2008 Thomas Thrainer <tom_t@gmx.at>
5
6 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
7*/
8
9#pragma once
10
11#include <QTimer>
12#include <QTreeView>
13
15class QMenu;
16
17class TodoViewView : public QTreeView
18{
20
21public:
22 explicit TodoViewView(QWidget *parent = nullptr);
23
24 [[nodiscard]] bool isEditing(const QModelIndex &index) const;
25
26 [[nodiscard]] bool eventFilter(QObject *watched, QEvent *event) override;
27 [[nodiscard]] KDatePickerPopup *startPopupMenu();
28
29protected:
30 QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
31 void mousePressEvent(QMouseEvent *) override;
32 void mouseReleaseEvent(QMouseEvent *) override;
33 void mouseMoveEvent(QMouseEvent *) override;
34
35private:
36 void toggleColumnHidden(QAction *action);
37 void expandParent();
38 [[nodiscard]] QModelIndex getNextEditableIndex(const QModelIndex &cur, int inc);
39
40 QMenu *mHeaderPopup = nullptr;
41 QList<QAction *> mColumnActions;
42 QTimer mExpandTimer;
43 bool mIgnoreNextMouseRelease = false;
44
45 // TODO KF6: move this next to TodoView::mMovePopupMenu.
46 KDatePickerPopup *mStartPopupMenu = nullptr;
47
49 void visibleColumnCountChanged();
50};
virtual bool event(QEvent *event) override
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
typedef KeyboardModifiers
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.