HAL
welcome_screen.cpp
Go to the documentation of this file.
1
#include "
gui/welcome_screen/welcome_screen.h
"
2
3
#include "
gui/frames/labeled_frame.h
"
4
#include "
gui/graphics_effects/shadow_effect.h
"
5
#include "
gui/welcome_screen/get_in_touch_widget.h
"
6
#include "
gui/welcome_screen/open_file_widget.h
"
7
#include "
gui/welcome_screen/recent_files_widget.h
"
8
9
#include <QHBoxLayout>
10
#include <QStyle>
11
12
namespace
hal
13
{
14
WelcomeScreen::WelcomeScreen
(
QWidget
* parent)
15
:
QFrame
(parent), mLayout(new
QHBoxLayout
()), mRecentFilesFrame(new
LabeledFrame
()), mOpenFileFrame(new
LabeledFrame
()), mGetInTouchFrame(new
LabeledFrame
()),
16
mRecentFilesWidget(new
RecentFilesWidget
()), mOpenFileWidget(new
OpenFileWidget
()), mGetInTouchWidget(new
GetInTouchWidget
())
17
{
18
mLayout->
setContentsMargins
(0, 0, 0, 0);
19
mLayout->
setSpacing
(0);
20
mLayout->
setAlignment
(
Qt::AlignCenter
);
21
22
mRecentFilesFrame->
setObjectName
(
"recent-files-frame"
);
23
mOpenFileFrame->
setObjectName
(
"open-file-frame"
);
24
mGetInTouchFrame->
setObjectName
(
"get-in-touch-frame"
);
25
26
mRecentFilesFrame->
addContent
(mRecentFilesWidget);
27
mOpenFileFrame->
addContent
(mOpenFileWidget);
28
mGetInTouchFrame->
addContent
(mGetInTouchWidget);
29
30
mRecentFilesFrame->
setGraphicsEffect
(
new
ShadowEffect
());
31
mOpenFileFrame->
setGraphicsEffect
(
new
ShadowEffect
());
32
mGetInTouchFrame->
setGraphicsEffect
(
new
ShadowEffect
());
33
34
setLayout
(mLayout);
35
mLayout->
addWidget
(mRecentFilesFrame);
36
mLayout->
addWidget
(mOpenFileFrame);
37
mLayout->
addWidget
(mGetInTouchFrame);
38
39
repolish
();
// CALL FROM PARENT
40
}
41
42
void
WelcomeScreen::repolish
()
43
{
44
QStyle
* s =
style
();
45
46
s->
unpolish
(
this
);
47
s->
polish
(
this
);
48
49
mRecentFilesWidget->
repolish
();
50
mOpenFileWidget->
repolish
();
51
mGetInTouchWidget->
repolish
();
52
}
53
}
hal::GetInTouchWidget
The welcome screen's GetInTouch section.
Definition:
get_in_touch_widget.h:45
hal::GetInTouchWidget::repolish
void repolish()
Definition:
get_in_touch_widget.cpp:60
hal::LabeledFrame
A QFrame with a label.
Definition:
labeled_frame.h:45
hal::LabeledFrame::addContent
void addContent(QWidget *content)
Definition:
labeled_frame.cpp:39
hal::OpenFileWidget
The welcome screen's OpenFile section.
Definition:
open_file_widget.h:43
hal::OpenFileWidget::repolish
void repolish()
Definition:
open_file_widget.cpp:121
hal::RecentFilesWidget
The welcome screen's RecentFiles section.
Definition:
recent_files_widget.h:44
hal::RecentFilesWidget::repolish
void repolish()
Definition:
recent_files_widget.cpp:36
hal::ShadowEffect
Creates a shadow effect around QObjects.
Definition:
shadow_effect.h:41
hal::WelcomeScreen::repolish
void repolish()
Definition:
welcome_screen.cpp:42
hal::WelcomeScreen::WelcomeScreen
WelcomeScreen(QWidget *parent=nullptr)
Definition:
welcome_screen.cpp:14
get_in_touch_widget.h
labeled_frame.h
hal
Definition:
parser_liberty.cpp:10
open_file_widget.h
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QBoxLayout::setSpacing
void setSpacing(int spacing)
QFrame
QHBoxLayout
QLayout::setAlignment
bool setAlignment(QWidget *w, Qt::Alignment alignment)
QLayout::setContentsMargins
void setContentsMargins(int left, int top, int right, int bottom)
QObject::setObjectName
void setObjectName(const QString &name)
QStyle
QStyle::polish
virtual void polish(QWidget *widget)
QStyle::unpolish
virtual void unpolish(QWidget *widget)
Qt::AlignCenter
AlignCenter
QWidget
QWidget::setGraphicsEffect
void setGraphicsEffect(QGraphicsEffect *effect)
QWidget::setLayout
void setLayout(QLayout *layout)
QWidget::style
QStyle * style() const const
recent_files_widget.h
shadow_effect.h
welcome_screen.h
plugins
gui
src
welcome_screen
welcome_screen.cpp
Generated on Fri Feb 14 2025 14:22:43 for HAL by
1.9.1