Changeset View
Changeset View
Standalone View
Standalone View
plugins/scratchpad/emptymessagelistview.h
- This file was added.
1 | /* This file is part of KDevelop | ||||
---|---|---|---|---|---|
2 | * | ||||
3 | * Copyright 2018 Amish K. Naidu <amhndu@gmail.com> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or | ||||
6 | * modify it under the terms of the GNU General Public License | ||||
7 | * as published by the Free Software Foundation; either version 2 | ||||
8 | * of the License, or (at your option) any later version. | ||||
9 | * | ||||
10 | * This program is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | * GNU General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU General Public License | ||||
16 | * along with this program; if not, write to the Free Software | ||||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||||
18 | * 02110-1301, USA. | ||||
19 | */ | ||||
20 | #ifndef EMPTYMESSAGELISTVIEW_H | ||||
21 | #define EMPTYMESSAGELISTVIEW_H | ||||
22 | | ||||
23 | #include <QListView> | ||||
24 | | ||||
25 | // subclass to show a message when the list is empty | ||||
26 | class EmptyMessageListView | ||||
27 | : public QListView | ||||
28 | { | ||||
29 | public: | ||||
30 | EmptyMessageListView(QWidget* parent); | ||||
31 | void setEmptyMessage(const QString& message); | ||||
32 | protected: | ||||
33 | void paintEvent(QPaintEvent* event) override; | ||||
34 | private: | ||||
35 | QString m_message; | ||||
36 | }; | ||||
37 | | ||||
38 | #endif // EMPTYMESSAGELISTVIEW_H |