bug fix, added GUI controls for server info, added some server info init code, removed server selection in main window, changed connect dialog server list columns
This commit is contained in:
parent
328dbd2b1c
commit
ead06da44d
6 changed files with 124 additions and 63 deletions
|
@ -5,8 +5,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>584</width>
|
<width>464</width>
|
||||||
<height>256</height>
|
<height>255</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Country</string>
|
<string>Ping Time</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
|
@ -44,12 +44,7 @@
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Ping Time</string>
|
<string>Location</string>
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Address</string>
|
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -748,20 +748,25 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart )
|
||||||
if ( !strSelectedAddress.isEmpty() &&
|
if ( !strSelectedAddress.isEmpty() &&
|
||||||
!ConnectDlg.GetServerListItemWasChosen() )
|
!ConnectDlg.GetServerListItemWasChosen() )
|
||||||
{
|
{
|
||||||
CVector<QString> vstrTempList ( 0 );
|
CVector<QString> vstrTempList ( MAX_NUM_SERVER_ADDR_ITEMS, "" );
|
||||||
|
|
||||||
// store the new address in the current server storage list at
|
// store the new address in the current server storage list at
|
||||||
// the top, make sure we do not have more than allowed stored
|
// the top, make sure we do not have more than allowed stored
|
||||||
// servers
|
// servers
|
||||||
vstrTempList.Add ( strSelectedAddress );
|
vstrTempList[0] = strSelectedAddress;
|
||||||
for ( int iIdx = 0; ( iIdx < pClient->vstrIPAddress.Size() ) &&
|
int iTempListCnt = 1;
|
||||||
( iIdx < ( MAX_NUM_SERVER_ADDR_ITEMS - 1 ) ); iIdx++ )
|
|
||||||
|
for ( int iIdx = 0; iIdx < MAX_NUM_SERVER_ADDR_ITEMS; iIdx++ )
|
||||||
{
|
{
|
||||||
// only add old server address if it is not the same as the
|
// only add old server address if it is not the same as the
|
||||||
// selected one
|
// selected one
|
||||||
if ( pClient->vstrIPAddress[iIdx].compare ( strSelectedAddress ) )
|
if ( ( pClient->vstrIPAddress[iIdx].compare ( strSelectedAddress ) ) &&
|
||||||
|
( iTempListCnt < MAX_NUM_SERVER_ADDR_ITEMS ) )
|
||||||
{
|
{
|
||||||
vstrTempList.Add ( pClient->vstrIPAddress[iIdx] );
|
vstrTempList[iTempListCnt] =
|
||||||
|
pClient->vstrIPAddress[iIdx];
|
||||||
|
|
||||||
|
iTempListCnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -452,35 +452,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="TextLabelServerAddr" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Server Address</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="LineEditServerAddr" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="editable" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
|
@ -779,7 +750,6 @@
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>LineEditServerAddr</tabstop>
|
|
||||||
<tabstop>PushButtonConnect</tabstop>
|
<tabstop>PushButtonConnect</tabstop>
|
||||||
<tabstop>LineEditFaderTag</tabstop>
|
<tabstop>LineEditFaderTag</tabstop>
|
||||||
<tabstop>SliderAudInFader</tabstop>
|
<tabstop>SliderAudInFader</tabstop>
|
||||||
|
|
|
@ -49,6 +49,37 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent )
|
||||||
vecpListViewItems[i] = new CServerListViewItem ( ListViewClients );
|
vecpListViewItems[i] = new CServerListViewItem ( ListViewClients );
|
||||||
vecpListViewItems[i]->setHidden ( true );
|
vecpListViewItems[i]->setHidden ( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update server name line edit
|
||||||
|
LineEditServerName->setText ( pServer->GetServerName() );
|
||||||
|
|
||||||
|
// update server city line edit
|
||||||
|
LineEditLocationCity->setText ( pServer->GetServerCity() );
|
||||||
|
|
||||||
|
// load country combo box with all available countries
|
||||||
|
ComboBoxLocationCountry->setInsertPolicy ( QComboBox::NoInsert );
|
||||||
|
ComboBoxLocationCountry->clear();
|
||||||
|
|
||||||
|
for ( int iCurCntry = static_cast<int> ( QLocale::AnyCountry );
|
||||||
|
iCurCntry < static_cast<int> ( QLocale::LastCountry ); iCurCntry++ )
|
||||||
|
{
|
||||||
|
// add all countries except of the "Default" country
|
||||||
|
if ( static_cast<QLocale::Country> ( iCurCntry ) != QLocale::AnyCountry )
|
||||||
|
{
|
||||||
|
// store the country enum index together with the string (this is
|
||||||
|
// important since we sort the combo box items later on)
|
||||||
|
ComboBoxLocationCountry->addItem ( QLocale::countryToString (
|
||||||
|
static_cast<QLocale::Country> ( iCurCntry ) ), iCurCntry );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// sort country combo box items in alphabetical order
|
||||||
|
ComboBoxLocationCountry->model()->sort ( 0, Qt::AscendingOrder );
|
||||||
|
|
||||||
|
// select current country
|
||||||
|
ComboBoxLocationCountry->setCurrentIndex (
|
||||||
|
ComboBoxLocationCountry->findData (
|
||||||
|
static_cast<int> ( pServer->GetServerCountry() ) ) );
|
||||||
|
|
||||||
|
|
||||||
// Main menu bar -----------------------------------------------------------
|
// Main menu bar -----------------------------------------------------------
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>580</width>
|
<width>588</width>
|
||||||
<height>315</height>
|
<height>438</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
|
@ -19,21 +19,6 @@
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="ListViewClients" >
|
<widget class="QTreeWidget" name="ListViewClients" >
|
||||||
<property name="rootIsDecorated" >
|
<property name="rootIsDecorated" >
|
||||||
|
@ -66,6 +51,81 @@
|
||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="CheckBoxRegisterServer" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Register Server</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="LabelCentralServerAddress" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Central Server Address:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="CheckBoxDefaultCentralServer" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="LineEditCentralServerAddress" />
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Server Info</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="LabelServerName" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="LabelLocationCity" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Location: City</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="LabelLocationCountry" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Location: Country</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="LineEditServerName" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="LineEditLocationCity" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="ComboBoxLocationCountry" />
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
|
|
|
@ -62,7 +62,7 @@ CServerListManager::CServerListManager ( const QString& sNCentServAddr,
|
||||||
CHostAddress(),
|
CHostAddress(),
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
QLocale::AnyCountry,
|
QLocale::system().country(),
|
||||||
"",
|
"",
|
||||||
USED_NUM_CHANNELS,
|
USED_NUM_CHANNELS,
|
||||||
false );
|
false );
|
||||||
|
|
Loading…
Reference in a new issue