void ZeMessengerWindow::ShowNormal()
{
if (isWindowMaximized() == true)
{
mWindowMaximized = false;
//showNormal();
move(mOldGeometry.x(), mOldGeometry.y());
resize(mOldGeometry.width(), mOldGeometry.height());
mMaximizeButton->setText(tr("+"));
// Size grips
mSizeGrip1->show();
mSizeGrip2->show();
mSizeGrip3->show();
mSizeGrip4->show();
// Restoring old geometry
mOldGeometry
= QRect(-1,
-1,
-1,
-1);
}
}
void ZeMessengerWindow::ShowMaximized()
{
if (isWindowMaximized() == false)
{
//showMaximized();
mWindowMaximized = true;
mOldGeometry
= QRect(x
(), y
(), width
(), height
());
setGeometry
(QRect(0,
0, rect.
width(), rect.
height()));
mMaximizeButton->setText(tr("-"));
// Size grips
mSizeGrip1->hide();
mSizeGrip2->hide();
mSizeGrip3->hide();
mSizeGrip4->hide();
}
}
void ZeMessengerWindow::ShowNormal()
{
if (isWindowMaximized() == true)
{
mWindowMaximized = false;
//showNormal();
move(mOldGeometry.x(), mOldGeometry.y());
resize(mOldGeometry.width(), mOldGeometry.height());
mMaximizeButton->setText(tr("+"));
// Size grips
mSizeGrip1->show();
mSizeGrip2->show();
mSizeGrip3->show();
mSizeGrip4->show();
// Restoring old geometry
mOldGeometry = QRect(-1, -1, -1, -1);
}
}
void ZeMessengerWindow::ShowMaximized()
{
if (isWindowMaximized() == false)
{
//showMaximized();
mWindowMaximized = true;
mOldGeometry = QRect(x(), y(), width(), height());
const QRect rect = QApplication::desktop()->availableGeometry();
setGeometry(QRect(0, 0, rect.width(), rect.height()));
mMaximizeButton->setText(tr("-"));
// Size grips
mSizeGrip1->hide();
mSizeGrip2->hide();
mSizeGrip3->hide();
mSizeGrip4->hide();
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks