⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (820 Bytes)
How to use Signals? // How to communicate between Objects?
» WNavigation.cpp
Quirin Schwanse
, 11/07/2018 10:21 PM
#include
"WNavigation.h"
WNavigation
::
WNavigation
()
{
//Init Buttons
b_NEWS
=
addWidget
(
make_unique
<
WPushButton
>
(
tr
(
"str.NEWS"
)));
b_DEV
=
addWidget
(
make_unique
<
WPushButton
>
(
tr
(
"str.DEV"
)));
b_PROJ
=
addWidget
(
make_unique
<
WPushButton
>
(
tr
(
"str.PROJ"
)));
b_MEDIA
=
addWidget
(
make_unique
<
WPushButton
>
(
tr
(
"str.MEDIA"
)));
b_SHOP
=
addWidget
(
make_unique
<
WPushButton
>
(
tr
(
"str.SHOP"
)));
b_CONTACT
=
addWidget
(
make_unique
<
WPushButton
>
(
tr
(
"str.CONTACT"
)));
//Connect Buttons with click-event //??????????????? How does it work?
b_NEWS
->
clicked
().
connect
(
std
::
bind
(
&
TLayout
::
switchSection
,
0
));
b_DEV
->
clicked
().
connect
(
std
::
bind
(
&
TLayout
::
switchSection
,
1
));
b_PROJ
->
clicked
().
connect
(
std
::
bind
(
&
TLayout
::
switchSection
,
2
));
}
WNavigation
::~
WNavigation
()
{
//Free da memory!
}
« Previous
1
2
3
4
Next »
(4-4/4)
Loading...