Sayonara Player
Loading...
Searching...
No Matches
HistoryTableView.h
1/* HistoryTableView.h
2 *
3 * Copyright (C) 2011-2024 Michael Lugmair
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef HISTORYTABLEVIEW_H
22#define HISTORYTABLEVIEW_H
23
24#include "Gui/Utils/Widgets/Dragable.h"
25#include "Gui/Utils/Widgets/WidgetTemplate.h"
26#include "Utils/Pimpl.h"
27#include "Utils/Session/SessionUtils.h"
28
29#include <QTableView>
30
31namespace Session
32{
33 class Manager;
34}
35
37
38class HistoryTableView :
39 public Gui::WidgetTemplate<QTableView>,
40 public Gui::Dragable
41{
42 Q_OBJECT
43 PIMPL(HistoryTableView)
44
45 signals:
46 void sigRowcountChanged();
47
48 public:
49 HistoryTableView(LibraryPlaylistInteractor* libraryPlaylistInteractor,
50 Session::Manager* sessionManager,
51 Session::Timecode timecode,
52 QWidget* parent = nullptr);
53 ~HistoryTableView() override;
54
55 [[nodiscard]] int rows() const;
56
57 protected:
58 void skinChanged() override;
59 void resizeEvent(QResizeEvent* e) override;
60 void showEvent(QShowEvent* e) override;
61 void contextMenuEvent(QContextMenuEvent* e) override;
62
63 private slots:
64 void rowcountChanged();
65 void appendTriggered();
66 void playNewTabTriggered();
67 void playNextTriggered();
68 void playTriggered();
69
70 private: // NOLINT(readability-redundant-access-specifiers)
71 void initContextMenu();
72};
73
74#endif // HISTORYTABLEVIEW_H
The Dragable class.
Definition Dragable.h:62
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings.
Definition WidgetTemplate.h:86
Definition LibraryPlaylistInteractor.h:34
Definition Session.h:37