~feng-kylin/youker-assistant/youker-assistant

« back to all changes in this revision

Viewing changes to processmanager/processmanager.cpp

  • Committer: kobe
  • Date: 2015-02-13 07:37:10 UTC
  • Revision ID: xiangli@ubuntukylin.com-20150213073710-0jyp02ilyi5njj10
Qt Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "processmanager.h"
 
2
 
 
3
ProcessManager::ProcessManager(QObject *parent)
 
4
:QObject(parent), process_dialog(this)
 
5
{
 
6
 
 
7
}
 
8
 
 
9
ProcessManager::~ProcessManager()
 
10
{
 
11
 
 
12
}
 
13
 
 
14
QString ProcessManager::getGuid()
 
15
{
 
16
    return tr("7F1F6AF1-82C3-4224-8A37-496A7FC98RTA");
 
17
}
 
18
 
 
19
//插件名称
 
20
 QString ProcessManager::getName()
 
21
{
 
22
    return tr("Process Manager");
 
23
}
 
24
 
 
25
//插件描述
 
26
QString ProcessManager::getDescribe()
 
27
{
 
28
    return tr("方便用户杀掉进程");
 
29
}
 
30
 
 
31
//插件图片名称
 
32
QString ProcessManager::getPicture()
 
33
{
 
34
    return "processmanager.png";
 
35
}
 
36
 
 
37
void  ProcessManager::doAction()
 
38
{
 
39
    int windowWidth = QApplication::desktop()->width();
 
40
    int windowHeight = QApplication::desktop()->height();
 
41
    process_dialog.move((windowWidth - 850) / 2,(windowHeight - 476) / 2);
 
42
    process_dialog.show();
 
43
    process_dialog.raise();
 
44
}
 
45
 
 
46
Q_EXPORT_PLUGIN2(ProcessManager, ProcessManager)