-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQtTools.h
More file actions
20 lines (19 loc) · 710 Bytes
/
Copy pathQtTools.h
File metadata and controls
20 lines (19 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include <QWidget>
#include <QTimer>
#include <QCursor>
#include <QTextEdit>
#include <QLayOut>
#include <QMouseEvent>
#include <QGraphicsView>
class QtTools
{
public:
static void centerWidgetOnCursor(QWidget* a_widget);
static void setTabSize(QTextEdit* a_edit, int a_size);
static void setLayoutItemsEnabled(QLayout* a_layout, bool a_enabled);
static void setLayoutItemsVisible(QLayout* a_layout, bool a_visible);
static QPoint graphicsScenePosition(const QMouseEvent* a_event, const QGraphicsView* a_view);
static QPoint graphicsScenePosition(const QWheelEvent* a_event, const QGraphicsView* a_view);
static QRectF limitBySceneRect(const QGraphicsView* a_view, const QRectF& a_rect);
};