File indexing completed on 2024-05-12 17:10:47
0001 /*************************************************************************** 0002 * Copyright (C) 2011 by Dario Freddi <drf@kde.org> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the * 0016 * Free Software Foundation, Inc., * 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 0018 ***************************************************************************/ 0019 0020 0021 #ifndef ACTIVITYWIDGET_H 0022 #define ACTIVITYWIDGET_H 0023 0024 #include <QWidget> 0025 #include <KSharedConfig> 0026 0027 class ActionEditWidget; 0028 namespace KActivities 0029 { 0030 class Consumer; 0031 } // namespace KActivities 0032 0033 namespace Ui { 0034 class ActivityWidget; 0035 } 0036 0037 class ActivityWidget : public QWidget 0038 { 0039 Q_OBJECT 0040 public: 0041 explicit ActivityWidget(const QString &activity, QWidget *parent = nullptr); 0042 ~ActivityWidget() override; 0043 0044 public Q_SLOTS: 0045 void load(); 0046 void save(); 0047 0048 void setChanged(); 0049 0050 Q_SIGNALS: 0051 void changed(bool changed); 0052 0053 private: 0054 Ui::ActivityWidget *const m_ui; 0055 KSharedConfig::Ptr m_profilesConfig; 0056 QString m_activity; 0057 KActivities::Consumer *const m_activityConsumer; 0058 ActionEditWidget *const m_actionEditWidget; 0059 }; 0060 0061 #endif // ACTIVITYWIDGET_H