Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F619311
os.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
os.h
View Options
/*
* Copyright (C) 2016 Christian Kaiser
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef OS_H_
#define OS_H_
#include
<QWidget>
class
QPixmap
;
class
QPoint
;
class
QString
;
class
QUrl
;
class
QGraphicsEffect
;
class
QIcon
;
#if defined(Q_OS_LINUX)
typedef
unsigned
long
XID
;
typedef
XID
Window
;
#endif
namespace
os
{
// Returns the cursor pixmap in Windows
QPixmap
cursor
();
// A QTimeLine based effect for a slot (TODO: look at the new effect classes)
void
effect
(
QObject
*
target
,
const
char
*
slot
,
int
frames
,
int
duration
=
400
,
const
char
*
cleanup
=
0
);
// Returns the current users's Documents/My Documents folder
QString
getDocumentsPath
();
// Returns the pixmap of the given window id.
QPixmap
grabWindow
(
WId
winId
);
// Set the target window as the foreground window (Windows only)
void
setForegroundWindow
(
QWidget
*
window
);
// Adds lightscreen to the startup list in Windows & Linux (KDE, Gnome and Xfce for now).
void
setStartup
(
bool
startup
,
bool
hide
);
// Creates a new QGraphicsDropShadowEffect to apply to widgets.
QGraphicsEffect
*
shadow
(
QColor
color
=
Qt
::
black
,
int
blurRadius
=
6
,
int
offset
=
1
);
// Returns a QIcon for the given icon name (taking into account color schemes and whatnot).
QIcon
icon
(
const
QString
&
name
,
QColor
backgroundColor
=
QColor
());
// X11-specific functions for the Window Picker
#if defined(Q_OS_LINUX)
Window
findRealWindow
(
Window
w
,
int
depth
=
0
);
Window
windowUnderCursor
(
bool
includeDecorations
=
true
);
#endif
}
#endif
/*OS_H_*/
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 14, 4:35 PM (9 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
134605
Default Alt Text
os.h (2 KB)
Attached To
Mode
R63 darkscreen
Attached
Detach File
Event Timeline