1
/***************************************
2
* Joly. Connect your web and your computer in the one place.
3
* Copyright (C) 2012-2013 Ivan Akulov <gxoptg@gmail.com>
5
* This file is the part of Joly.
7
* Joly 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.
12
* Joly 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.
17
* You should have received a copy of the GNU General Public License
18
* along with Joly. If not, see <http://www.gnu.org/licenses/>.
19
**************************************/
22
#include "appsinterface.h"
26
* Class declaration is located in "action.h" file.
29
ApplicationAction::ApplicationAction()
36
* @brief Launches the application that is represented by this action.
38
void ApplicationAction::launch() const
40
AppsInterface *appsInterface = AppsInterface::instance();
41
appsInterface->open(m_info);
45
* @brief Returns an icon that represents the action.
47
QIcon ApplicationAction::getIcon() const
49
QIcon icon = m_info.getIcon();
52
// TODO: set default application icon
59
* @brief Returns a text that represents the action.
61
QString ApplicationAction::getText() const
63
return m_info.getName();
67
* @brief Returns a formatted text to display in GlobalLine completer.
69
QString ApplicationAction::getFormattedText() const
75
* @brief Returns a kind of the action.
77
Action::Kind ApplicationAction::getKind() const
79
return Action::Kind::Kind_Application;