~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to src/tray.h

  • Committer: Package Import Robot
  • Author(s): Jack Yu
  • Date: 2013-09-02 23:17:45 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130902231745-psyl14qxslg1g3dp
Tags: 0.1.6-0ubuntu1
* Modify SystemDispatcher and SessionDispatcher Classes.
* Add watch file into debian folder.
* Resolve status of onekey button(LP #1216236 ).
* Add monitorball code into systemdbus daemon.
* Optimize the status button.
* Add fcitx configuration function.
* Fix bugs due to bad references to apt lib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the chinese-calendar project
 
3
 * Copyright (C) 2013 National University of Defense Technology(NUDT) & Kylin Ltd
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License version 3 as
 
7
 * published by the Free Software Foundation.
 
8
 *
 
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.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 *
 
17
 * This project is developed by "UbuntuKylin Members" team,
 
18
 * see <https://launchpad.net/~ubuntukylin~members>
 
19
 * Authors: Abel Liu <guiltyritter@gmail.com>
 
20
 *                 Shine Huang <hostc@163.com>
 
21
 */
 
22
 
 
23
#ifndef TRAY_H
 
24
#define TRAY_H
 
25
 
 
26
#include <QWidget>
 
27
#include <QSystemTrayIcon>
 
28
#include <QMenu>
 
29
#include <QtGui>
 
30
#include <QAction>
 
31
#include "ui_tray.h"
 
32
 
 
33
class Tray: public QWidget, private Ui::Tray
 
34
{
 
35
    Q_OBJECT
 
36
public:
 
37
    explicit Tray(QWidget *parent = 0);
 
38
    virtual ~Tray();
 
39
    QIcon icon;
 
40
    void createTray();
 
41
 
 
42
    QSystemTrayIcon *trayIcon;
 
43
    QMenu *trayMenu;
 
44
    QAction *actionShow, *actionQuit;
 
45
 
 
46
public slots:
 
47
    void handle_trayIcon_activated(QSystemTrayIcon::ActivationReason reason);
 
48
    void showOrHide();
 
49
 
 
50
signals:
 
51
    void showFloat();
 
52
};
 
53
 
 
54
#endif