Adds function to generate context menu with available contents.

Refactors some auto-keywords to its real class names.
Paints drop location based on cursors drop area indicator.
Waits a few pixel before moving tab from SectionWidget.
This commit is contained in:
mfreiholz
2016-02-02 13:49:10 +01:00
parent 1336118e09
commit 19b5f57610
9 changed files with 117 additions and 59 deletions
@@ -13,17 +13,21 @@ IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidge
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
auto titleIcon = new QLabel();
// Icon label
if (icon.isNull())
{
titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
// auto titleIcon = new QLabel();
// titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
// l->addWidget(titleIcon);
}
else
{
auto titleIcon = new QLabel();
titleIcon->setPixmap(icon.pixmap(16, 16));
l->addWidget(titleIcon);
}
l->addWidget(titleIcon);
// Title label
auto titleText = new QLabel(title);
auto titleFont = titleText->font();
titleFont.setBold(true);
@@ -57,6 +57,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
ui->mainToolBar->hide();
ui->statusBar->hide();
QObject::connect(ui->actionAddSectionContent, &QAction::triggered, this, &MainWindow::onActionAddSectionContentTriggered);
// CREATE SOME TESTING DOCKS