mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T257, activate (window) and formatting functions in CEnableForFramelessWindow
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "blackgui/enableforframelesswindow.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
#include "blackgui/foreignwindows.h"
|
||||
#include "blackmisc/icons.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include "blackmisc/worker.h"
|
||||
@@ -34,7 +35,7 @@ using namespace BlackMisc;
|
||||
namespace BlackGui
|
||||
{
|
||||
CEnableForFramelessWindow::CEnableForFramelessWindow(CEnableForFramelessWindow::WindowMode mode, bool isMainApplicationWindow, const char *framelessPropertyName, QWidget *correspondingWidget) :
|
||||
m_windowMode(mode), m_mainApplicationWindow(isMainApplicationWindow), m_widget(correspondingWidget), m_framelessPropertyName(framelessPropertyName)
|
||||
m_windowMode(mode), m_isMainApplicationWindow(isMainApplicationWindow), m_widget(correspondingWidget), m_framelessPropertyName(framelessPropertyName)
|
||||
{
|
||||
Q_ASSERT(correspondingWidget);
|
||||
Q_ASSERT(!m_framelessPropertyName.isEmpty());
|
||||
@@ -77,6 +78,12 @@ namespace BlackGui
|
||||
this->windowFlagsChanged();
|
||||
}
|
||||
|
||||
void CEnableForFramelessWindow::activate()
|
||||
{
|
||||
if (!m_widget) { return; }
|
||||
m_widget->setWindowState(Qt::WindowActive);
|
||||
}
|
||||
|
||||
CEnableForFramelessWindow::WindowMode CEnableForFramelessWindow::stringToWindowMode(const QString &s)
|
||||
{
|
||||
QString ws(s.trimmed().toLower());
|
||||
|
||||
Reference in New Issue
Block a user