mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
add QQt title bar
add QQtOSDFrame
This commit is contained in:
parent
e0ddce193a
commit
fdaed3c798
@ -1,17 +1,17 @@
|
||||
##-----------------------------------------------------------------
|
||||
##LibQQt样例工程入口
|
||||
##不能随便编译,初始设置要求比较严格,请按照规程设置完整。
|
||||
##Example要编译,必须先编译完LibQQt
|
||||
##本Library基于Multi-link技术,Example也是
|
||||
##Example工程也就是App工程和Library工程不能放在一起编译,否则会引发 first time bug (add_deploy_library_on_mac).
|
||||
##Library工程组和App工程组分开编译,不会引发这个bug。
|
||||
##-----------------------------------------------------------------
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
#SUBDIRS += test/giftest
|
||||
#SUBDIRS += test/voicetest
|
||||
#SUBDIRS += examples/exquisite
|
||||
SUBDIRS += demo/QQtRoseMonitor
|
||||
##-----------------------------------------------------------------
|
||||
##LibQQt样例工程入口
|
||||
##不能随便编译,初始设置要求比较严格,请按照规程设置完整。
|
||||
##Example要编译,必须先编译完LibQQt
|
||||
##本Library基于Multi-link技术,Example也是
|
||||
##Example工程也就是App工程和Library工程不能放在一起编译,否则会引发 first time bug (add_deploy_library_on_mac).
|
||||
##Library工程组和App工程组分开编译,不会引发这个bug。
|
||||
##-----------------------------------------------------------------
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS += test/QQtCustomTitleBarMainFormTest
|
||||
SUBDIRS += test/QQtOSDFormTest
|
||||
#SUBDIRS += demo/QQtRoseMonitor
|
||||
#SUBDIRS += examples/exquisite
|
||||
#SUBDIRS += test/voicetest
|
||||
#SUBDIRS += test/giftest
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e0e449906b9370cdc77aafada37aa285751bbd19
|
||||
Subproject commit d0a65e5f49433c1ca446c34926e7e169ef550362
|
1
src/exquisite/osdwidgets/qqtosdform.cpp
Normal file
1
src/exquisite/osdwidgets/qqtosdform.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include <qqtosdform.h>
|
38
src/exquisite/osdwidgets/qqtosdform.h
Normal file
38
src/exquisite/osdwidgets/qqtosdform.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef QQTOSDFORM_H
|
||||
#define QQTOSDFORM_H
|
||||
|
||||
#include <qqtwidget.h>
|
||||
|
||||
#include <qqt-local.h>
|
||||
#include <qqtcore.h>
|
||||
|
||||
/**
|
||||
* QQtOSDForm
|
||||
* 透明背景的Form,可以应用于作为透明窗口。
|
||||
* 这个窗口只是提供实现思路,由于内部窗体的Widget无法直接交给用户继承并且实现,所以给用户方法,在源程序里按照方法实现。
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtOSDForm : public QQtWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtOSDForm ( QWidget* parent = nullptr ) : QQtWidget ( parent ) {
|
||||
//必要,最底层,提供透明背景。
|
||||
setAttribute ( Qt::WA_TranslucentBackground, true );
|
||||
|
||||
//optional,qqtformbodymousehelper,提供支持鼠标点击窗体进行移动。
|
||||
//QQtFormBodyMouseHelper* helper = new QQtFormBodyMouseHelper(this);
|
||||
|
||||
//在ui文件里,设置竖向Layout。
|
||||
//上边为QQtTitleBar,用户设置高度。
|
||||
//下边为QQtOSDFrame,提供透明和边框。
|
||||
//在QQtOSDFrame里面实现用户的需求。
|
||||
}
|
||||
|
||||
~QQtOSDForm() {}
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // QQTOSDFORM_H
|
24
src/exquisite/osdwidgets/qqtosdframe.cpp
Normal file
24
src/exquisite/osdwidgets/qqtosdframe.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include <qqtosdframe.h>
|
||||
|
||||
QQtOSDFrame::QQtOSDFrame ( QWidget* parent ) : QQtWidget ( parent )
|
||||
{
|
||||
setAttribute ( Qt::WA_TranslucentBackground, true );
|
||||
}
|
||||
|
||||
QQtOSDFrame::~QQtOSDFrame() {}
|
||||
|
||||
void QQtOSDFrame::paintEvent ( QPaintEvent* event )
|
||||
{
|
||||
//这个效果一般,如果用户特别需要,自己绘制。
|
||||
#if 0
|
||||
QPainter p ( this );
|
||||
QPen pen = p.pen();
|
||||
pen.setWidth ( 3 );
|
||||
pen.setColor ( QColor ( 127, 188, 248 ) );
|
||||
p.setPen ( pen );
|
||||
p.drawLine ( QPoint ( 0, 0 ), QPoint ( 0, height() ) );
|
||||
p.drawLine ( QPoint ( 0, height() ), QPoint ( width(), height() ) );
|
||||
p.drawLine ( QPoint ( width(), height() ), QPoint ( width(), 0 ) );
|
||||
#endif
|
||||
QQtWidget::paintEvent ( event );
|
||||
}
|
34
src/exquisite/osdwidgets/qqtosdframe.h
Normal file
34
src/exquisite/osdwidgets/qqtosdframe.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef QQTOSDFRAME_H
|
||||
#define QQTOSDFRAME_H
|
||||
|
||||
#include <qqtwidget.h>
|
||||
|
||||
#include <qqt-local.h>
|
||||
#include <qqtcore.h>
|
||||
|
||||
/**
|
||||
* QQtOSDFrame
|
||||
* 透明背景的Frame,可以应用于作为透明窗体。
|
||||
*
|
||||
* 提供绘制窗体的边框。
|
||||
* 支持QSS修饰。
|
||||
* 可以设置背景。
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtOSDFrame : public QQtWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQtOSDFrame ( QWidget* parent = nullptr );
|
||||
|
||||
~QQtOSDFrame();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
virtual void paintEvent ( QPaintEvent* event ) override;
|
||||
};
|
||||
|
||||
#endif // QQTOSDFRAME_H
|
@ -6,6 +6,10 @@
|
||||
#include <qqt-local.h>
|
||||
#include <qqtcore.h>
|
||||
|
||||
/**
|
||||
* QQtOSDWidget
|
||||
* 透明背景的Widget,可以应用于作为透明控件。
|
||||
*/
|
||||
class QQTSHARED_EXPORT QQtOSDWidget : public QQtWidget
|
||||
{
|
||||
Q_OBJECT
|
@ -6,51 +6,51 @@
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
|
||||
QQtFramelessHelperPrivate::QQtFramelessHelperPrivate(QWidget* parent)
|
||||
: parent(parent),
|
||||
isMaximized(false),
|
||||
direction(None),
|
||||
buttonMaximized(0),
|
||||
buttonRestore(0),
|
||||
buttonClose(0),
|
||||
buttonMinimized(0),
|
||||
isMousePressed(false),
|
||||
QObject(parent)
|
||||
QQtFramelessHelperPrivate::QQtFramelessHelperPrivate ( QWidget* parent )
|
||||
: parent ( parent ),
|
||||
isMaximized ( false ),
|
||||
direction ( None ),
|
||||
buttonMaximized ( 0 ),
|
||||
buttonRestore ( 0 ),
|
||||
buttonClose ( 0 ),
|
||||
buttonMinimized ( 0 ),
|
||||
isMousePressed ( false ),
|
||||
QObject ( parent )
|
||||
{
|
||||
margins = QMargins(5, 5, 5, 5);
|
||||
parent->setWindowFlags(parent->windowFlags() | (Qt::FramelessWindowHint));
|
||||
parent->installEventFilter(this);
|
||||
margins = QMargins ( 8, 8, 8, 8 );
|
||||
parent->setWindowFlags ( parent->windowFlags() | ( Qt::FramelessWindowHint ) );
|
||||
parent->installEventFilter ( this );
|
||||
|
||||
|
||||
timer = new QTimer(this);
|
||||
timer->setInterval(400);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(checkPos()));
|
||||
timer = new QTimer ( this );
|
||||
timer->setInterval ( 400 );
|
||||
connect ( timer, SIGNAL ( timeout() ), this, SLOT ( checkPos() ) );
|
||||
|
||||
timer->start();
|
||||
}
|
||||
|
||||
void QQtFramelessHelperPrivate::addEdgeWidget(QWidget* widget)
|
||||
void QQtFramelessHelperPrivate::addEdgeWidget ( QWidget* widget )
|
||||
{
|
||||
if (!edgeWidgets.contains(widget))
|
||||
if ( !edgeWidgets.contains ( widget ) )
|
||||
{
|
||||
edgeWidgets.append(widget);
|
||||
edgeWidgets.append ( widget );
|
||||
|
||||
if (!dragWidgets.contains(widget))
|
||||
if ( !dragWidgets.contains ( widget ) )
|
||||
{
|
||||
widget->installEventFilter(this);
|
||||
widget->installEventFilter ( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QQtFramelessHelperPrivate::addDragWidget(QWidget* widget)
|
||||
void QQtFramelessHelperPrivate::addDragWidget ( QWidget* widget )
|
||||
{
|
||||
if (!dragWidgets.contains(widget))
|
||||
if ( !dragWidgets.contains ( widget ) )
|
||||
{
|
||||
dragWidgets.append(widget);
|
||||
dragWidgets.append ( widget );
|
||||
|
||||
if (!edgeWidgets.contains(widget))
|
||||
if ( !edgeWidgets.contains ( widget ) )
|
||||
{
|
||||
widget->installEventFilter(this);
|
||||
widget->installEventFilter ( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -59,16 +59,16 @@ void QQtFramelessHelperPrivate::checkPos()
|
||||
{
|
||||
QRect rectMustIn = parent->frameGeometry();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
QRect rectMustNotIn = rectMustIn.marginsRemoved(margins);
|
||||
QRect rectMustNotIn = rectMustIn.marginsRemoved ( margins );
|
||||
#else
|
||||
QRect rectMustNotIn = rectMustIn.adjusted(margins.left(), margins.top(), margins.right(), margins.bottom());
|
||||
QRect rectMustNotIn = rectMustIn.adjusted ( margins.left(), margins.top(), margins.right(), margins.bottom() );
|
||||
#endif
|
||||
QPoint cursorPos = QCursor::pos();
|
||||
|
||||
if (isMaximized ||
|
||||
!parent->isActiveWindow() ||
|
||||
!rectMustIn.contains(cursorPos) ||
|
||||
rectMustNotIn.contains(cursorPos))
|
||||
if ( isMaximized ||
|
||||
!parent->isActiveWindow() ||
|
||||
!rectMustIn.contains ( cursorPos ) ||
|
||||
rectMustNotIn.contains ( cursorPos ) )
|
||||
{
|
||||
direction = None;
|
||||
parent->unsetCursor();
|
||||
@ -77,7 +77,7 @@ void QQtFramelessHelperPrivate::checkPos()
|
||||
|
||||
int baseLeftCoord, baseTopCoord, baseRightCoord, baseBottomCoord;
|
||||
|
||||
rectMustNotIn.getCoords(&baseLeftCoord, &baseTopCoord, &baseRightCoord, &baseBottomCoord);
|
||||
rectMustNotIn.getCoords ( &baseLeftCoord, &baseTopCoord, &baseRightCoord, &baseBottomCoord );
|
||||
|
||||
int x, y;
|
||||
x = cursorPos.x();
|
||||
@ -85,13 +85,13 @@ void QQtFramelessHelperPrivate::checkPos()
|
||||
|
||||
direction = None;
|
||||
|
||||
if (x < baseLeftCoord)
|
||||
if ( x < baseLeftCoord )
|
||||
{
|
||||
if (y < baseTopCoord)
|
||||
if ( y < baseTopCoord )
|
||||
{
|
||||
direction = LeftTop;
|
||||
}
|
||||
else if (y > baseBottomCoord)
|
||||
else if ( y > baseBottomCoord )
|
||||
{
|
||||
direction = LeftBottom;
|
||||
}
|
||||
@ -100,13 +100,13 @@ void QQtFramelessHelperPrivate::checkPos()
|
||||
direction = Left;
|
||||
}
|
||||
}
|
||||
else if (x > baseRightCoord)
|
||||
else if ( x > baseRightCoord )
|
||||
{
|
||||
if (y < baseTopCoord)
|
||||
if ( y < baseTopCoord )
|
||||
{
|
||||
direction = RightTop;
|
||||
}
|
||||
else if (y > baseBottomCoord)
|
||||
else if ( y > baseBottomCoord )
|
||||
{
|
||||
direction = RightBottom;
|
||||
}
|
||||
@ -116,9 +116,9 @@ void QQtFramelessHelperPrivate::checkPos()
|
||||
}
|
||||
}
|
||||
|
||||
if (direction == None)
|
||||
if ( direction == None )
|
||||
{
|
||||
if (y < baseTopCoord)
|
||||
if ( y < baseTopCoord )
|
||||
{
|
||||
direction = Top;
|
||||
}
|
||||
@ -128,151 +128,151 @@ void QQtFramelessHelperPrivate::checkPos()
|
||||
}
|
||||
}
|
||||
|
||||
switch (direction)
|
||||
switch ( direction )
|
||||
{
|
||||
case Left:
|
||||
case Right:
|
||||
parent->setCursor(Qt::SizeHorCursor);
|
||||
break;
|
||||
case Left:
|
||||
case Right:
|
||||
parent->setCursor ( Qt::SizeHorCursor );
|
||||
break;
|
||||
|
||||
case Top:
|
||||
case Bottom:
|
||||
parent->setCursor(Qt::SizeVerCursor);
|
||||
break;
|
||||
case Top:
|
||||
case Bottom:
|
||||
parent->setCursor ( Qt::SizeVerCursor );
|
||||
break;
|
||||
|
||||
case LeftTop:
|
||||
case RightBottom:
|
||||
parent->setCursor(Qt::SizeFDiagCursor);
|
||||
break;
|
||||
case LeftTop:
|
||||
case RightBottom:
|
||||
parent->setCursor ( Qt::SizeFDiagCursor );
|
||||
break;
|
||||
|
||||
case LeftBottom:
|
||||
case RightTop:
|
||||
parent->setCursor(Qt::SizeBDiagCursor);
|
||||
break;
|
||||
case LeftBottom:
|
||||
case RightTop:
|
||||
parent->setCursor ( Qt::SizeBDiagCursor );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void QQtFramelessHelperPrivate::resize(const QPoint& cursorPos)
|
||||
void QQtFramelessHelperPrivate::resize ( const QPoint& cursorPos )
|
||||
{
|
||||
QSize oldSize = parent->size();
|
||||
|
||||
int x, y, width = 0, height = 0;
|
||||
|
||||
switch (direction)
|
||||
switch ( direction )
|
||||
{
|
||||
case Left: // left
|
||||
width = oldSize.width() - cursorPos.x();
|
||||
height = oldSize.height();
|
||||
case Left: // left
|
||||
width = oldSize.width() - cursorPos.x();
|
||||
height = oldSize.height();
|
||||
|
||||
x = parent->pos().x() - (width - oldSize.width());
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
x = parent->pos().x() - ( width - oldSize.width() );
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
|
||||
case Right: //right
|
||||
width = cursorPos.x();
|
||||
height = oldSize.height();
|
||||
case Right: //right
|
||||
width = cursorPos.x();
|
||||
height = oldSize.height();
|
||||
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
|
||||
case LeftTop: //left top
|
||||
width = oldSize.width() - cursorPos.x();
|
||||
height = oldSize.height() - cursorPos.y();
|
||||
case LeftTop: //left top
|
||||
width = oldSize.width() - cursorPos.x();
|
||||
height = oldSize.height() - cursorPos.y();
|
||||
|
||||
x = parent->pos().x() - (width - oldSize.width());
|
||||
y = parent->pos().y() - (height - oldSize.height());
|
||||
break;
|
||||
x = parent->pos().x() - ( width - oldSize.width() );
|
||||
y = parent->pos().y() - ( height - oldSize.height() );
|
||||
break;
|
||||
|
||||
case RightTop: //right top
|
||||
width = cursorPos.x();
|
||||
height = oldSize.height() - cursorPos.y();
|
||||
case RightTop: //right top
|
||||
width = cursorPos.x();
|
||||
height = oldSize.height() - cursorPos.y();
|
||||
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y() - (height - oldSize.height());
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y() - ( height - oldSize.height() );
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case LeftBottom: //left bottom
|
||||
width = oldSize.width() - cursorPos.x();
|
||||
height = cursorPos.y();
|
||||
case LeftBottom: //left bottom
|
||||
width = oldSize.width() - cursorPos.x();
|
||||
height = cursorPos.y();
|
||||
|
||||
x = parent->pos().x() - (width - oldSize.width());
|
||||
y = parent->pos().y();
|
||||
x = parent->pos().x() - ( width - oldSize.width() );
|
||||
y = parent->pos().y();
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case RightBottom: //right bottom
|
||||
width = cursorPos.x();
|
||||
height = cursorPos.y();
|
||||
case RightBottom: //right bottom
|
||||
width = cursorPos.x();
|
||||
height = cursorPos.y();
|
||||
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
|
||||
case Top: //top
|
||||
width = oldSize.width();
|
||||
height = oldSize.height() - cursorPos.y();
|
||||
case Top: //top
|
||||
width = oldSize.width();
|
||||
height = oldSize.height() - cursorPos.y();
|
||||
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y() - (height - oldSize.height());
|
||||
break;
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y() - ( height - oldSize.height() );
|
||||
break;
|
||||
|
||||
case Bottom: //bottom
|
||||
width = oldSize.width();
|
||||
height = cursorPos.y();
|
||||
case Bottom: //bottom
|
||||
width = oldSize.width();
|
||||
height = cursorPos.y();
|
||||
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
x = parent->pos().x();
|
||||
y = parent->pos().y();
|
||||
break;
|
||||
}
|
||||
|
||||
if (width > (margins.left() + margins.right()) &&
|
||||
height > (margins.top() + margins.bottom()))
|
||||
if ( width > ( margins.left() + margins.right() ) &&
|
||||
height > ( margins.top() + margins.bottom() ) )
|
||||
{
|
||||
parent->move(x, y);
|
||||
parent->resize(width, height);
|
||||
parent->move ( x, y );
|
||||
parent->resize ( width, height );
|
||||
}
|
||||
}
|
||||
|
||||
void QQtFramelessHelperPrivate::refreshMaximizedButton()
|
||||
{
|
||||
isMaximized = parent->windowState().testFlag(Qt::WindowMaximized);
|
||||
isMaximized = parent->windowState().testFlag ( Qt::WindowMaximized );
|
||||
|
||||
if (buttonRestore != 0)
|
||||
if ( buttonRestore != 0 )
|
||||
{
|
||||
buttonRestore->setVisible(isMaximized);
|
||||
buttonRestore->setVisible ( isMaximized );
|
||||
}
|
||||
|
||||
if (buttonMaximized != 0)
|
||||
if ( buttonMaximized != 0 )
|
||||
{
|
||||
buttonMaximized->setVisible(!isMaximized);
|
||||
buttonMaximized->setVisible ( !isMaximized );
|
||||
}
|
||||
}
|
||||
|
||||
bool QQtFramelessHelperPrivate::eventFilter(QObject* obj, QEvent* event)
|
||||
bool QQtFramelessHelperPrivate::eventFilter ( QObject* obj, QEvent* event )
|
||||
{
|
||||
do
|
||||
{
|
||||
if (event->type() == QEvent::WindowStateChange)
|
||||
if ( event->type() == QEvent::WindowStateChange )
|
||||
{
|
||||
refreshMaximizedButton();
|
||||
break;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::MouseButtonPress)
|
||||
if ( event->type() == QEvent::MouseButtonPress )
|
||||
{
|
||||
QMouseEvent* e = (QMouseEvent*)event;
|
||||
QMouseEvent* e = ( QMouseEvent* ) event;
|
||||
|
||||
// no move, no drag
|
||||
if (e->button() != Qt::LeftButton || isMaximized)
|
||||
if ( e->button() != Qt::LeftButton || isMaximized )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
checkPos();
|
||||
|
||||
if ((obj == parent || edgeWidgets.contains(qobject_cast<QWidget*>(obj))) && direction != None)
|
||||
if ( ( obj == parent || edgeWidgets.contains ( qobject_cast<QWidget*> ( obj ) ) ) && direction != None )
|
||||
{
|
||||
isMousePressed = true;
|
||||
operation = MoveResize;
|
||||
@ -280,7 +280,7 @@ bool QQtFramelessHelperPrivate::eventFilter(QObject* obj, QEvent* event)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dragWidgets.contains(qobject_cast<QWidget*>(obj)) && direction == None)
|
||||
if ( dragWidgets.contains ( qobject_cast<QWidget*> ( obj ) ) && direction == None )
|
||||
{
|
||||
isMousePressed = true;
|
||||
operation = MoveDrag;
|
||||
@ -292,26 +292,26 @@ bool QQtFramelessHelperPrivate::eventFilter(QObject* obj, QEvent* event)
|
||||
break;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::MouseMove && isMousePressed)
|
||||
if ( event->type() == QEvent::MouseMove && isMousePressed )
|
||||
{
|
||||
QMouseEvent* e = (QMouseEvent*)event;
|
||||
QMouseEvent* e = ( QMouseEvent* ) event;
|
||||
|
||||
if (operation == MoveDrag)
|
||||
if ( operation == MoveDrag )
|
||||
{
|
||||
parent->move(e->globalPos() - dragBasePoint);
|
||||
parent->move ( e->globalPos() - dragBasePoint );
|
||||
return true;
|
||||
}
|
||||
|
||||
if (operation == MoveResize)
|
||||
if ( operation == MoveResize )
|
||||
{
|
||||
if (obj != parent)
|
||||
if ( obj != parent )
|
||||
{
|
||||
QWidget* w = qobject_cast<QWidget*>(obj);
|
||||
resize(w->mapTo(parent, e->pos()));
|
||||
QWidget* w = qobject_cast<QWidget*> ( obj );
|
||||
resize ( w->mapTo ( parent, e->pos() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
resize(e->pos());
|
||||
resize ( e->pos() );
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -320,11 +320,11 @@ bool QQtFramelessHelperPrivate::eventFilter(QObject* obj, QEvent* event)
|
||||
break;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::MouseButtonRelease)
|
||||
if ( event->type() == QEvent::MouseButtonRelease )
|
||||
{
|
||||
QMouseEvent* e = (QMouseEvent*)event;
|
||||
QMouseEvent* e = ( QMouseEvent* ) event;
|
||||
|
||||
if (e->button() == Qt::LeftButton && isMousePressed)
|
||||
if ( e->button() == Qt::LeftButton && isMousePressed )
|
||||
{
|
||||
isMousePressed = false;
|
||||
operation = MoveNone;
|
||||
@ -335,9 +335,9 @@ bool QQtFramelessHelperPrivate::eventFilter(QObject* obj, QEvent* event)
|
||||
break;
|
||||
}
|
||||
|
||||
} while (false);
|
||||
} while ( false );
|
||||
|
||||
|
||||
|
||||
return QObject::eventFilter(obj, event);
|
||||
return QObject::eventFilter ( obj, event );
|
||||
}
|
||||
|
@ -31,18 +31,20 @@ QQtApplication::QQtApplication ( int& argc, char** argv ) :
|
||||
#endif
|
||||
QTextCodec::setCodecForLocale ( QTextCodec::codecForName ( "UTF-8" ) );
|
||||
|
||||
/*配置文件名称设定*/
|
||||
//App继承QQtApplication以后,必须设置这三个Value,改变为自己的Value。
|
||||
/*嵌入式,应用名称必须指定 配置文件路径$CONF_PATH/organizationName/applicationName.conf[.ini]*/
|
||||
QCoreApplication::setOrganizationName ( "QQt" );
|
||||
/*专为Mac OS X 准备的,macOS下配置文件: $CONF_PATH/organizationDomain/ApplicationName.ini ... */
|
||||
QCoreApplication::setOrganizationDomain ( "www.qqt.com" ); //
|
||||
QCoreApplication::setApplicationName ( "QQt" );
|
||||
|
||||
/*设置配置文件所在路径*/
|
||||
/*设置配置文件路径*/
|
||||
QSettings::setDefaultFormat ( QSettings::IniFormat );
|
||||
QSettings::setPath ( QSettings::IniFormat, QSettings::UserScope, CONFIG_PATH );
|
||||
QSettings::setPath ( QSettings::IniFormat, QSettings::SystemScope, CONFIG_PATH );
|
||||
|
||||
/*程序中,需要更改语言的位置,可以通过qqtApp->setLanguage实现。languageChanged信号连接到每个页面的更换语言的函数*/
|
||||
/*程序中,需要更改语言,可以通过qqtApp->setLanguage实现。languageChanged信号连接到每个页面的刷新语言的函数,一般会在这个槽函数里调用ui->retranslateUI()*/
|
||||
qqtApp = this;
|
||||
|
||||
#ifdef __DARWIN__
|
||||
@ -59,12 +61,12 @@ QQtApplication::QQtApplication ( int& argc, char** argv ) :
|
||||
pline() << "TSLIB_TSDEVICE:" << QProcessEnvironment::systemEnvironment().value ( "TSLIB_TSDEVICE" );
|
||||
#endif
|
||||
|
||||
/*解决,嵌入式板子上,串口关闭后有时无法打开的问题*/
|
||||
/*解决:嵌入式板子上串口关闭后有时无法打开的问题*/
|
||||
#ifdef __EMBEDDED_LINUX__
|
||||
system ( "rm -f /tmp/LCK..ttyS*" );
|
||||
#endif
|
||||
|
||||
/*设置语言翻译器,用户需要自己设置语言,(默认为页面上的词汇,设置后为翻译的中文或者英文)*/
|
||||
/*设置语言翻译器。用户需要自己设置语言,(默认为页面上的词汇,设置后为翻译的中文或者英文或者俄文或者其他语言。)*/
|
||||
language = new QTranslator ( this );
|
||||
|
||||
/*设置随机数种子*/
|
||||
@ -196,7 +198,7 @@ void QQtApplication::slotUPanAutoRun ( int status )
|
||||
}
|
||||
|
||||
|
||||
void QQtApplication::setTextFont ( QString fontfile, int fontsize )
|
||||
bool QQtApplication::setTextFont ( QString fontfile, int fontsize )
|
||||
{
|
||||
/*这个函数没有任何问题,检测完毕。过去的报错是工作目录不对,无法加载其他数据库*/
|
||||
/*此处,改为使用QFontDatabase的经典静态方法调用方式*/
|
||||
@ -207,12 +209,19 @@ void QQtApplication::setTextFont ( QString fontfile, int fontsize )
|
||||
pline() << "font file:" << fontfile;
|
||||
pline() << "font id:" << fontID;
|
||||
pline() << "font families:" << QFontDatabase::applicationFontFamilies ( fontID );
|
||||
//如果字体不对,这个地方会崩溃,那么我要加处理吗?
|
||||
//如果字体不对,这个地方会崩溃,那么我要加处理吗?加。
|
||||
if ( fontID < 0 )
|
||||
{
|
||||
pline() << QString ( "%1 is setted failed, unexisted, but ignored." ).arg ( fontfile );
|
||||
return false;
|
||||
}
|
||||
QString ziti = QFontDatabase::applicationFontFamilies ( fontID ).at ( 0 );
|
||||
pline() << "font name:" << ziti;
|
||||
|
||||
QFont font ( ziti, fontsize );
|
||||
QApplication::setFont ( font );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
|
||||
void setLanguage ( QString qmfile = "./lang/zh_CN.qm" );
|
||||
//palette
|
||||
void setTextFont ( QString fontfile = "/usr/lib/fonts/heiti.ttf",
|
||||
bool setTextFont ( QString fontfile = "/usr/lib/fonts/heiti.ttf",
|
||||
int fontsize = 11 );
|
||||
//这是设置全部控件的,基本的QSS,通用的QSS,全在这个里,特殊不变的也允许放在这里。
|
||||
void setQSSStyle ( QString qssfile = "./skin/default.qss" );
|
||||
|
@ -348,6 +348,9 @@ defineTest(add_defines_QQt){
|
||||
|
||||
#click sound widgets
|
||||
DEFINES += __CLICKSOUNDWIDGETS__
|
||||
|
||||
#on screen display widget
|
||||
DEFINES += __OSDWIDGETS__
|
||||
}
|
||||
|
||||
########################################################################
|
||||
@ -359,8 +362,6 @@ defineTest(add_defines_QQt){
|
||||
#if you use HighGrade module, open this annotation
|
||||
#高级模块,包含不少的高级功能组件,这个模块可以集中开关。
|
||||
DEFINES += __HIGHGRADE__
|
||||
#依赖网络模块
|
||||
!contains (DEFINES, __NETWORKSUPPORT__): DEFINES -= __HIGHGRADE__
|
||||
contains (DEFINES, __HIGHGRADE__) {
|
||||
|
||||
}
|
||||
@ -420,7 +421,7 @@ defineTest(add_include_QQt){
|
||||
header_path = $$1
|
||||
#如果参数1为空,那么是用SDK里的路径 用于链接时包含头文件
|
||||
#此处_bundle代表 mac下头文件在bundle里。 留意
|
||||
isEmpty(header_path)header_path=$$PWD
|
||||
isEmpty(header_path):header_path=$$PWD
|
||||
|
||||
command =
|
||||
#basic
|
||||
@ -465,6 +466,7 @@ defineTest(add_include_QQt){
|
||||
command += $${header_path}/exquisite/gifwidgets
|
||||
command += $${header_path}/exquisite/openglwidgets
|
||||
command += $${header_path}/exquisite/colorwidgets
|
||||
command += $${header_path}/exquisite/osdwidgets
|
||||
command += $${header_path}/exquisite/mathml
|
||||
command += $${header_path}/exquisite/dmmu
|
||||
|
||||
|
@ -90,6 +90,11 @@ HEADERS += \
|
||||
$$PWD/gui/qqtgui.h
|
||||
|
||||
#widgets
|
||||
SOURCES += \
|
||||
$$PWD/widgets/qqttitlebar.cpp
|
||||
HEADERS += \
|
||||
$$PWD/widgets/qqttitlebar.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/widgets/qqtspinbox.cpp \
|
||||
$$PWD/widgets/qqtdoublespinbox.cpp \
|
||||
@ -146,16 +151,9 @@ FORMS += \
|
||||
|
||||
#frame
|
||||
SOURCES += \
|
||||
$$PWD/frame/qqtsysteminfo.cpp
|
||||
$$PWD/frame/qqtlineeditwithsearch.cpp
|
||||
HEADERS += \
|
||||
$$PWD/frame/qqtsysteminfo.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/frame/qqtlineeditwithsearch.cpp \
|
||||
$$PWD/frame/qqtosdwidget.cpp
|
||||
HEADERS += \
|
||||
$$PWD/frame/qqtlineeditwithsearch.h \
|
||||
$$PWD/frame/qqtosdwidget.h
|
||||
$$PWD/frame/qqtlineeditwithsearch.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/frame/qqtmultipagetablewidget.cpp
|
||||
@ -531,6 +529,7 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
$$PWD/exquisite/openglwidgets/qqtopenglwindow.h
|
||||
}
|
||||
|
||||
#color widgets
|
||||
contains (DEFINES, __COLORWIDGETS__) {
|
||||
SOURCES += \
|
||||
$$PWD/exquisite/colorwidgets/qqtcolorwidget.cpp \
|
||||
@ -539,6 +538,31 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
$$PWD/exquisite/colorwidgets/qqtcolorwidget.h \
|
||||
$$PWD/exquisite/colorwidgets/qqtcolorlabel.h
|
||||
}
|
||||
|
||||
#on screen display widgets
|
||||
contains (DEFINES, __OSDWIDGETS__) {
|
||||
SOURCES += \
|
||||
$$PWD/exquisite/osdwidgets/qqtosdwidget.cpp
|
||||
HEADERS += \
|
||||
$$PWD/exquisite/osdwidgets/qqtosdwidget.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/exquisite/osdwidgets/qqtosdframe.cpp
|
||||
HEADERS += \
|
||||
$$PWD/exquisite/osdwidgets/qqtosdframe.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/exquisite/osdwidgets/qqtosdform.cpp
|
||||
HEADERS += \
|
||||
$$PWD/exquisite/osdwidgets/qqtosdform.h
|
||||
}
|
||||
}
|
||||
|
||||
contains (DEFINES, __HIGHGRADE__) {
|
||||
SOURCES += \
|
||||
$$PWD/highgrade/qqtsysteminfo.cpp
|
||||
HEADERS += \
|
||||
$$PWD/highgrade/qqtsysteminfo.h
|
||||
}
|
||||
|
||||
include ($$PWD/qqt_3rdparty.pri)
|
||||
|
236
src/widgets/qqttitlebar.cpp
Normal file
236
src/widgets/qqttitlebar.cpp
Normal file
@ -0,0 +1,236 @@
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QApplication>
|
||||
#include "qqttitlebar.h"
|
||||
#ifdef Q_OS_WIN
|
||||
//#pragma comment(lib, "user32.lib")
|
||||
#include <qt_windows.h>
|
||||
#endif
|
||||
#include <QSpacerItem>
|
||||
|
||||
QQtTitleBar::QQtTitleBar ( QWidget* parent )
|
||||
: QQtWidget ( parent )
|
||||
{
|
||||
QWidget* win = this->window();
|
||||
|
||||
win->setWindowFlags ( Qt::FramelessWindowHint | win->windowFlags() );
|
||||
win->installEventFilter ( this );
|
||||
|
||||
//setStyleSheet ( "background-color:rgb(128, 126, 128);" );
|
||||
|
||||
//int extent = style()->pixelMetric ( QStyle::PM_TitleBarHeight );
|
||||
//setFixedHeight ( extent );
|
||||
|
||||
QHBoxLayout* pLayout = new QHBoxLayout ( this );
|
||||
m_pIconLabel = new QQtWidget ( this );
|
||||
m_pTitleLabel = new QLabel ( this );
|
||||
QSpacerItem* item = new QSpacerItem ( 20, 20, QSizePolicy::Expanding );
|
||||
m_pMinimizeButton = new QToolButton ( this );
|
||||
m_pMaximizeButton = new QToolButton ( this );
|
||||
m_pCloseButton = new QToolButton ( this );
|
||||
|
||||
//extent = style()->pixelMetric ( QStyle::PM_TitleBarButtonIconSize );
|
||||
//m_pIconLabel->setFixedSize ( QSize ( extent, extent ) );
|
||||
//m_pIconLabel->setScaledContents ( true );
|
||||
m_pIconLabel->setPixmap ( win->windowIcon().pixmap ( m_pIconLabel->size() ) );
|
||||
m_pIconLabel->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
|
||||
m_pTitleLabel->setText ( win->windowTitle() );
|
||||
m_pTitleLabel->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
|
||||
//extent = style()->pixelMetric ( QStyle::PM_TitleBarButtonSize );
|
||||
//m_pMinimizeButton->setFixedSize ( QSize ( extent, extent ) );
|
||||
//m_pMaximizeButton->setFixedSize ( QSize ( extent, extent ) );
|
||||
//m_pCloseButton->setFixedSize ( QSize ( extent, extent ) );
|
||||
|
||||
m_pMinimizeButton->setIcon ( style()-> standardIcon ( QStyle::SP_TitleBarMinButton ) );
|
||||
m_pMaximizeButton->setIcon ( style()-> standardIcon ( QStyle::SP_TitleBarMaxButton ) );
|
||||
m_pCloseButton->setIcon ( style()-> standardIcon ( QStyle::SP_TitleBarCloseButton ) );
|
||||
|
||||
m_pMinimizeButton->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
m_pMaximizeButton->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
m_pCloseButton->setSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
|
||||
m_pIconLabel->setObjectName ( "iconLabel" );
|
||||
m_pTitleLabel->setObjectName ( "titleLabel" );
|
||||
m_pMinimizeButton->setObjectName ( "minimizeButton" );
|
||||
m_pMaximizeButton->setObjectName ( "maximizeButton" );
|
||||
m_pCloseButton->setObjectName ( "closeButton" );
|
||||
|
||||
m_pMinimizeButton->setToolTip ( "Minimize" );
|
||||
m_pMaximizeButton->setToolTip ( "Maximize" );
|
||||
m_pCloseButton->setToolTip ( "Close" );
|
||||
|
||||
pLayout->addWidget ( m_pIconLabel );
|
||||
pLayout->addSpacing ( 5 );
|
||||
pLayout->addWidget ( m_pTitleLabel );
|
||||
pLayout->addSpacerItem ( item );
|
||||
pLayout->addWidget ( m_pMinimizeButton );
|
||||
pLayout->addWidget ( m_pMaximizeButton );
|
||||
pLayout->addWidget ( m_pCloseButton );
|
||||
pLayout->setSpacing ( 0 );
|
||||
pLayout->setContentsMargins ( 8, 1, 8, 1 );
|
||||
|
||||
setLayout ( pLayout );
|
||||
|
||||
connect ( m_pMinimizeButton, SIGNAL ( clicked ( bool ) ), this, SLOT ( onClicked() ) );
|
||||
connect ( m_pMaximizeButton, SIGNAL ( clicked ( bool ) ), this, SLOT ( onClicked() ) );
|
||||
connect ( m_pCloseButton, SIGNAL ( clicked ( bool ) ), this, SLOT ( onClicked() ) );
|
||||
}
|
||||
|
||||
QQtTitleBar::~QQtTitleBar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QQtTitleBar::setMinimizeVisible ( bool setting )
|
||||
{
|
||||
m_pMinimizeButton->setVisible ( setting );
|
||||
}
|
||||
|
||||
void QQtTitleBar::setMaximizeVisible ( bool setting )
|
||||
{
|
||||
m_pMaximizeButton->setVisible ( setting );
|
||||
}
|
||||
|
||||
void QQtTitleBar::mouseDoubleClickEvent ( QMouseEvent* event )
|
||||
{
|
||||
Q_UNUSED ( event );
|
||||
|
||||
emit m_pMaximizeButton->clicked();
|
||||
}
|
||||
|
||||
void QQtTitleBar::mousePressEvent ( QMouseEvent* event )
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
if ( ReleaseCapture() )
|
||||
{
|
||||
QWidget* pWindow = this->window();
|
||||
if ( pWindow->isTopLevel() )
|
||||
{
|
||||
SendMessage ( HWND ( pWindow->winId() ), WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0 );
|
||||
}
|
||||
}
|
||||
event->ignore();
|
||||
#else
|
||||
if ( event->button() == Qt::LeftButton )
|
||||
{
|
||||
bMousePressed = true;
|
||||
pressedPoint = event->globalPos();
|
||||
}
|
||||
event->ignore();
|
||||
#endif
|
||||
QQtWidget::mousePressEvent ( event );
|
||||
}
|
||||
|
||||
void QQtTitleBar::mouseReleaseEvent ( QMouseEvent* event )
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
#else
|
||||
bMousePressed = false;
|
||||
event->ignore();
|
||||
#endif
|
||||
QQtWidget::mouseReleaseEvent ( event );
|
||||
}
|
||||
|
||||
void QQtTitleBar::mouseMoveEvent ( QMouseEvent* event )
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
#else
|
||||
QWidget* win = window();
|
||||
if ( !win->isMaximized() )
|
||||
{
|
||||
QPoint movePoint = event->globalPos() - pressedPoint;
|
||||
QPoint widgetPos = win->pos();
|
||||
pressedPoint = event->globalPos();
|
||||
win->move ( widgetPos.x() + movePoint.x(), widgetPos.y() + movePoint.y() );
|
||||
}
|
||||
event->ignore();
|
||||
#endif
|
||||
QQtWidget::mouseMoveEvent ( event );
|
||||
}
|
||||
|
||||
bool QQtTitleBar::eventFilter ( QObject* obj, QEvent* event )
|
||||
{
|
||||
switch ( event->type() )
|
||||
{
|
||||
case QEvent::WindowTitleChange:
|
||||
{
|
||||
QWidget* pWidget = qobject_cast<QWidget*> ( obj );
|
||||
if ( pWidget )
|
||||
{
|
||||
m_pTitleLabel->setText ( pWidget->windowTitle() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case QEvent::WindowIconChange:
|
||||
{
|
||||
QWidget* pWidget = qobject_cast<QWidget*> ( obj );
|
||||
if ( pWidget )
|
||||
{
|
||||
//必须对外部Widget设置WindowIcon,而不是这个Widget的WindowIcon.
|
||||
QIcon icon = pWidget->windowIcon();
|
||||
m_pIconLabel->setPixmap ( icon.pixmap ( m_pIconLabel->size() ) );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
case QEvent::WindowStateChange:
|
||||
case QEvent::Resize:
|
||||
{
|
||||
int extent = m_pTitleLabel->size().height();
|
||||
m_pIconLabel->setMinimumSize ( extent, extent );
|
||||
updateMaximize();
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return QWidget::eventFilter ( obj, event );
|
||||
}
|
||||
|
||||
void QQtTitleBar::onClicked()
|
||||
{
|
||||
QToolButton* pButton = qobject_cast<QToolButton*> ( sender() );
|
||||
QWidget* pWindow = this->window();
|
||||
if ( pWindow->isTopLevel() )
|
||||
{
|
||||
if ( pButton == m_pMinimizeButton )
|
||||
{
|
||||
pWindow->showMinimized();
|
||||
}
|
||||
else if ( pButton == m_pMaximizeButton )
|
||||
{
|
||||
pWindow->isMaximized() ? pWindow->showNormal() : pWindow->showMaximized();
|
||||
}
|
||||
else if ( pButton == m_pCloseButton )
|
||||
{
|
||||
pWindow->close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QQtTitleBar::updateMaximize()
|
||||
{
|
||||
QWidget* pWindow = this->window();
|
||||
if ( pWindow->isTopLevel() )
|
||||
{
|
||||
bool bMaximize = pWindow->isMaximized();
|
||||
if ( bMaximize )
|
||||
{
|
||||
m_pMaximizeButton->setToolTip ( tr ( "Restore" ) );
|
||||
m_pMaximizeButton->setProperty ( "maximizeProperty", "restore" );
|
||||
m_pMaximizeButton->setIcon ( style()-> standardIcon ( QStyle::SP_TitleBarNormalButton ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pMaximizeButton->setProperty ( "maximizeProperty", "maximize" );
|
||||
m_pMaximizeButton->setToolTip ( tr ( "Maximize" ) );
|
||||
m_pMaximizeButton->setIcon ( style()-> standardIcon ( QStyle::SP_TitleBarMaxButton ) );
|
||||
}
|
||||
|
||||
m_pMaximizeButton->setStyle ( QApplication::style() );
|
||||
}
|
||||
}
|
66
src/widgets/qqttitlebar.h
Normal file
66
src/widgets/qqttitlebar.h
Normal file
@ -0,0 +1,66 @@
|
||||
#ifndef QQTTITLEBAR
|
||||
#define QQTTITLEBAR
|
||||
|
||||
#include <QQtWidget>
|
||||
|
||||
class QLabel;
|
||||
class QToolButton;
|
||||
|
||||
#include <qqtcore.h>
|
||||
#include <qqt-local.h>
|
||||
|
||||
class QQTSHARED_EXPORT QQtTitleBar : public QQtWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QQtTitleBar ( QWidget* parent = 0 );
|
||||
~QQtTitleBar();
|
||||
|
||||
void setMinimizeVisible ( bool setting );
|
||||
void setMaximizeVisible ( bool setting );
|
||||
|
||||
QQtWidget* iconLabel() { return m_pIconLabel; }
|
||||
QLabel* titleLabel() { return m_pTitleLabel; }
|
||||
QToolButton* minimizeButton() { return m_pMinimizeButton; }
|
||||
QToolButton* maximizeButton() { return m_pMaximizeButton; }
|
||||
QToolButton* closeButton() { return m_pCloseButton; }
|
||||
|
||||
protected:
|
||||
|
||||
// 双击标题栏进行界面的最大化/还原
|
||||
virtual void mouseDoubleClickEvent ( QMouseEvent* event ) override;
|
||||
|
||||
// 进行鼠界面的拖动
|
||||
virtual void mousePressEvent ( QMouseEvent* event ) override;
|
||||
|
||||
virtual void mouseReleaseEvent ( QMouseEvent* event ) override;
|
||||
|
||||
virtual void mouseMoveEvent ( QMouseEvent* event ) override;
|
||||
|
||||
// 设置界面标题与图标
|
||||
virtual bool eventFilter ( QObject* obj, QEvent* event );
|
||||
|
||||
private slots:
|
||||
|
||||
// 进行最小化、最大化/还原、关闭操作
|
||||
void onClicked();
|
||||
|
||||
private:
|
||||
|
||||
// 最大化/还原
|
||||
void updateMaximize();
|
||||
|
||||
private:
|
||||
//QLabel会有角上遗漏颜色。
|
||||
QQtWidget* m_pIconLabel;
|
||||
QLabel* m_pTitleLabel;
|
||||
QToolButton* m_pMinimizeButton;
|
||||
QToolButton* m_pMaximizeButton;
|
||||
QToolButton* m_pCloseButton;
|
||||
bool bMousePressed;
|
||||
QPoint pressedPoint;
|
||||
|
||||
};
|
||||
|
||||
#endif // QQTTITLEBAR
|
BIN
test/QQtCustomTitleBarMainFormTest/AppRoot/logo.ico
Normal file
BIN
test/QQtCustomTitleBarMainFormTest/AppRoot/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
test/QQtCustomTitleBarMainFormTest/AppRoot/logo.png
Normal file
BIN
test/QQtCustomTitleBarMainFormTest/AppRoot/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
@ -0,0 +1,47 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-07-07T11:17:05
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = QQtCustomTitleBarMainFormTest
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
mainform.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
mainform.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
mainform.ui
|
||||
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
|
||||
system("touch main.cpp")
|
||||
include(../../multi-link/multi-link/add_base_manager.pri)
|
||||
add_version (1,0,0,0)
|
||||
add_deploy()
|
||||
add_dependent_manager(QQt)
|
||||
add_deploy_config($${PWD}/AppRoot)
|
12
test/QQtCustomTitleBarMainFormTest/main.cpp
Normal file
12
test/QQtCustomTitleBarMainFormTest/main.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "mainform.h"
|
||||
#include <QQtApplication>
|
||||
|
||||
int main ( int argc, char* argv[] )
|
||||
{
|
||||
QQtApplication a ( argc, argv );
|
||||
|
||||
MainForm w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
22
test/QQtCustomTitleBarMainFormTest/mainform.cpp
Normal file
22
test/QQtCustomTitleBarMainFormTest/mainform.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "mainform.h"
|
||||
#include "ui_mainform.h"
|
||||
#include "qqtframelesshelper.h"
|
||||
|
||||
MainForm::MainForm ( QWidget* parent ) :
|
||||
QWidget ( parent ),
|
||||
ui ( new Ui::MainForm )
|
||||
{
|
||||
ui->setupUi ( this );
|
||||
//如果需要鼠标可以移动窗体。
|
||||
QQtFramelessHelper* h = new QQtFramelessHelper ( this );
|
||||
h->addDragWidget ( this );
|
||||
|
||||
//这是使用QQtTitleBar的标准过程,请参见mainform.ui。
|
||||
setWindowIcon ( QIcon ( "logo.ico" ) );
|
||||
setWindowTitle ( "This is a main form test form." );
|
||||
}
|
||||
|
||||
MainForm::~MainForm()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
test/QQtCustomTitleBarMainFormTest/mainform.h
Normal file
22
test/QQtCustomTitleBarMainFormTest/mainform.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINFORM_H
|
||||
#define MAINFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class MainForm;
|
||||
}
|
||||
|
||||
class MainForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainForm(QWidget *parent = 0);
|
||||
~MainForm();
|
||||
|
||||
private:
|
||||
Ui::MainForm *ui;
|
||||
};
|
||||
|
||||
#endif // MAINFORM_H
|
63
test/QQtCustomTitleBarMainFormTest/mainform.ui
Normal file
63
test/QQtCustomTitleBarMainFormTest/mainform.ui
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainForm</class>
|
||||
<widget class="QWidget" name="MainForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>567</width>
|
||||
<height>347</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QQtTitleBar" name="widget" native="true">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MainWindow" name="widget_2" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MainWindow</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>mainwindow.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QQtTitleBar</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qqttitlebar.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
15
test/QQtCustomTitleBarMainFormTest/mainwindow.cpp
Normal file
15
test/QQtCustomTitleBarMainFormTest/mainwindow.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow ( QWidget* parent ) :
|
||||
QMainWindow ( parent ),
|
||||
ui ( new Ui::MainWindow )
|
||||
{
|
||||
ui->setupUi ( this );
|
||||
setWindowFlags ( Qt::Widget );
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
test/QQtCustomTitleBarMainFormTest/mainwindow.h
Normal file
22
test/QQtCustomTitleBarMainFormTest/mainwindow.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
61
test/QQtCustomTitleBarMainFormTest/mainwindow.ui
Normal file
61
test/QQtCustomTitleBarMainFormTest/mainwindow.ui
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>你好</string>
|
||||
</property>
|
||||
<addaction name="actionYes"/>
|
||||
<addaction name="actionNo"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<action name="actionYes">
|
||||
<property name="text">
|
||||
<string>Yes?</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNo">
|
||||
<property name="text">
|
||||
<string>No?</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
BIN
test/QQtOSDFormTest/AppRoot/logo.ico
Normal file
BIN
test/QQtOSDFormTest/AppRoot/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
test/QQtOSDFormTest/AppRoot/logo.png
Normal file
BIN
test/QQtOSDFormTest/AppRoot/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
BIN
test/QQtOSDFormTest/AppRoot/rose.png
Normal file
BIN
test/QQtOSDFormTest/AppRoot/rose.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 382 KiB |
51
test/QQtOSDFormTest/QQtOSDFormTest.pro
Normal file
51
test/QQtOSDFormTest/QQtOSDFormTest.pro
Normal file
@ -0,0 +1,51 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2018-07-07T19:03:15
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = QQtOSDFormTest
|
||||
TEMPLATE = app
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
framelessform.cpp \
|
||||
mainform.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
framelessform.h \
|
||||
mainform.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
framelessform.ui \
|
||||
mainform.ui
|
||||
|
||||
CONFIG += mobility
|
||||
MOBILITY =
|
||||
|
||||
|
||||
system("touch main.cpp")
|
||||
include(../../multi-link/multi-link/add_base_manager.pri)
|
||||
add_version (1,0,0,0)
|
||||
add_deploy()
|
||||
add_dependent_manager(QQt)
|
||||
add_deploy_config($${PWD}/AppRoot)
|
17
test/QQtOSDFormTest/framelessform.cpp
Normal file
17
test/QQtOSDFormTest/framelessform.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "framelessform.h"
|
||||
#include "ui_framelessform.h"
|
||||
#include <qqtframelesshelper.h>
|
||||
|
||||
FramelessForm::FramelessForm ( QWidget* parent ) :
|
||||
QWidget ( parent ),
|
||||
ui ( new Ui::FramelessForm )
|
||||
{
|
||||
ui->setupUi ( this );
|
||||
QQtFramelessHelper* h = new QQtFramelessHelper ( this );
|
||||
h->addDragWidget ( this );
|
||||
}
|
||||
|
||||
FramelessForm::~FramelessForm()
|
||||
{
|
||||
delete ui;
|
||||
}
|
23
test/QQtOSDFormTest/framelessform.h
Normal file
23
test/QQtOSDFormTest/framelessform.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef FRAMELESSFORM_H
|
||||
#define FRAMELESSFORM_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class FramelessForm;
|
||||
}
|
||||
|
||||
//测试framelesshelper,即将废弃。
|
||||
class FramelessForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FramelessForm ( QWidget* parent = 0 );
|
||||
~FramelessForm();
|
||||
|
||||
private:
|
||||
Ui::FramelessForm* ui;
|
||||
};
|
||||
|
||||
#endif // FRAMELESSFORM_H
|
21
test/QQtOSDFormTest/framelessform.ui
Normal file
21
test/QQtOSDFormTest/framelessform.ui
Normal file
@ -0,0 +1,21 @@
|
||||
<ui version="4.0">
|
||||
<author/>
|
||||
<comment/>
|
||||
<exportmacro/>
|
||||
<class>FramelessForm</class>
|
||||
<widget class="QWidget" name="FramelessForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
</widget>
|
||||
<pixmapfunction/>
|
||||
<connections/>
|
||||
</ui>
|
11
test/QQtOSDFormTest/main.cpp
Normal file
11
test/QQtOSDFormTest/main.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include <QQtApplication>
|
||||
#include "mainform.h"
|
||||
|
||||
int main ( int argc, char* argv[] )
|
||||
{
|
||||
QQtApplication a ( argc, argv );
|
||||
MainForm w;
|
||||
w.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
26
test/QQtOSDFormTest/mainform.cpp
Normal file
26
test/QQtOSDFormTest/mainform.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "mainform.h"
|
||||
#include "ui_mainform.h"
|
||||
#include "qqtframelesshelper.h"
|
||||
|
||||
MainForm::MainForm ( QWidget* parent ) :
|
||||
QQtWidget ( parent ),
|
||||
ui ( new Ui::MainForm )
|
||||
{
|
||||
ui->setupUi ( this );
|
||||
setAttribute ( Qt::WA_TranslucentBackground, true );
|
||||
|
||||
//如果需要鼠标可以移动窗体。
|
||||
//QQtFramelessHelper* h = new QQtFramelessHelper ( this );
|
||||
//h->addDragWidget ( this );
|
||||
|
||||
//这是使用QQtTitleBar的标准过程,请参见mainform.ui。
|
||||
setWindowIcon ( QIcon ( "logo.ico" ) );
|
||||
setWindowTitle ( "This is a main form test form." );
|
||||
|
||||
//setPixmap ( "rose.png" );
|
||||
}
|
||||
|
||||
MainForm::~MainForm()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
test/QQtOSDFormTest/mainform.h
Normal file
22
test/QQtOSDFormTest/mainform.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINFORM_H
|
||||
#define MAINFORM_H
|
||||
|
||||
#include <QQtWidget>
|
||||
|
||||
namespace Ui {
|
||||
class MainForm;
|
||||
}
|
||||
|
||||
class MainForm : public QQtWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainForm ( QWidget* parent = 0 );
|
||||
~MainForm();
|
||||
|
||||
private:
|
||||
Ui::MainForm* ui;
|
||||
};
|
||||
|
||||
#endif // MAINFORM_H
|
63
test/QQtOSDFormTest/mainform.ui
Normal file
63
test/QQtOSDFormTest/mainform.ui
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainForm</class>
|
||||
<widget class="QQtWidget" name="MainForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>567</width>
|
||||
<height>347</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QQtTitleBar" name="widget" native="true">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QQtOSDFrame" name="widget_2" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QQtTitleBar</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qqttitlebar.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QQtOSDFrame</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qqtosdframe.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
14
test/QQtOSDFormTest/mainwindow.cpp
Normal file
14
test/QQtOSDFormTest/mainwindow.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
test/QQtOSDFormTest/mainwindow.h
Normal file
22
test/QQtOSDFormTest/mainwindow.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
21
test/QQtOSDFormTest/mainwindow.ui
Normal file
21
test/QQtOSDFormTest/mainwindow.ui
Normal file
@ -0,0 +1,21 @@
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
x
Reference in New Issue
Block a user