This repository was archived by the owner on Oct 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessinfo.cpp
More file actions
140 lines (120 loc) · 2.95 KB
/
processinfo.cpp
File metadata and controls
140 lines (120 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#include "processinfo.h"
#pragma region Constructor and Destructor
/**
* @brief Constructs the ProcessInfo object with default values.
* Initializes processId to 0 and sets default values for process attributes.
*/
ProcessInfo::ProcessInfo() : processId(0) {
// Initialize member variables
processTitle = "";
topMost = "No"; // By default, the window is not TopMost
processName = "";
width = 0;
height = 0;
opacity = 255; // Default opacity is fully opaque
}
/**
* @brief Destructor for ProcessInfo.
*/
ProcessInfo::~ProcessInfo() {}
#pragma endregion
#pragma region Getters and Setters
/**
* @brief Returns the window title of the process.
* @return The window title as a QString.
*/
QString ProcessInfo::getProcessTitle() const {
return processTitle;
}
/**
* @brief Sets the window title of the process.
* @param title The new window title.
*/
void ProcessInfo::setProcessTitle(const QString &title) {
processTitle = title;
}
/**
* @brief Returns the TopMost status of the window.
* @return "Yes" if the window is TopMost, "No" otherwise.
*/
QString ProcessInfo::getTopMost() const {
return topMost;
}
/**
* @brief Sets the TopMost status of the window.
* @param topMostValue "Yes" to make the window TopMost, "No" otherwise.
*/
void ProcessInfo::setTopMost(const QString &topMostValue) {
topMost = topMostValue;
}
/**
* @brief Returns the process name.
* @return The process name as a QString.
*/
QString ProcessInfo::getProcessName() const {
return processName;
}
/**
* @brief Sets the process name.
* @param name The new process name.
*/
void ProcessInfo::setProcessName(const QString &name) {
processName = name;
}
/**
* @brief Returns the process ID.
* @return The process ID as a DWORD.
*/
DWORD ProcessInfo::getProcessId() const {
return processId;
}
/**
* @brief Sets the process ID.
* @param id The new process ID.
*/
void ProcessInfo::setProcessId(DWORD id) {
processId = id;
}
/**
* @brief Returns the width of the process window.
* @return The window width in pixels.
*/
int ProcessInfo::getWidth() const {
return width;
}
/**
* @brief Sets the width of the process window.
* @param w The new width in pixels.
*/
void ProcessInfo::setWidth(int w) {
width = w;
}
/**
* @brief Returns the height of the process window.
* @return The window height in pixels.
*/
int ProcessInfo::getHeight() const {
return height;
}
/**
* @brief Sets the height of the process window.
* @param h The new height in pixels.
*/
void ProcessInfo::setHeight(int h) {
height = h;
}
/**
* @brief Returns the window opacity.
* @return Opacity value (0 = fully transparent, 255 = fully opaque).
*/
int ProcessInfo::getOpacity() const {
return opacity;
}
/**
* @brief Sets the window opacity.
* @param newOpacity The new opacity value (0 = fully transparent, 255 = fully opaque).
*/
void ProcessInfo::setOpacity(int newOpacity) {
opacity = newOpacity;
}
#pragma endregion