KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
Frame Class Reference

QFrame subclass with logging support and color Q_PROPERTYs. More...

#include <frame.h>

+ Inheritance diagram for Frame:
+ Collaboration diagram for Frame:

Public Member Functions

 Frame (QWidget *parent=nullptr)
 Construct with an optional parent.
 
QColor foregroundColor () const
 Return the current foreground color.
 
void setForegroundColor (const QColor &color)
 Set the foreground color and repaint.
 
QColor backgroundColor () const
 Return the current background color.
 
void setBackgroundColor (const QColor &color)
 Set the background color and repaint.
 

Properties

QColor foregroundColor
 Foreground (text) color of the frame.
 
QColor backgroundColor
 Background color of the frame.
 

Detailed Description

QFrame subclass with logging support and color Q_PROPERTYs.

Frame exposes foregroundColor and backgroundColor as Qt properties, allowing them to be set from Qt Designer or stylesheets and causing the widget to repaint with the chosen colors.

Definition at line 16 of file frame.h.

Constructor & Destructor Documentation

◆ Frame()

Frame::Frame ( QWidget *  parent = nullptr)
explicit

Construct with an optional parent.

Parameters
parentOptional QWidget parent

Member Function Documentation

◆ backgroundColor()

QColor Frame::backgroundColor ( ) const
inline

Return the current background color.

Returns
Background color

Definition at line 47 of file frame.h.

◆ foregroundColor()

QColor Frame::foregroundColor ( ) const
inline

Return the current foreground color.

Returns
Foreground (text) color

Definition at line 35 of file frame.h.

◆ setBackgroundColor()

void Frame::setBackgroundColor ( const QColor &  color)

Set the background color and repaint.

Parameters
colorNew background color

◆ setForegroundColor()

void Frame::setForegroundColor ( const QColor &  color)

Set the foreground color and repaint.

Parameters
colorNew foreground color

Property Documentation

◆ backgroundColor

QColor Frame::backgroundColor
readwrite

Background color of the frame.

Definition at line 23 of file frame.h.

◆ foregroundColor

QColor Frame::foregroundColor
readwrite

Foreground (text) color of the frame.

Definition at line 21 of file frame.h.


The documentation for this class was generated from the following file: