forked from antonypro/QGoodWindow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
4,571 additions
and
3,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.