2 Star 0 Fork 5

fctx8688/sqliteStudio

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
mdichild.cpp 1.30 KB
Copy Edit Raw Blame History
shengzhe8688 authored 2020-01-18 12:15 +08:00 . 首次上传
#include "mdichild.h"
#include "mdiwindow.h"
#include "iconmanager.h"
#include "mainwindow.h"
#include <QDebug>
MdiChild::MdiChild(QWidget* parent) :
QWidget(parent)
{
}
MdiChild::~MdiChild()
{
}
QVariant MdiChild::getSessionValue()
{
QVariant value = saveSession();
QHash<QString, QVariant> hash = value.toHash();
hash["class"] = QString(metaObject()->className());
return hash;
}
bool MdiChild::applySessionValue(const QVariant& sessionValue)
{
bool result = restoreSession(sessionValue);
return result;
}
MdiWindow* MdiChild::getMdiWindow() const
{
return mdiWindow;
}
void MdiChild::setMdiWindow(MdiWindow* value)
{
mdiWindow = value;
if (mdiWindow)
{
mdiWindow->setWindowTitle(getTitleForMdiWindow());
mdiWindow->setWindowIcon(*getIconNameForMdiWindow());
}
}
bool MdiChild::isInvalid() const
{
return invalid;
}
bool MdiChild::restoreSessionNextTime()
{
return true;
}
void MdiChild::updateWindowTitle()
{
if (mdiWindow)
{
QString newTitle = getTitleForMdiWindow();
if (mdiWindow->windowTitle() != newTitle)
mdiWindow->rename(newTitle);
}
}
bool MdiChild::handleInitialFocus()
{
return false;
}
Db* MdiChild::getAssociatedDb() const
{
return nullptr;
}
void MdiChild::dbClosedFinalCleanup()
{
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/fctx8688/sqliteStudio.git
git@gitee.com:fctx8688/sqliteStudio.git
fctx8688
sqliteStudio
sqliteStudio
master

Search