refs #312 navigation bars, contributes also to #347

* allow to set/unset frameless mode in CDockWidget
* adjusted context menus
* adjusted style sheets
* ini settings for margins
* hidden info area to host floating widgets only visible when floating (allows to CDockInfoArea widgets)
* made some private slots non-virtual
This commit is contained in:
Klaus Basan
2015-04-08 22:46:54 +02:00
parent 425e034b19
commit e7c8c28252
23 changed files with 556 additions and 175 deletions

View File

@@ -0,0 +1,66 @@
/* Copyright (C) 2015
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "invisibleinfoareacomponent.h"
#include "ui_invisibleinfoareacomponent.h"
#include "blackmisc/icons.h"
using namespace BlackGui;
using namespace BlackMisc;
namespace BlackGui
{
namespace Components
{
CInvisibleInfoAreaComponent::CInvisibleInfoAreaComponent(QWidget *parent) :
CInfoArea(parent),
ui(new Ui::CInvisibleInfoAreaComponent)
{
ui->setupUi(this);
this->ui->comp_Navigator->allowStatusBar(false);
this->initInfoArea();
}
CInvisibleInfoAreaComponent::~CInvisibleInfoAreaComponent()
{ }
QSize CInvisibleInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const
{
InfoArea area = static_cast<InfoArea>(areaIndex);
switch (area)
{
case InfoAreaHorizontalNavigator:
return QSize(400, 50);
case InfoAreaVerticalNavigator:
return QSize(50, 400);
default:
return QSize(0, 0);
}
}
const QPixmap &CInvisibleInfoAreaComponent::indexToPixmap(int areaIndex) const
{
InfoArea area = static_cast<InfoArea>(areaIndex);
switch (area)
{
case InfoAreaHorizontalNavigator:
case InfoAreaVerticalNavigator:
default:
return CIcons::empty();
}
}
void CInvisibleInfoAreaComponent::toggleNavigator()
{
this->ui->comp_Navigator->toggleFloating();
}
} // ns
} // ns