mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +08:00
refs #473, own launcher subproject
* command line args for swift GUI * removed _ from swiftgui_standard * removed _ from swift_resources
This commit is contained in:
committed by
Mathew Sutcliffe
parent
8e57914e67
commit
6dd66284ca
@@ -41,6 +41,28 @@ namespace BlackGui
|
||||
setMode(frameless ? WindowFrameless : WindowTool);
|
||||
}
|
||||
|
||||
CEnableForFramelessWindow::WindowMode CEnableForFramelessWindow::stringToWindowMode(const QString &s)
|
||||
{
|
||||
QString ws(s.trimmed().toLower());
|
||||
if (ws.isEmpty()) { return WindowNormal; }
|
||||
if (ws.contains("frameless") || ws.startsWith("f")) { return WindowFrameless; }
|
||||
if (ws.contains("tool") || ws.startsWith("t")) { return WindowTool; }
|
||||
return WindowNormal;
|
||||
}
|
||||
|
||||
QString CEnableForFramelessWindow::windowModeToString(CEnableForFramelessWindow::WindowMode m)
|
||||
{
|
||||
switch (m)
|
||||
{
|
||||
case WindowFrameless: return "frameless";
|
||||
case WindowNormal: return "normal";
|
||||
case WindowTool: return "tool";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "normal";
|
||||
}
|
||||
|
||||
void CEnableForFramelessWindow::setWindowAttributes(CEnableForFramelessWindow::WindowMode mode)
|
||||
{
|
||||
Q_ASSERT_X(this->m_widget, "CEnableForFramelessWindow::setWindowAttributes", "Missing widget representing window");
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace BlackGui
|
||||
//! Window modes
|
||||
enum WindowMode
|
||||
{
|
||||
WindowFrameless,
|
||||
WindowNormal,
|
||||
WindowFrameless,
|
||||
WindowTool
|
||||
};
|
||||
|
||||
@@ -56,6 +56,12 @@ namespace BlackGui
|
||||
//! Corresponding QMainWindow
|
||||
QWidget *getWidget() const { return m_widget; }
|
||||
|
||||
//! String to window mode
|
||||
static WindowMode stringToWindowMode(const QString &s);
|
||||
|
||||
//! String to window mode
|
||||
static QString windowModeToString(WindowMode m);
|
||||
|
||||
protected:
|
||||
//! Resize grip handle
|
||||
void addFramelessSizeGripToStatusBar(QStatusBar *statusBar);
|
||||
@@ -86,7 +92,7 @@ namespace BlackGui
|
||||
|
||||
QPoint m_framelessDragPosition; //!< position, if moving is handled with frameless window */
|
||||
QPushButton *m_framelessCloseButton = nullptr; //!< close button
|
||||
WindowMode m_windowMode = WindowTool; //!< Window mode, \sa WindowMode
|
||||
WindowMode m_windowMode = WindowTool; //!< Window mode, \sa WindowMode
|
||||
bool m_mainApplicationWindow = false; //!< is the main application window (only 1)
|
||||
QWidget *m_widget = nullptr; //!< corresponding main window or dock widget
|
||||
QSizeGrip *m_framelessSizeGrip = nullptr; //!< size grip object
|
||||
@@ -97,7 +103,6 @@ namespace BlackGui
|
||||
|
||||
//! Mouse moving, required for frameless window
|
||||
bool handleMouseMoveEvent(QMouseEvent *event);
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user