~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/statusmenu.h

  • Committer: Package Import Robot
  • Author(s): Jan Niehusmann
  • Date: 2014-07-01 21:49:34 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140701214934-gt4dkgm94byi4vnn
Tags: 0.15-1
* New upstream version
* set debhelper compat level to 9
* set Standards-Version to 3.9.5 (no further changes)
* add lintian override regarding license-problem-non-free-RFC
* use qconf to regenerate configure script
* implement hardening using buildflags instead of hardening-wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * statusmenu.h - helper class that displays available statuses using QMenu
 
3
 * Copyright (C) 2008-2010  Michail Pishchagin
 
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 library; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef STATUSMENU_H
 
22
#define STATUSMENU_H
 
23
 
 
24
#include <QMenu>
 
25
 
 
26
#include "xmpp_status.h"
 
27
 
 
28
class StatusMenu : public QMenu
 
29
{
 
30
        Q_OBJECT
 
31
public:
 
32
        StatusMenu(QWidget* parent);
 
33
 
 
34
        void setStatus(XMPP::Status::Type);
 
35
 
 
36
signals:
 
37
        void statusChanged(XMPP::Status::Type);
 
38
 
 
39
private:
 
40
        void addStatus(XMPP::Status::Type type);
 
41
 
 
42
private slots:
 
43
        void actionActivated();
 
44
 
 
45
private:
 
46
        XMPP::Status::Type currentStatus_;
 
47
 
 
48
        XMPP::Status::Type actionStatus(const QAction* action) const;
 
49
};
 
50
 
 
51
#endif