added icons
This commit is contained in:
@@ -50,23 +50,25 @@ void MainWindow::setupWidgets()
|
||||
OglViewerWidget* viewer = new OglViewerWidget(this);
|
||||
setCentralWidget(viewer);
|
||||
|
||||
QAction *openFile = new QAction("Open file", this);
|
||||
QAction *openFile = new QAction(QIcon(":/images/toolbar/open.png"), "Open file", this);
|
||||
connect(openFile, &QAction::triggered, this, &MainWindow::openFile);
|
||||
ui->mainToolBar->addAction(openFile);
|
||||
|
||||
ui->mainToolBar->addSeparator();
|
||||
|
||||
QSignalMapper* signalMapper = new QSignalMapper(this);
|
||||
|
||||
QAction *x = new QAction("X", this);
|
||||
QAction *x = new QAction(QIcon(":/images/toolbar/X.png"), "X", this);
|
||||
x->setCheckable(true);
|
||||
x->setChecked(true);
|
||||
ui->mainToolBar->addAction(x);
|
||||
|
||||
QAction *y = new QAction("Y", this);
|
||||
QAction *y = new QAction(QIcon(":/images/toolbar/Y.png"), "Y", this);
|
||||
y->setCheckable(true);
|
||||
y->setChecked(true);
|
||||
ui->mainToolBar->addAction(y);
|
||||
|
||||
QAction *z = new QAction("Z", this);
|
||||
QAction *z = new QAction(QIcon(":/images/toolbar/Z.png"), "Z", this);
|
||||
z->setCheckable(true);
|
||||
z->setChecked(true);
|
||||
ui->mainToolBar->addAction(z);
|
||||
@@ -81,12 +83,13 @@ void MainWindow::setupWidgets()
|
||||
|
||||
connect(signalMapper, SIGNAL(mapped(int)), viewer, SLOT(changeDirection(int)));
|
||||
|
||||
ui->mainToolBar->addSeparator();
|
||||
|
||||
QAction *fileInfo = new QAction("File info", this);
|
||||
QAction *fileInfo = new QAction(QIcon(":/images/toolbar/info.png"), "File info", this);
|
||||
connect(fileInfo, &QAction::triggered, this, &MainWindow::aboutFile);
|
||||
ui->mainToolBar->addAction(fileInfo);
|
||||
|
||||
QAction *help = new QAction("Help", this);
|
||||
QAction *help = new QAction(QIcon(":/images/toolbar/about.png"), "Help", this);
|
||||
connect(help, &QAction::triggered, this, &MainWindow::aboutTool);
|
||||
ui->mainToolBar->addAction(help);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user