Skip to content

Commit

Permalink
Version 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
antonypro committed Dec 29, 2022
1 parent 409e505 commit 02225cd
Show file tree
Hide file tree
Showing 125 changed files with 4,571 additions and 3,856 deletions.
381 changes: 0 additions & 381 deletions API.md

This file was deleted.

20 changes: 20 additions & 0 deletions CHANGELOG.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## *Version 2.1:*

- Added CMake build system support. [#18](https://github.com/antonypro/QGoodWindow/issues/18)
- Added QGoodCentralWidget as a separate module to make easier manage QGoodWindow.
- Added qGoodStateHolder macro to QGoodWindow module to handle dark and light modes application wide.
- Added Light and Dark fusion themes to QGoodWindow module.
- Added possibility to modal QDialog also have customized title bar and borders.
- Fixed problems when window receives focus back from modal QDialog.
- isActiveWindow() returns true also if active window is a children of the window.
- Prevent from resize widgets while the window is not is visible.
- Improved resize border on Linux, that respects the current window stack.
- Implemented functions to save and restore window state as is in QMainWindow. [#15](https://github.com/antonypro/QGoodWindow/issues/15)
- Fixed bug that prevents process to exit on last window close on Windows.
- API windowFlags() returns correct flags for the QGoodWindow.
- QMessageBox uses the up-to-date icons on Windows.
- Fixed warning while building on Linux related to GTK.
- Fixed bug that prevents interact with the window after moving on Qt 6.
- Fixed bug with high DPI scaling in Qt 6. [#19](https://github.com/antonypro/QGoodWindow/issues/19)
- Other bug fixes.

## *Version 2.0:*

- Added support for Qt 6. [#3](https://github.com/antonypro/QGoodWindow/issues/3)
Expand Down
Empty file modified LICENSE.md
100755 → 100644
Empty file.
108 changes: 108 additions & 0 deletions QGoodCentralWidget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
## class `QGoodCentralWidget`

`
class QGoodCentralWidget
: public QWidget
`

**QGoodCentralWidget** class contains the public API's to control the behavior of **QGoodWindow**.

### Members

#### `public explicit QGoodCentralWidget(QGoodWindow * gw)`

Constructor of *QGoodCentralWidget*, is mandatory pass a valid instance of the parent *QGoodWindow*.

#### `public ~QGoodCentralWidget()`

Destructor of *QGoodCentralWidget*.

#### `{slot} public QWidget * setLeftTitleBarWidget(QWidget * widget, bool transparent_for_mouse)`

Set the left title bar widget and returns the previous widget or nullptr if none, delete this widget as needed. If the widget is transparent for mouse, but not it's children's set *transparent_for_mouse* to true.

#### `{slot} public QWidget * setRightTitleBarWidget(QWidget * widget, bool transparent_for_mouse)`

Set the right title bar widget and returns the previous widget or nullptr if none, delete this widget as needed. If the widget is transparent for mouse, but not it's children's set *transparent_for_mouse* to true.

#### `{slot} public void setCentralWidget(QWidget * widget)`

Set the central widget of *QGoodCentralWidget*.

#### `{slot} public void setTitleBarColor(const QColor & color)`

Set the color of *QGoodCentralWidget* title bar.

#### `{slot} public void setActiveBorderColor(const QColor & color)`

Set the color of *QGoodCentralWidget* border.

#### `{slot} public void setTitleBarVisible(bool visible)`

Change the visibility of *QGoodCentralWidget* title bar.

#### `{slot} public void setTitleVisible(bool visible)`

Change the visibility of *QGoodCentralWidget* title bar title.

#### `{slot} public void setIconVisible(bool visible)`

Change the visibility of *QGoodCentralWidget* title bar icon.

#### `{slot} public void setTitleBarHeight(int height)`

Change the title bar height to *height* multiplied to current pixel ratio.

#### `{slot} public void setCaptionButtonWidth(int width)`

Change the caption button width to *width* multiplied to current pixel ratio.

#### `{slot} public QWidget * leftTitleBarWidget() const`

Returns the left *QGoodCentralWidget* title bar widget or nullptr if none is set.

#### `{slot} public QWidget * rightTitleBarWidget() const`

Returns the right *QGoodCentralWidget* title bar widget or nullptr if none is set.

#### `{slot} public QWidget * centralWidget() const`

Returns the *QGoodCentralWidget* central widget or nullptr if none is set.

#### `{slot} public QColor titleBarColor() const`

Returns the *QGoodCentralWidget* title bar color.

#### `{slot} public QColor activeBorderColor() const`

Returns the *QGoodCentralWidget* border color.

#### `{slot} public bool isTitleBarVisible() const`

Returns if the *QGoodCentralWidget* title bar is visible or not.

#### `{slot} public bool isTitleVisible() const`

Returns if the *QGoodCentralWidget* title bar title is visible or not.

#### `{slot} public bool isIconVisible() const`

Returns if the *QGoodCentralWidget* title bar icon is visible or not.

#### `{slot} public int titleBarHeight() const`

Returns the *QGoodCentralWidget* title bar height.

#### `{slot} public int captionButtonWidth() const`

Returns the *QGoodCentralWidget* title bar caption button width.

#### `{slot} public void updateWindow()`

Update the *QGoodCentralWidget* state, it's called internally and must be called if changing *QGoodCentralWidget* metrics like hide or show a title bar widget.

#### `public static int execDialogWithWindow(QDialog * dialog, QGoodWindow * parent_gw, QGoodCentralWidget * base_gcw, QWidget * left_title_bar_widget, QWidget * right_title_bar_widget, bool title_visible, bool icon_visible)`

Utility for showing a modal *QDialog* with customized title bar and borders. Pass the *QDialog* and the parent *QGoodWindow* and optionally a *QGoodCentralWidget* for mimic it's colors on the new window. Optionally pass a left title bar widget, a right title bar widget and set the visibility of title and icon on the new window.

Generated by [Moxygen](https://github.com/sourcey/moxygen)
Loading

0 comments on commit 02225cd

Please sign in to comment.