-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.cpp
64 lines (46 loc) · 1.15 KB
/
menu.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "menu.h"
#include "ui_menu.h"
#include<QDebug>
menu::menu(QWidget *parent)
: QWidget(parent)
, ui(new Ui::menu)
{
ui->setupUi(this);
video=new Player();
image=new ImageViewer();
text= new TextEdit();
connect(video,&Player::mySignal,this,&menu::videoSub);//建立连接,player窗口点击退出,发送信号,调用videoSub()显示菜单
connect(image,&ImageViewer::mySignal,this,&menu::imageSub);//建立连接,imageviewer窗口点击退出,发送信号,调用imageSub()显示菜单
connect(text,&TextEdit::mySignal,this,&menu::textSub);//建立连接,player窗口点击退出,发送信号,调用Sub()显示菜单
}
menu::~menu()
{
delete ui;
}
void menu::videoSub()
{
this->show();
}
void menu::imageSub()
{
this->show();
}
void menu::textSub()
{
this->show();
}
void menu::on_videoButton_clicked()//音视频播放器按钮
{
this->hide();
video->show();
}
void menu::on_pushButton_clicked()//图片浏览器按钮
{
this->hide();
image->show();
}
void menu::on_pushButton_2_clicked()//富文本编辑器按钮
{
this->hide();
text->show();
}