本文整理汇总了C++中QMenu::title方法的典型用法代码示例。如果您正苦于以下问题:C++ QMenu::title方法的具体用法?C++ QMenu::title怎么用?C++ QMenu::title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMenu
的用法示例。
在下文中一共展示了QMenu::title方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createActions
//.........这里部分代码省略.........
advancedFuntionsMenu->setIcon(QIcon(UI_ICON_ADVANCED));
m_SetBSSIDMenu = new QMenu(tr("Switch to alternate BSSID"));
m_SetBSSIDMenu->setIcon(QIcon(UI_ICON_AP));
updateBSSIDMenu();
m_AutoSaveNetworksAction->setCheckable(true);
m_ToggleScanResultsAction->setCheckable(true);
m_ToggleScanResultsAction->setChecked(false);
ui.availableAPGroupBox->setVisible(false);
m_KeepScanResultsAction->setCheckable(true);
m_EnableNetworkAction->setEnabled(false);
m_DisableNetworkAction->setEnabled(false);
m_SwitchNetworkAction->setEnabled(false);
m_ConfigureNetworkAction->setEnabled(false);
m_RemoveNetworkAction->setEnabled(false);
connect(m_RescanNetworksAction, &QAction::triggered, this, &CWirelessSettings::handleRescanRequest);
connect(m_ToggleScanResultsAction, &QAction::toggled, ui.availableAPGroupBox, &QGroupBox::setVisible);
connect(m_SwitchNetworkAction, &QAction::triggered, this, &CWirelessSettings::switchToSelectedNetwork);
connect(m_ConfigureNetworkAction, &QAction::triggered, this, &CWirelessSettings::configureSelectedNetwork);
connect(m_EnableNetworkAction, &QAction::triggered, this, &CWirelessSettings::enableSelectedNetwork);
connect(m_DisableNetworkAction, &QAction::triggered, this, &CWirelessSettings::disableSelectedNetwork);
connect(enableNetworksAction, &QAction::triggered, this, &CWirelessSettings::enableNetworks);
connect(importNetworksAction, &QAction::triggered, this, &CWirelessSettings::importNetworks);
connect(exportNetworkAction, &QAction::triggered, this, &CWirelessSettings::exportSelectedNetwork);
connect(exportMultipleNetworksAction, &QAction::triggered, this, &CWirelessSettings::exportMultipleNetworks);
connect(addNetworkAction, &QAction::triggered, this, &CWirelessSettings::addNetwork);
connect(addAdhocAction, &QAction::triggered, this, &CWirelessSettings::addAdhoc);
connect(m_RemoveNetworkAction, &QAction::triggered, this, &CWirelessSettings::removeSelectedNetwork);
connect(m_SaveNetworksAction, &QAction::triggered, m_Device->getWireless()->getWpaSupplicant(), &CWpaSupplicant::save_config);
connect(reloadNetworksAction, &QAction::triggered, m_Device->getWireless()->getWpaSupplicant(), &CWpaSupplicant::reconfigure);
connect(m_KeepScanResultsAction, &QAction::toggled, this, &CWirelessSettings::keepScanResultsVisible);
connect(reassociateAction, &QAction::triggered, m_Device->getWireless()->getWpaSupplicant(), &CWpaSupplicant::reassociate);
manageNetworksMenu->addAction(enableNetworksAction);
manageNetworksMenu->addSeparator();
manageNetworksMenu->addAction(importNetworksAction);
manageNetworksMenu->addAction(exportNetworkAction);
manageNetworksMenu->addAction(exportMultipleNetworksAction);
advancedFuntionsMenu->addAction(m_SaveNetworksAction);
advancedFuntionsMenu->addAction(reloadNetworksAction);
advancedFuntionsMenu->addSeparator();
advancedFuntionsMenu->addAction(m_AutoSaveNetworksAction);
advancedFuntionsMenu->addAction(m_KeepScanResultsAction);
advancedFuntionsMenu->addSeparator();
advancedFuntionsMenu->addMenu(m_SetBSSIDMenu);
ui.managedView->addAction(m_EnableNetworkAction);
ui.managedView->addAction(m_DisableNetworkAction);
ui.managedView->addAction(getSeparator(this));
ui.managedView->addAction(m_SwitchNetworkAction);
ui.managedView->addAction(m_ConfigureNetworkAction);
ui.managedView->addAction(getSeparator(this));
ui.managedView->addAction(addNetworkAction);
ui.managedView->addAction(addAdhocAction);
ui.managedView->addAction(m_RemoveNetworkAction);
ui.managedView->addAction(getSeparator(this));
ui.managedView->addAction(manageNetworksMenu->menuAction());
ui.managedView->setContextMenuPolicy(Qt::ActionsContextMenu);
ui.availableView->addAction(addNetworkAction);
ui.availableView->addAction(getSeparator(this));
ui.availableView->addAction(m_RescanNetworksAction);
ui.availableView->setContextMenuPolicy(Qt::ActionsContextMenu);
ui.enableNetworkButton->setDefaultAction(m_EnableNetworkAction);
ui.disableNetworkButton->setDefaultAction(m_DisableNetworkAction);
ui.switchNetworkButton->setDefaultAction(m_SwitchNetworkAction);
ui.configureNetworkButton->setDefaultAction(m_ConfigureNetworkAction);
ui.removeNetworkButton->setDefaultAction(m_RemoveNetworkAction);
ui.toggleScanResultsButton->setDefaultAction(m_ToggleScanResultsAction);
ui.manageNetworksButton->setMenu(manageNetworksMenu);
ui.manageNetworksButton->setText(manageNetworksMenu->title());
ui.manageNetworksButton->setIcon(manageNetworksMenu->icon());
ui.manageNetworksButton->setPopupMode(QToolButton::InstantPopup);
ui.addNetworkButton->setDefaultAction(addNetworkAction);
ui.addAdhocButton->setDefaultAction(addAdhocAction);
ui.rescanNetworksButton->setDefaultAction(m_RescanNetworksAction);
ui.advancedFunctionsButton->setMenu(advancedFuntionsMenu);
ui.advancedFunctionsButton->setText(advancedFuntionsMenu->title());
ui.advancedFunctionsButton->setIcon(advancedFuntionsMenu->icon());
ui.advancedFunctionsButton->setPopupMode(QToolButton::InstantPopup);
ui.reassociateButton->setDefaultAction(reassociateAction);
m_SetBSSIDMapper = new QSignalMapper(this);
connect(m_SetBSSIDMapper, static_cast<void(QSignalMapper::*)(const QString &)>(&QSignalMapper::mapped), this, &CWirelessSettings::handleBSSIDSwitchRequest);
}
示例2: if
void CQ3DBarsModifier::actionTriggered(QAction* action)
{
if (action == NULL) return;
QString option = action->text();
QMenu *menu = qobject_cast<QMenu*> (action->parent());
if (menu == NULL)
{
if (option == "Change label style")
{
changeLabelBackground();
}
else if (option == "Smooth bars")
{
setSmoothBars(!m_primarySeries->isMeshSmooth());
}
else if (option == "Change camera preset")
{
changePresetCamera();
}
else if (option == "Zoom to selected bar")
{
zoomToSelectedBar();
}
else if (option == "Show background")
{
setBackgroundEnabled(!m_graph->activeTheme()->isBackgroundEnabled());
}
else if (option == "Show grid")
{
setGridEnabled(!m_graph->activeTheme()->isGridEnabled());
}
else if (option == "Show reflections")
{
setReflection(!m_graph->isReflection());
}
else if (option == "Show Gradients")
{
toggleGradient();
}
return;
}
QString title = menu->title();
if (title == "Theme")
{
changeTheme(menu->actions().indexOf(action));
}
else if (title == "Selection Mode")
{
if (option == "None")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionNone);
}
else if (option == "Bar")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionItem);
}
else if (option == "Row")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionRow);
}
else if (option == "Bar and Row")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow);
}
else if (option == "Column")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionColumn);
}
else if (option == "Bar and Column")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndColumn);
}
else if (option == "Row and Column")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionRowAndColumn);
}
else if (option == "Bar, Row and Column")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemRowAndColumn);
}
else if (option == "Slice into Row")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionSlice | QAbstract3DGraph::SelectionRow);
}
else if (option == "Slice into Row and Item")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionSlice | QAbstract3DGraph::SelectionItemAndRow);
}
else if (option == "Slice into Column")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionSlice | QAbstract3DGraph::SelectionColumn);
}
else if (option == "Slice into Column and Item")
{
m_graph->setSelectionMode(QAbstract3DGraph::SelectionSlice | QAbstract3DGraph::SelectionItemAndColumn);
//.........这里部分代码省略.........