Allow to select COM frequencies from ATC view (context menu)

* added functions in component to select COM frequencies
* changed views to contain ObjectType in template
* function to obtain selected objects in view base class
This commit is contained in:
Klaus Basan
2014-12-22 21:17:13 +01:00
parent d0b5fc1249
commit b26fa651ed
25 changed files with 182 additions and 55 deletions

View File

@@ -141,7 +141,7 @@ namespace BlackGui
*/
void CSettingsComponent::ps_networkServerSelected(QModelIndex index)
{
const CServer clickedServer = this->ui->tvp_SettingsTnServers->at<CServer>(index);
const CServer clickedServer = this->ui->tvp_SettingsTnServers->at(index);
this->ui->frp_ServerForm->setServer(clickedServer);
}
@@ -198,7 +198,7 @@ namespace BlackGui
{
QModelIndex i = this->ui->tvp_SettingsMiscHotkeys->currentIndex();
if (i.row() < 0 || i.row() >= this->ui->tvp_SettingsMiscHotkeys->rowCount()) return;
CSettingKeyboardHotkey hotkey = this->ui->tvp_SettingsMiscHotkeys->at<CSettingKeyboardHotkey>(i);
CSettingKeyboardHotkey hotkey = this->ui->tvp_SettingsMiscHotkeys->at(i);
CSettingKeyboardHotkey defaultHotkey;
defaultHotkey.setFunction(hotkey.getFunction());
this->ui->tvp_SettingsMiscHotkeys->derivedModel()->update(i, defaultHotkey);