2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Nick Dedekind <nick.dedekind@canonical.com>
20
#include "unitymenuaction.h"
21
#include "unitymenumodel.h"
23
UnityMenuAction::UnityMenuAction(QObject* parent)
30
int UnityMenuAction::index() const
35
void UnityMenuAction::setIndex(int index)
37
if (m_index != index) {
39
Q_EMIT indexChanged(index);
43
UnityMenuModel* UnityMenuAction::model() const
48
void UnityMenuAction::setModel(UnityMenuModel* model)
50
if (m_model != model) {
56
connect(model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&, const QVector<int>&)), SIGNAL(stateChanged()));
58
Q_EMIT modelChanged(model);