mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
uncrustified
This commit is contained in:
parent
306960fd2e
commit
859f601279
@ -45,7 +45,7 @@ SplitterOrView::SplitterOrView(Core::UAVGadgetManager *uavGadgetManager, Core::I
|
||||
m_uavGadgetManager(uavGadgetManager),
|
||||
m_splitter(0)
|
||||
{
|
||||
m_view = new UAVGadgetView(m_uavGadgetManager, uavGadget, this);
|
||||
m_view = new UAVGadgetView(m_uavGadgetManager, uavGadget, this);
|
||||
setLayout(new QStackedLayout());
|
||||
layout()->addWidget(m_view);
|
||||
}
|
||||
@ -60,15 +60,13 @@ SplitterOrView::SplitterOrView(SplitterOrView &splitterOrView, QWidget *parent)
|
||||
setLayout(new QStackedLayout());
|
||||
if (m_view) {
|
||||
layout()->addWidget(m_view);
|
||||
}
|
||||
else if (m_splitter) {
|
||||
} else if (m_splitter) {
|
||||
layout()->addWidget(m_splitter);
|
||||
}
|
||||
}
|
||||
|
||||
SplitterOrView::~SplitterOrView()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void SplitterOrView::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
@ -292,7 +290,7 @@ void SplitterOrView::split(Qt::Orientation orientation)
|
||||
splitter->addWidget(new SplitterOrView(*this, splitter));
|
||||
splitter->addWidget(new SplitterOrView(m_uavGadgetManager));
|
||||
|
||||
m_view = 0;
|
||||
m_view = 0;
|
||||
m_splitter = splitter;
|
||||
|
||||
connect(m_splitter, SIGNAL(splitterMoved(int, int)), this, SLOT(onSplitterMoved(int, int)));
|
||||
@ -320,8 +318,7 @@ void SplitterOrView::unsplit(IUAVGadget *gadget)
|
||||
if (splitterOrView) {
|
||||
if (splitterOrView->isView()) {
|
||||
layout()->addWidget(splitterOrView->m_view);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
layout()->addWidget(splitterOrView->m_splitter);
|
||||
}
|
||||
layout()->removeWidget(m_splitter);
|
||||
@ -330,7 +327,7 @@ void SplitterOrView::unsplit(IUAVGadget *gadget)
|
||||
delete view;
|
||||
delete m_splitter;
|
||||
|
||||
m_view = splitterOrView->m_view;
|
||||
m_view = splitterOrView->m_view;
|
||||
m_splitter = splitterOrView->m_splitter;
|
||||
}
|
||||
}
|
||||
@ -367,7 +364,7 @@ void SplitterOrView::unsplitAll_helper(UAVGadgetManager *uavGadgetManager, QSpli
|
||||
uavGadgetManager->emptyView(splitterOrView->m_view);
|
||||
}
|
||||
if (splitterOrView->m_splitter) {
|
||||
unsplitAll_helper(uavGadgetManager,splitterOrView->m_splitter);
|
||||
unsplitAll_helper(uavGadgetManager, splitterOrView->m_splitter);
|
||||
}
|
||||
delete splitterOrView;
|
||||
}
|
||||
|
@ -209,10 +209,10 @@ void UAVGadgetManager::emptyView(Core::Internal::UAVGadgetView *view)
|
||||
}
|
||||
|
||||
IUAVGadget *uavGadget = view->gadget();
|
||||
//emit uavGadgetAboutToClose(uavGadget);
|
||||
// emit uavGadgetAboutToClose(uavGadget);
|
||||
removeGadget(uavGadget);
|
||||
view->removeGadget();
|
||||
//emit uavGadgetsClosed(uavGadgets);
|
||||
// emit uavGadgetsClosed(uavGadgets);
|
||||
}
|
||||
|
||||
|
||||
@ -225,7 +225,7 @@ void UAVGadgetManager::closeView(Core::Internal::UAVGadgetView *view)
|
||||
IUAVGadget *gadget = view->gadget();
|
||||
|
||||
// find SplitterOrView splitter that contains the view to delete
|
||||
SplitterOrView *splitter = m_splitterOrView->findSplitter(gadget);
|
||||
SplitterOrView *splitter = m_splitterOrView->findSplitter(gadget);
|
||||
if (!splitter) {
|
||||
return;
|
||||
}
|
||||
@ -236,7 +236,7 @@ void UAVGadgetManager::closeView(Core::Internal::UAVGadgetView *view)
|
||||
UAVGadgetInstanceManager *im = ICore::instance()->uavGadgetInstanceManager();
|
||||
im->removeGadget(gadget);
|
||||
|
||||
SplitterOrView *newCurrent = splitter->findFirstView();
|
||||
SplitterOrView *newCurrent = splitter->findFirstView();
|
||||
Q_ASSERT(newCurrent);
|
||||
if (newCurrent) {
|
||||
setCurrentGadget(newCurrent->gadget());
|
||||
@ -249,7 +249,7 @@ void UAVGadgetManager::addGadgetToContext(IUAVGadget *gadget)
|
||||
return;
|
||||
}
|
||||
m_core->addContextObject(gadget);
|
||||
//emit uavGadgetOpened(uavGadget);
|
||||
// emit uavGadgetOpened(uavGadget);
|
||||
}
|
||||
|
||||
void UAVGadgetManager::removeGadget(IUAVGadget *gadget)
|
||||
|
Loading…
x
Reference in New Issue
Block a user