forked from DFRobot/Mindplus-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctionArea.cpp
More file actions
33 lines (30 loc) · 1.1 KB
/
FunctionArea.cpp
File metadata and controls
33 lines (30 loc) · 1.1 KB
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
#include "FunctionArea.h"
FunctionArea::FunctionArea(QWidget *parent) :
QWidget(parent)
{
setupUi(this);
initData();
}
void FunctionArea::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type())
{
case QEvent::LanguageChange:
retranslateUi(this);
break;
default:
break;
}
}
void FunctionArea::initData()
{
widgetNewProject->addData(QPixmap("./resource/images/tool_area/TopToolBar_new.png"), tr("New"));
connect(widgetNewProject, SIGNAL(signalClick()), this, SIGNAL(signalNewProjectClick()));
widgetUpload->addData(QPixmap("./resource/images/tool_area/TopToolBar_upload.png"), tr("Upload"));
connect(widgetUpload, SIGNAL(signalClick()), this, SIGNAL(signalUploadClick()));
widgetOpen->addData(QPixmap("./resource/images/tool_area/TopToolBar_open.png"), tr("Open"));
connect(widgetOpen, SIGNAL(signalClick()), this, SIGNAL(signalOpenClick()));
widgetSave->addData(QPixmap("./resource/images/tool_area/TopToolBar_save.png"), tr("Save"));
connect(widgetSave, SIGNAL(signalClick()), this, SIGNAL(signalSaveClick()));
}