#include "forms/piruserform.h"
#include "forms/pirmacroform.h"
#include "forms/pirpowersearchform.h"
+#include "forms/piradvancedform.h"
#include "mainwindow.h"
userForm(0),
macroForm(0),
powerSearchForm(0),
+ advancedForm(0),
altMainPanelFlag(false),
currentTabsName(Universal_Tabs),
mainWindow(mw)
shortPanelNames[PowerSearch_Panel] = "Keyset Search";
longPanelNames[PowerSearch_Panel] =
"Keyset Search Panel - execute power button in each keyset";
+ shortPanelNames[Advanced_Panel] = "Advanced Settings";
+ longPanelNames[Advanced_Panel] =
+ "Advanced Settings - allows adjustment of protocol settings";
mainForm = new PIRMainForm(mainWindow);
panels[Main_Panel] = mainForm;
powerSearchForm = new PIRPowerSearchForm(mainWindow);
panels[PowerSearch_Panel] = powerSearchForm;
+ advancedForm = new PIRAdvancedForm();
+ panels[Advanced_Panel] = advancedForm;
+
// Set up the panel collections:
PIRPanelNameList pset;
pset.push_back(Keypad_Panel);
pset.push_back(Menu_Panel);
pset.push_back(TV_Panel);
- pset.push_back(Adjust_Panel);
+ pset.push_back(Input_Panel);
tabLists[TV_Tabs] = pset;
// The video media collection:
pset.push_back(Media_Panel);
pset.push_back(Media2_Panel);
pset.push_back(Input_Panel);
+ pset.push_back(Adjust_Panel);
tabLists[VideoMedia_Tabs] = pset;
// Audio panel collection:
pset.clear();
pset.push_back(PowerSearch_Panel);
tabLists[PowerSearch_Tabs] = pset;
+
+ // The Advanced Settings collection:
+ pset.clear();
+ pset.push_back(Advanced_Panel);
+ tabLists[Advanced_Tabs] = pset;
}
void PIRPanelManager::enableButtons(
- const PIRKeysetManager *keyset,
+ PIRKeysetManager *keyset,
unsigned int id)
{
mainForm->enableButtons(keyset, id);
void PIRPanelManager::enableButtons(
- const PIRKeysetManager *keyset,
+ PIRKeysetManager *keyset,
unsigned int currentID,
unsigned int defaultID)
{
void PIRPanelManager::commonEnableButtons(
- const PIRKeysetManager *keyset,
+ PIRKeysetManager *keyset,
unsigned int id)
{
utilityForm->enableButtons(keyset, id);
// Also, set the label in the power search form:
powerSearchForm->setKeysetName(mainWindow->getCurrentFullName());
+
+ // Set up the advanced parameters:
+ advancedForm->setupForm(keyset, id);
}
}
+void PIRPanelManager::gotoPreviousTabs()
+{
+ PIRTabsCollection::const_iterator i = tabLists.find(currentTabsName);
+
+ if (i == tabLists.end())
+ {
+ // Couldn't find currentTabsName! Throw an error here?
+ return;
+ }
+
+ if (i == tabLists.begin())
+ {
+ // Already at first collection, nothing to do:
+ return;
+ }
+
+ --i;
+ currentTabsName = i->first;
+ updateTabSet();
+}
+
+
+void PIRPanelManager::gotoNextTabs()
+{
+ PIRTabsCollection::const_iterator i = tabLists.find(currentTabsName);
+
+ if (i == tabLists.end())
+ {
+ // Couldn't find currentTabsName! Throw an error?
+ return;
+ }
+
+ ++i;
+
+ if (i == tabLists.end())
+ {
+ // We're already at the last collection, nothing to do:
+ return;
+ }
+
+ currentTabsName = i->first;
+ updateTabSet();
+}
+
+
QComboBox *PIRPanelManager::getKeysetComboBox()
{
return macroForm->getKeysetComboBox();