gui
Loading...
Searching...
No Matches
leftButtons.cc
Go to the documentation of this file.
1// gemc
2#include "gui.h"
3
4void GemcGUI::createLeftButtons() {
5 // Build the icon list in the same order as the right-side stacked widget pages.
6 std::vector<std::string> bicons;
7
8 bicons.push_back(":/gui/images/buttons/display");
9 bicons.push_back(":/gui/images/buttons/setup");
10 bicons.push_back(":/gui/images/buttons/tree");
11 bicons.push_back(":/gui/images/buttons/dialog");
12 bicons.push_back(":/gui/images/buttons/generator");
13 bicons.push_back(":/gui/images/buttons/analyzer");
14
15 // The button widget provides both the list UI and the selected index used for page switching.
16 leftButtons = new GQTButtonsWidget(96, 96, bicons);
17 const QStringList names{tr("Display"), tr("Setup"), tr("Geometry"), tr("Commands"),
18 tr("Generator"), tr("Analyzer")};
19 for (int index = 0; index < names.size(); ++index) {
20 leftButtons->buttonsWidget->item(index)->setToolTip(names[index]);
21 leftButtons->buttonsWidget->item(index)->setData(Qt::AccessibleTextRole, names[index]);
22 }
23}