31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#include "ui/tkrFolderBrowser.h"
|
|
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QVBoxLayout>
|
|
|
|
namespace TikzRefinery {
|
|
namespace {
|
|
constexpr int iPageMargin = 10;
|
|
constexpr int iPageSpacing = 10;
|
|
constexpr int iStretchWeight = 1;
|
|
}
|
|
|
|
tkrFolderBrowser::tkrFolderBrowser(QWidget *pParent) : QWidget(pParent)
|
|
{
|
|
setObjectName(QStringLiteral("folderBrowser"));
|
|
QVBoxLayout *pLayout = new QVBoxLayout(this);
|
|
pLayout->setContentsMargins(iPageMargin, iPageMargin, iPageMargin, iPageMargin);
|
|
pLayout->setSpacing(iPageSpacing);
|
|
QLabel *pPlaceholder = new QLabel(tr("Working-folder browsing is in development. You can open an existing TikZ document here."), this);
|
|
pPlaceholder->setWordWrap(true);
|
|
pLayout->addWidget(pPlaceholder);
|
|
QPushButton *pOpenButton = new QPushButton(tr("Open document..."), this);
|
|
pOpenButton->setObjectName(QStringLiteral("sidebarOpenDocumentButton"));
|
|
connect(pOpenButton, &QPushButton::clicked, this, &tkrFolderBrowser::openDocumentRequested);
|
|
pLayout->addWidget(pOpenButton);
|
|
pLayout->addStretch(iStretchWeight);
|
|
}
|
|
|
|
} // namespace TikzRefinery
|