2
* Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2,
6
* or (at your option) any later version, as published by the Free
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details
14
* You should have received a copy of the GNU General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef ACTIVITY_CONTROLS_H_
21
#define ACTIVITY_CONTROLS_H_
23
#include <QGraphicsWidget>
24
#include <QGraphicsLinearLayout>
25
#include <Plasma/Label>
26
#include <Plasma/PushButton>
27
#include <Plasma/LineEdit>
29
#include "activityicon.h"
32
class ActivityControls : public QGraphicsWidget {
35
ActivityControls(ActivityIcon * parent);
37
virtual bool hidesContents() const;
44
class ActivityRemovalConfirmation: public ActivityControls {
47
ActivityRemovalConfirmation(ActivityIcon * parent);
50
void removalConfirmed();
53
QGraphicsLinearLayout * m_layout;
55
Plasma::Label * m_labelRemoveActivity;
56
Plasma::PushButton * m_buttonConfirmRemoval;
57
Plasma::PushButton * m_buttonCancel;
60
class ActivityConfiguration: public ActivityControls {
63
ActivityConfiguration(ActivityIcon * parent, Activity * activity);
64
~ActivityConfiguration();
66
bool hidesContents() const;
73
void hideEvent(QHideEvent * event);
74
void showEvent(QShowEvent * event);
77
QGraphicsLinearLayout * m_layoutButtons;
79
Plasma::Label * m_labelConfiguration;
80
Plasma::PushButton * m_buttonConfirmChanges;
81
Plasma::PushButton * m_buttonCancel;
83
QGraphicsLinearLayout * m_layoutMain;
85
QGraphicsWidget * m_main;
86
Plasma::LineEdit * m_activityName;
87
Plasma::PushButton * m_activityIcon;
89
Activity * m_activity;
93
#endif // ACTIVITY_CONTROLS_H_