mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 19:09:41 +00:00
- TableSubviews and DialogueSubviews now provide size hints - Option to stop the growth of the window at the screen boundary for multi-monitor setup with different resolution. - Three options: Grow Only: No change to current, except the use of size hints Scrollbar Only: Simple addition of a scrollbar, the view window does not grow Grow then Scroll: Window grows as per current behaviour. The scrollbar appears once it cannot grow any further.
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
#include "subview.hpp"
|
|
|
|
#include "view.hpp"
|
|
|
|
CSVDoc::SubView::SubView (const CSMWorld::UniversalId& id)
|
|
: mUniversalId (id)
|
|
{
|
|
/// \todo add a button to the title bar that clones this sub view
|
|
|
|
setWindowTitle (QString::fromUtf8 (mUniversalId.toString().c_str()));
|
|
setAttribute(Qt::WA_DeleteOnClose);
|
|
}
|
|
|
|
CSMWorld::UniversalId CSVDoc::SubView::getUniversalId() const
|
|
{
|
|
return mUniversalId;
|
|
}
|
|
|
|
void CSVDoc::SubView::setStatusBar (bool show) {}
|
|
|
|
void CSVDoc::SubView::useHint (const std::string& hint) {}
|
|
|
|
void CSVDoc::SubView::updateUserSetting (const QString &, const QStringList &)
|
|
{}
|
|
|
|
void CSVDoc::SubView::setUniversalId (const CSMWorld::UniversalId& id)
|
|
{
|
|
mUniversalId = id;
|
|
setWindowTitle (QString::fromUtf8(mUniversalId.toString().c_str()));
|
|
}
|
|
|
|
void CSVDoc::SubView::closeEvent (QCloseEvent *event)
|
|
{
|
|
emit updateSubViewIndicies (this);
|
|
}
|
|
|
|
std::string CSVDoc::SubView::getTitle() const
|
|
{
|
|
return mUniversalId.toString();
|
|
}
|
|
|
|
void CSVDoc::SubView::closeRequest()
|
|
{
|
|
emit closeRequest (this);
|
|
}
|
|
|
|
CSVDoc::SizeHintWidget::SizeHintWidget(QWidget *parent) : QWidget(parent)
|
|
{}
|
|
|
|
CSVDoc::SizeHintWidget::~SizeHintWidget()
|
|
{}
|
|
|
|
QSize CSVDoc::SizeHintWidget::sizeHint() const
|
|
{
|
|
return mSize;
|
|
}
|
|
|
|
void CSVDoc::SizeHintWidget::setSizeHint(const QSize &size)
|
|
{
|
|
mSize = size;
|
|
}
|