diff -r 454d022d514b -r aefcba28a3e0 htiui/HtiAdminQt/mainview.cpp --- a/htiui/HtiAdminQt/mainview.cpp Tue May 11 16:14:15 2010 +0300 +++ b/htiui/HtiAdminQt/mainview.cpp Tue May 25 12:43:15 2010 +0300 @@ -21,9 +21,9 @@ #include #include #include -#include +#include #include -#include +//#include #include @@ -264,43 +264,43 @@ void MainView::enableComm() { //Get current selection - QString currentComm; - mEngineWrapper.getSelectedComm(currentComm); - int curSelection = mPluginList.indexOf(currentComm, 0); - - QStringList selection; - bool ok = false; - selection = HbListDialog::getStringItems("Select Comm", mPluginList, curSelection, &ok, HbAbstractItemView::SingleSelection); - - if(ok){ - if(selection[0] == QString("Bt serial comm")){ - enableBTComm(); - } - else if(selection[0] == QString("IP comm")){ - enableIPComm(); - } - else if(selection[0] == QString("SERIAL comm")){ - enableSerialComm(); - } - else{ - //All other comm plugins - mEngineWrapper.enableOtherComm(selection[0]); - } - } +// QString currentComm; +// mEngineWrapper.getSelectedComm(currentComm); +// int curSelection = mPluginList.indexOf(currentComm, 0); +// +// QStringList selection; +// bool ok = false; +// selection = HbListDialog::getStringItems("Select Comm", mPluginList, curSelection, &ok, HbAbstractItemView::SingleSelection); +// +// if(ok){ +// if(selection[0] == QString("Bt serial comm")){ +// enableBTComm(); +// } +// else if(selection[0] == QString("IP comm")){ +// enableIPComm(); +// } +// else if(selection[0] == QString("SERIAL comm")){ +// enableSerialComm(); +// } +// else{ +// //All other comm plugins +// mEngineWrapper.enableOtherComm(selection[0]); +// } +// } } // --------------------------------------------------------------------------- void MainView::enableSerialComm() { - bool ok = false; - QString str = HbInputDialog::getText( - "Set Comm Port number ", - "", - &ok); - - if(ok){ - mEngineWrapper.enableSerial(str); - } +// bool ok = false; +// QString str = HbInputDialog::getText( +// "Set Comm Port number ", +// "", +// &ok); +// +// if(ok){ +// mEngineWrapper.enableSerial(str); +// } } @@ -308,109 +308,109 @@ void MainView::enableIPComm() { // Get IAPs list - QStringList iapsList; - mEngineWrapper.listIAPs(iapsList); - if(iapsList.count() == 0) - { - HbMessageBox msg("No IAPs for selection!", HbMessageBox::MessageTypeWarning); - msg.exec(); - return; - } - - // Get current selection - QString curIapName; - QString param = "IAPName"; - mEngineWrapper.getIPCfgParam(param, curIapName); - int curSelction = iapsList.indexOf(curIapName, 0); - - QString iap; - QStringList selection; - bool ok = false; - selection = HbListDialog::getStringItems("Select IAP:", iapsList, curSelction, &ok, HbAbstractItemView::SingleSelection); - - if(ok) - { - iap = selection[0]; - } - else - { - return; - } - - QStringList srcList; - srcList <<"Listen" <<"Connect"; - - selection = HbListDialog::getStringItems("Select IP Comm", srcList, 0, &ok, HbAbstractItemView::SingleSelection); - - if(ok){ - if(selection[0] == srcList[0]){ - QString port = HbInputDialog::getText( - "Local port", - "", - &ok); - - if(ok){ - mEngineWrapper.ipListen(port, iap); - } - - } - else{ - QString host = HbInputDialog::getText( - "Remote Host", - "", - &ok); - - if(ok){ - QString port = HbInputDialog::getText( - "Remote port", - "", - &ok); - - if(ok){ - mEngineWrapper.ipConnect(host, port, iap); - } - } - } - - } +// QStringList iapsList; +// mEngineWrapper.listIAPs(iapsList); +// if(iapsList.count() == 0) +// { +// HbMessageBox msg("No IAPs for selection!", HbMessageBox::MessageTypeWarning); +// msg.exec(); +// return; +// } +// +// // Get current selection +// QString curIapName; +// QString param = "IAPName"; +// mEngineWrapper.getIPCfgParam(param, curIapName); +// int curSelction = iapsList.indexOf(curIapName, 0); +// +// QString iap; +// QStringList selection; +// bool ok = false; +// selection = HbListDialog::getStringItems("Select IAP:", iapsList, curSelction, &ok, HbAbstractItemView::SingleSelection); +// +// if(ok) +// { +// iap = selection[0]; +// } +// else +// { +// return; +// } +// +// QStringList srcList; +// srcList <<"Listen" <<"Connect"; +// +// selection = HbListDialog::getStringItems("Select IP Comm", srcList, 0, &ok, HbAbstractItemView::SingleSelection); +// +// if(ok){ +// if(selection[0] == srcList[0]){ +// QString port = HbInputDialog::getText( +// "Local port", +// "", +// &ok); +// +// if(ok){ +// mEngineWrapper.ipListen(port, iap); +// } +// +// } +// else{ +// QString host = HbInputDialog::getText( +// "Remote Host", +// "", +// &ok); +// +// if(ok){ +// QString port = HbInputDialog::getText( +// "Remote port", +// "", +// &ok); +// +// if(ok){ +// mEngineWrapper.ipConnect(host, port, iap); +// } +// } +// } +// +// } } // --------------------------------------------------------------------------- void MainView::enableBTComm() { - QStringList srcList; - QStringList selection; - - srcList <<"BT address" <<"BT name" <<"Search when starting" ; - - bool ok = false; - selection = HbListDialog::getStringItems("", srcList, 0, &ok, HbAbstractItemView::SingleSelection); - - if(ok){ - if(selection[0] == srcList[0]){ - QString address = HbInputDialog::getText( - "BT address", - "", - &ok); - - if(ok){ - mEngineWrapper.enableBtByAddress(address); - } - } - else if(selection[0] == srcList[1]){ - QString name = HbInputDialog::getText( - "BT name", - "", - &ok); - - if(ok){ - mEngineWrapper.enableBtByName(name); - } - } - else if(selection[0] == srcList[2]){ - mEngineWrapper.btSearch(); - } - } +// QStringList srcList; +// QStringList selection; +// +// srcList <<"BT address" <<"BT name" <<"Search when starting" ; +// +// bool ok = false; +// selection = HbListDialog::getStringItems("", srcList, 0, &ok, HbAbstractItemView::SingleSelection); +// +// if(ok){ +// if(selection[0] == srcList[0]){ +// QString address = HbInputDialog::getText( +// "BT address", +// "", +// &ok); +// +// if(ok){ +// mEngineWrapper.enableBtByAddress(address); +// } +// } +// else if(selection[0] == srcList[1]){ +// QString name = HbInputDialog::getText( +// "BT name", +// "", +// &ok); +// +// if(ok){ +// mEngineWrapper.enableBtByName(name); +// } +// } +// else if(selection[0] == srcList[2]){ +// mEngineWrapper.btSearch(); +// } +// } } @@ -418,40 +418,40 @@ void MainView::setPriority() { // Get current priority - bool ok = false; - QString curPriority; - QString param = "Priority"; - mEngineWrapper.getHtiCfgParam(param, curPriority); - int curSelection = curPriority.toInt(&ok); - if(ok){ - curSelection--; - } - else{ - curSelection = 2; - } - - QStringList srcList; - QStringList selection; - - srcList <<"Backgroung" <<"Foregound" <<"High" << "Absolute High"; - - - selection = HbListDialog::getStringItems("Select Hti Priority", srcList, curSelection, &ok, HbAbstractItemView::SingleSelection); - - if(ok){ - if(selection[0] == srcList[0]){ - mEngineWrapper.setPriorityBackground(); - } - else if(selection[0] == srcList[1]){ - mEngineWrapper.setPriorityForeground(); - } - else if(selection[0] == srcList[2]){ - mEngineWrapper.setPriorityHigh(); - } - else{ - mEngineWrapper.setPriorityAbsoluteHigh(); - } - } +// bool ok = false; +// QString curPriority; +// QString param = "Priority"; +// mEngineWrapper.getHtiCfgParam(param, curPriority); +// int curSelection = curPriority.toInt(&ok); +// if(ok){ +// curSelection--; +// } +// else{ +// curSelection = 2; +// } +// +// QStringList srcList; +// QStringList selection; +// +// srcList <<"Backgroung" <<"Foregound" <<"High" << "Absolute High"; +// +// +// selection = HbListDialog::getStringItems("Select Hti Priority", srcList, curSelection, &ok, HbAbstractItemView::SingleSelection); +// +// if(ok){ +// if(selection[0] == srcList[0]){ +// mEngineWrapper.setPriorityBackground(); +// } +// else if(selection[0] == srcList[1]){ +// mEngineWrapper.setPriorityForeground(); +// } +// else if(selection[0] == srcList[2]){ +// mEngineWrapper.setPriorityHigh(); +// } +// else{ +// mEngineWrapper.setPriorityAbsoluteHigh(); +// } +// } } // --------------------------------------------------------------------------- @@ -493,62 +493,62 @@ // --------------------------------------------------------------------------- void MainView::showParamList() { - QStringList srcList; - QStringList selection; - QString value; - QString name; - QString cfgSelection; - QString paramSelection; - QString cfgHti = "Hti.cfg"; - QString cfgBtComm ="HtiBtComm.cfg"; - QString cfgSerialComm = "HtiSerialComm.cfg"; - QString cfgIPComm = "HtiIPComm.cfg"; - - srcList <