comparison ui/processhelp.h @ 603:cfef809b890d

Add Process Management functions and ther implementation for windows.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 17 Jun 2014 17:26:10 +0200
parents
children 91dd38a71783
comparison
equal deleted inserted replaced
602:854248d81ba4 603:cfef809b890d
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=2)
5 * and comes with ABSOLUTELY NO WARRANTY!
6 * See LICENSE.txt for details.
7 *
8 * Parts of this code (especially windows) are based on kpimutils processes.cpp
9 * available under LGPL 2.1 or later.
10 */
11 #ifndef PROCESSHELP_H
12 #define PROCESSHELP_H
13
14 #include <QList>
15 #include <QString>
16
17 /**
18 * @file Static helper functions for process handling
19 * @brief process handling functions
20 */
21
22 namespace ProcessHelp {
23 /**
24 * @brief look up process id's for a processName
25 *
26 * Looks up processes run by the current user.
27 *
28 * @param[in] processName the name of the process to look for
29 * @returns a list of pids that match this process. May be empty
30 */
31 const QList<int> getProcessesIdForName(const QString &processName);
32
33 /**
34 * @brief check if another process with the same name exists
35 *
36 * @param[in] processName name of the process to look for.
37 *
38 * @returns true if one or more processes (other than the current process) exist
39 */
40 bool otherProcessesExist(const QString &processName);
41
42 /**
43 * @brief Activates the window for first found process
44 * @param [in] executableName executableName (without path and .exe extension)
45 */
46 void activateWindowForProcess(const QString &executableName);
47 }
48 #endif // PROCESSHELP_H

http://wald.intevation.org/projects/trustbridge/