Commit 546826c8 authored by vlad_burin's avatar vlad_burin
Browse files

Default tab in UComponentsListWidget now is Parameters

Default tab in UClassesListWidget now is ByLibs
Profiling & Channels widget hide by defualt on startup
Channels widget visibility updated after adding/deleting channel

--HG--
branch : MockCompsTest
parent 9e38c1489f56
......@@ -55,6 +55,7 @@ void UCalculationChannelsWidget::AUpdateInterface()
item->setData(Qt::UserRole, i);
if(i == currentChannel) ui->listWidgetChannels->setCurrentItem(item);
}
emit updateVisibility();
}
void UCalculationChannelsWidget::channelSelectionChanged()
......
......@@ -32,6 +32,8 @@ public slots:
signals:
void updateModel();
void updateVisibility();
private:
Ui::UCalculationChannelsWidget *ui;
......
......@@ -38,7 +38,7 @@
<bool>true</bool>
</property>
<property name="currentIndex">
<number>2</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabStorageByName">
<attribute name="title">
......
......@@ -94,7 +94,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabParameters">
<attribute name="title">
......
......@@ -108,6 +108,8 @@ UGEngineControllWidget::UGEngineControllWidget(QWidget *parent, RDK::UApplicatio
rect.setWidth(50);
channels->setGeometry(rect);
ui->dockWidgetChannels->setWidget(channels);
ui->dockWidgetChannels->hide();
connect(channels, SIGNAL(updateVisibility()), this, SLOT(updateChannelsVisibility()));
logger = new ULoggerWidget(this, application);
ui->dockWidgetLoger->setWidget(logger);
......@@ -122,9 +124,11 @@ UGEngineControllWidget::UGEngineControllWidget(QWidget *parent, RDK::UApplicatio
watchFormWidget->setWindowTitle("Watches");
watchFormWidget->hide();
// hide profiling widget by default
profilingWindowWidget = new UTableInfo(this, application);
ui->dockWidgetProfiling->setWidget(profilingWindowWidget);
profilingWindowWidget->setWindowTitle("Profiling");
ui->dockWidgetProfiling->hide();
createConfigurationWizardWidget=new UCreateConfigurationWizardWidget(this, application);
......@@ -449,6 +453,7 @@ void UGEngineControllWidget::actionAddNew()
pauseChannel(-1);
application->SetNumChannels(application->GetNumChannels()+1);
RDK::UIVisualControllerStorage::UpdateInterface(true);
updateChannelsVisibility();
}
void UGEngineControllWidget::actionInsert()
......@@ -461,6 +466,7 @@ void UGEngineControllWidget::actionInsert()
//application->AddChannel(ChannelsStringGrid->Row);
//RDK::UIVisualControllerStorage::UpdateInterface(true);
RDK::UIVisualControllerStorage::UpdateInterface(true);
updateChannelsVisibility();
}
void UGEngineControllWidget::actionDeleteLast()
......@@ -472,7 +478,7 @@ void UGEngineControllWidget::actionDeleteLast()
pauseChannel(-1);
application->DeleteChannel(application->GetNumChannels()-1);
RDK::UIVisualControllerStorage::UpdateInterface(true);
updateChannelsVisibility();
}
void UGEngineControllWidget::actionDeleteAll()
......@@ -482,6 +488,7 @@ void UGEngineControllWidget::actionDeleteAll()
pauseChannel(-1);
application->SetNumChannels(1);
//RDK::UIVisualControllerStorage::UpdateInterface(true);
updateChannelsVisibility();
}
void UGEngineControllWidget::actionClone()
......@@ -490,7 +497,7 @@ void UGEngineControllWidget::actionClone()
int cloned_id=application->GetNumChannels();
application->CloneChannel(Core_GetSelectedChannelIndex(), cloned_id);
RDK::UIVisualControllerStorage::UpdateInterface(true);
updateChannelsVisibility();
}
// calculate menu actions
......@@ -868,3 +875,22 @@ void UGEngineControllWidget::closeEvent(QCloseEvent *event)
// event->ignore();
// }
}
void UGEngineControllWidget::updateChannelsVisibility()
{
if(application->GetNumChannels()>1)
{
if(!ui->dockWidgetChannels->isVisible())
{
ui->dockWidgetChannels->show();
}
}
if(application->GetNumChannels()==1)
{
if(ui->dockWidgetChannels->isVisible())
{
ui->dockWidgetChannels->hide();
}
}
}
......@@ -153,6 +153,8 @@ private slots:
void closeEvent(QCloseEvent *event);
void updateChannelsVisibility();
private:
// data
Ui::UGEngineControllWidget *ui;
......
......@@ -398,7 +398,7 @@
</action>
<action name="actionAddNew">
<property name="checkable">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="enabled">
<bool>true</bool>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment