TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Classes | Static Public Member Functions | List of all members
TTKDesktopScreen Class Reference

The class of the desktop screen. More...

#include <ttkdesktopscreen.h>

Classes

struct  TaskbarInfo
 

Static Public Member Functions

static TaskbarInfo screenTaskbar (int index=0)
 
static QRect geometry ()
 
static QRect screenGeometry (int index=0)
 
static QRect availableGeometry (int index=0)
 
static int count ()
 
static int currentIndex ()
 
static QRect currentGeometry ()
 
static void centerWidget (QWidget *widget)
 
static QPixmap grabWidget (QWidget *widget, const QRect &rect)
 
static QPixmap grabWindow (int x=0, int y=0, int w=-1, int h=-1)
 
static int deviceDotsPerInch (int index=0)
 
static qreal devicePixelRatio (int index=0)
 
static qreal currentPixelRatio ()
 

Detailed Description

The class of the desktop screen.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 33 of file ttkdesktopscreen.h.

Member Function Documentation

QRect TTKDesktopScreen::availableGeometry ( int  index = 0)
static

Get available geometry by given screen index.

Definition at line 79 of file ttkdesktopscreen.cpp.

Referenced by screenTaskbar().

void TTKDesktopScreen::centerWidget ( QWidget *  widget)
static

Center widget in geometry rect.

Definition at line 128 of file ttkdesktopscreen.cpp.

References currentGeometry().

Referenced by TTK::Widget::adjustWidgetPosition().

int TTKDesktopScreen::count ( )
static

Get current screen count.

Definition at line 90 of file ttkdesktopscreen.cpp.

Referenced by currentIndex().

QRect TTKDesktopScreen::currentGeometry ( )
static
int TTKDesktopScreen::currentIndex ( )
static

Get current screen index in cursor pos.

Definition at line 99 of file ttkdesktopscreen.cpp.

References count(), geometry(), and screenGeometry().

Referenced by currentGeometry(), currentPixelRatio(), and MusicApplicationModule::sideAnimationByOn().

qreal TTKDesktopScreen::currentPixelRatio ( )
static

Get current device pixel ratio in cursor pos.

Definition at line 246 of file ttkdesktopscreen.cpp.

References currentIndex(), and devicePixelRatio().

Referenced by TTK::initialize(), and Miniblink::resizeEvent().

int TTKDesktopScreen::deviceDotsPerInch ( int  index = 0)
static

Get device dpi by given screen index.

Definition at line 229 of file ttkdesktopscreen.cpp.

References DEFAULT_DPI, and devicePixelRatio().

qreal TTKDesktopScreen::devicePixelRatio ( int  index = 0)
static

Get device pixel ratio by given screen index.

Definition at line 234 of file ttkdesktopscreen.cpp.

References DEFAULT_DPI, and generateDPIValue().

Referenced by currentPixelRatio(), and deviceDotsPerInch().

QRect TTKDesktopScreen::geometry ( )
static

Get all screen geometry.

Definition at line 52 of file ttkdesktopscreen.cpp.

Referenced by currentIndex(), and grabWindow().

QPixmap TTKDesktopScreen::grabWidget ( QWidget *  widget,
const QRect &  rect 
)
static

Grab widget geometry pixmap by given rect.

Definition at line 134 of file ttkdesktopscreen.cpp.

Referenced by MusicFunctionToolBoxTopWidget::mouseMoveEvent(), and MusicLrcPosterWidget::saveButtonClicked().

QPixmap TTKDesktopScreen::grabWindow ( int  x = 0,
int  y = 0,
int  w = -1,
int  h = -1 
)
static

Grab all screen geometry pixmap by given rect.

Definition at line 143 of file ttkdesktopscreen.cpp.

References geometry().

QRect TTKDesktopScreen::screenGeometry ( int  index = 0)
static

Get screen geometry by given screen index.

Definition at line 68 of file ttkdesktopscreen.cpp.

Referenced by currentGeometry(), currentIndex(), screenTaskbar(), and MusicApplicationModule::sideAnimationByOn().

TTKDesktopScreen::TaskbarInfo TTKDesktopScreen::screenTaskbar ( int  index = 0)
static

The documentation for this class was generated from the following files: