本文整理汇总了C++中QWidget::isMinimized方法的典型用法代码示例。如果您正苦于以下问题:C++ QWidget::isMinimized方法的具体用法?C++ QWidget::isMinimized怎么用?C++ QWidget::isMinimized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWidget
的用法示例。
在下文中一共展示了QWidget::isMinimized方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: titleBar
/*! \reimp */
QString Q3AccessibleTitleBar::text(Text t, int child) const
{
QString str = QAccessibleWidget::text(t, child);
if (str.size())
return str;
QWidget *window = titleBar()->window();
switch (t) {
case Name:
switch (child) {
case 1:
return Q3TitleBar::tr("System");
case 3:
if (window && window->isMinimized())
return Q3TitleBar::tr("Restore up");
return Q3TitleBar::tr("Minimize");
case 4:
if (window && window->isMaximized())
return Q3TitleBar::tr("Restore down");
return Q3TitleBar::tr("Maximize");
case 5:
return Q3TitleBar::tr("Close");
default:
break;
}
break;
case Value:
if (!child || child == 2)
return window ? window->windowTitle() : QString();
break;
/*
case DefaultAction:
if (child > 2)
return Q3TitleBar::tr("Press");
break;
*/
case Description:
switch (child) {
case 1:
return Q3TitleBar::tr("Contains commands to manipulate the window");
case 3:
if (window && window->isMinimized())
return Q3TitleBar::tr("Puts a minimized window back to normal");
return Q3TitleBar::tr("Moves the window out of the way");
case 4:
if (window && window->isMaximized())
return Q3TitleBar::tr("Puts a maximized window back to normal");
return Q3TitleBar::tr("Makes the window full screen");
case 5:
return Q3TitleBar::tr("Closes the window");
default:
return Q3TitleBar::tr("Displays the name of the window and contains controls to manipulate it");
}
default:
break;
}
return str;
}
示例2: showWindow
void WindowMenu::showWindow()
{
QAction* pAction = qobject_cast<QAction*>(sender());
if (!pAction)
return;
QWidget* pWidget = pAction->data().value<QWidget*>();
if (!pWidget)
return;
if (pWidget->isMinimized())
pWidget->setWindowState(pWidget->windowState() & ~Qt::WindowMinimized);
pWidget->activateWindow();
}
示例3: onShutdownStarted
void MainWindowPlugin::onShutdownStarted()
{
if (!Options::isNull())
{
QWidget *widget = FMainWindowBorder ? (QWidget*)FMainWindowBorder : (QWidget*)FMainWindow;
#ifdef Q_WS_WIN
if ((QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS7) && !Options::node(OPV_MAINWINDOW_MINIMIZETOTRAY_W7).value().toBool())
Options::node(OPV_MAINWINDOW_SHOW).setValue(!widget->isMinimized());
else
#endif
Options::node(OPV_MAINWINDOW_SHOW).setValue(widget->isVisible());
}
}
示例4: WasTabActivated
bool TaskbarPreviews::WasTabActivated(HWND hwnd)
{
QWidget *internal = m_tabs.internal(hwnd);
if (internal) {
QWidget *owner = m_tabs.owner(hwnd);
SetTabActive((HWND)internal->winId(), (HWND)owner->winId());
if (owner->isMinimized())
owner->showNormal();
qApp->setActiveWindow(owner);
emit tabActivated(m_tabs.user(hwnd));
return true;
} else
return false;
}
示例5: isActiveChatWindow
bool TabWidget::isActiveChatWindow()
{
QWidget *widget = m_self->parentWidget();
if (widget->isMinimized() || widget->isHidden())
return false;
# if defined(Q_OS_WIN32)
if (widget->isActiveWindow()) {
HWND active = GetForegroundWindow();
if (active == (HWND) widget->window()->internalWinId() || ::IsChild(active, (HWND) widget->window()->internalWinId()))
return true;
else
return false;
}
else
return false;
# else
return widget->isActiveWindow();
# endif
}
示例6: maybeTip
void maybeTip( const QPoint &pos )
{
if ( !::qt_cast<QTitleBar*>(parentWidget()) )
return;
QTitleBar *t = (QTitleBar *)parentWidget();
QString tipstring;
QStyle::SubControl ctrl = t->style().querySubControl(QStyle::CC_TitleBar, t, pos);
QSize controlSize = t->style().querySubControlMetrics(QStyle::CC_TitleBar, t, ctrl).size();
QWidget *window = t->window();
if ( window ) {
switch(ctrl) {
case QStyle::SC_TitleBarSysMenu:
if ( t->testWFlags( WStyle_SysMenu ) )
tipstring = QTitleBar::tr( "System Menu" );
break;
case QStyle::SC_TitleBarShadeButton:
if ( t->testWFlags( WStyle_Tool ) && t->testWFlags( WStyle_MinMax ) )
tipstring = QTitleBar::tr( "Shade" );
break;
case QStyle::SC_TitleBarUnshadeButton:
if ( t->testWFlags( WStyle_Tool ) && t->testWFlags( WStyle_MinMax ) )
tipstring = QTitleBar::tr( "Unshade" );
break;
case QStyle::SC_TitleBarNormalButton:
case QStyle::SC_TitleBarMinButton:
if ( !t->testWFlags( WStyle_Tool ) && t->testWFlags( WStyle_Minimize ) ) {
if( window->isMinimized() )
tipstring = QTitleBar::tr( "Normalize" );
else
tipstring = QTitleBar::tr( "Minimize" );
}
break;
case QStyle::SC_TitleBarMaxButton:
if ( !t->testWFlags( WStyle_Tool ) && t->testWFlags( WStyle_Maximize ) )
tipstring = QTitleBar::tr( "Maximize" );
break;
case QStyle::SC_TitleBarCloseButton:
if ( t->testWFlags( WStyle_SysMenu ) )
tipstring = QTitleBar::tr( "Close" );
break;
default:
break;
}
}
#ifndef QT_NO_WIDGET_TOPEXTRA
if ( tipstring.isEmpty() ) {
if ( t->visibleText() != t->caption() )
tipstring = t->caption();
}
#endif
if(!tipstring.isEmpty())
tip( QRect(pos, controlSize), tipstring );
}