From 247a25c8ecaa8e6496ea1f35c0c7d4eb1154a0a9 Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 15 Aug 2012 16:25:15 +0200 Subject: the beginnings of a very, very unfinished pane editor --- lspaneeditor.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lspaneeditor.cpp (limited to 'lspaneeditor.cpp') diff --git a/lspaneeditor.cpp b/lspaneeditor.cpp new file mode 100644 index 0000000..eae5813 --- /dev/null +++ b/lspaneeditor.cpp @@ -0,0 +1,27 @@ +#include "lspaneeditor.h" + +LSPaneEditor::LSPaneEditor(QWidget *parent) : + QWidget(parent) { + + QGridLayout *layout = new QGridLayout(this); + + m_headingLabel = new QLabel(this); + + m_addChildButton = new QToolButton(this); + m_addChildButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + m_addChildButton->setPopupMode(QToolButton::InstantPopup); + m_addChildButton->setText("Add Child Pane"); + + m_addChildMenu = new QMenu(m_addChildButton); + m_addChildMenu->addSeparator(); + m_addChildButton->setMenu(m_addChildMenu); + + m_removeButton = new QToolButton(this); + m_removeButton->setToolButtonStyle(Qt::ToolButtonTextOnly); + m_removeButton->setText("Remove This Pane"); + + layout->addWidget(m_headingLabel, 0, 0, 1, 1); + layout->setColumnStretch(0, 1); + layout->addWidget(m_addChildButton, 0, 1, 1, 1); + layout->addWidget(m_removeButton, 0, 2, 1, 1); +} -- cgit v1.2.3