当前位置: 首页>>代码示例>>C++>>正文


C++ showMinimized函数代码示例

本文整理汇总了C++中showMinimized函数的典型用法代码示例。如果您正苦于以下问题:C++ showMinimized函数的具体用法?C++ showMinimized怎么用?C++ showMinimized使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了showMinimized函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: switch

void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
{
    switch (reason)
    {
        case QSystemTrayIcon::Trigger:
        {
            if (isHidden())
            {
                show();
                activateWindow();
                if (wasMaximized)
                    showMaximized();
                else
                    showNormal();
            }
            else if (isMinimized())
            {
                forceShow();
                activateWindow();
                if (wasMaximized)
                    showMaximized();
                else
                    showNormal();
            }
            else
            {
                wasMaximized = isMaximized();
                if (Settings::getInstance().getMinimizeToTray())
                    hide();
                else
                    showMinimized();
            }

            break;
        }
        case QSystemTrayIcon::MiddleClick:
            wasMaximized = isMaximized();
            if (Settings::getInstance().getMinimizeToTray())
                hide();
            else
                showMinimized();
            break;
        case QSystemTrayIcon::Unknown:
            if (isHidden())
                forceShow();
            break;
        default:
            break;
    }
}
开发者ID:AWeinb,项目名称:qTox,代码行数:50,代码来源:widget.cpp

示例2: QSpacerItem

void FileBrowserDialog::createTitleBar()
{
    header_ = new QWidget;
    header_->setObjectName("mHeader");
    QHBoxLayout *layout = new QHBoxLayout;
    layout->setContentsMargins(1, 1, 1, 1);
    layout->setSpacing(0);
    header_->setLayout(layout);

    QSpacerItem *spacer1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
    layout->addSpacerItem(spacer1);

    brand_label_ = new QLabel(windowTitle());
    brand_label_->setObjectName("mBrand");
    layout->addWidget(brand_label_);

    QSpacerItem *spacer2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
    layout->addSpacerItem(spacer2);

    minimize_button_ = new QPushButton;
    minimize_button_->setObjectName("mMinimizeBtn");
    minimize_button_->setToolTip(tr("Minimize"));
    minimize_button_->setIcon(awesome->icon(icon_minus, QColor("#808081")));
    layout->addWidget(minimize_button_);
    connect(minimize_button_, SIGNAL(clicked()), this, SLOT(showMinimized()));

    close_button_ = new QPushButton;
    close_button_->setObjectName("mCloseBtn");
    close_button_->setToolTip(tr("Close"));
    close_button_->setIcon(awesome->icon(icon_remove, QColor("#808081")));
    layout->addWidget(close_button_);
    connect(close_button_, SIGNAL(clicked()), this, SLOT(close()));

    header_->installEventFilter(this);
}
开发者ID:dongsupark,项目名称:seafile-client,代码行数:35,代码来源:file-browser-dialog.cpp

示例3: showNormal

void ControllerWindow::doMinimize()
{
    if (isMinimized())
        showNormal();
    else
        showMinimized();
}
开发者ID:carriercomm,项目名称:egoboo,代码行数:7,代码来源:controllerwindow.cpp

示例4: QWidget

PreviewWindow::PreviewWindow(QWidget *parent)
    : QWidget(parent)
{
    textEdit = new QTextEdit;
    textEdit->setReadOnly(true);
    textEdit->setLineWrapMode(QTextEdit::NoWrap);

    closeButton = new QPushButton(tr("&Close"));
    connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

    showNormalButton = new QPushButton(tr("Show normal"));
    connect(showNormalButton, SIGNAL(clicked()), this, SLOT(showNormal()));
    showMinimizedButton = new QPushButton(tr("Show minimized"));
    connect(showMinimizedButton, SIGNAL(clicked()), this, SLOT(showMinimized()));
    showMaximizedButton = new QPushButton(tr("Show maximized"));
    connect(showMaximizedButton, SIGNAL(clicked()), this, SLOT(showMaximized()));
    showFullScreenButton = new QPushButton(tr("Show fullscreen"));
    connect(showFullScreenButton, SIGNAL(clicked()), this, SLOT(showFullScreen()));

    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(textEdit);
    layout->addWidget(showNormalButton);
    layout->addWidget(showMinimizedButton);
    layout->addWidget(showMaximizedButton);
    layout->addWidget(showFullScreenButton);
    layout->addWidget(closeButton);
    setLayout(layout);

    setWindowTitle(tr("Preview <QWidget>"));
}
开发者ID:CodeDJ,项目名称:qt5-hidpi,代码行数:30,代码来源:previewwindow.cpp

示例5: move

void CMainWindow::RestorePosition()
{
   l2max::CVariant windowX;
   l2max::CVariant windowY;
   l2max::CVariant windowWidth;
   l2max::CVariant windowHeight;
   l2max::CVariant isMaximized;
   l2max::CVariant isMinimized;

   CAppContext::GetInstance()->MainRegistry().Read( V_MAINWND_X, windowX );
   CAppContext::GetInstance()->MainRegistry().Read( V_MAINWND_Y, windowY );
   CAppContext::GetInstance()->MainRegistry().Read( V_MAINWND_WIDTH, windowWidth );
   CAppContext::GetInstance()->MainRegistry().Read( V_MAINWND_HEIGHT, windowHeight );
   CAppContext::GetInstance()->MainRegistry().Read( V_MAINWND_ISMAXI, isMaximized );
   CAppContext::GetInstance()->MainRegistry().Read( V_MAINWND_ISMINI, isMinimized );

   if( windowX.toInt() != -1 && windowY.toInt() != -1 )
   {
      move( windowX.toInt(), windowY.toInt() );
   }

   if( windowWidth.toInt() != -1 && windowHeight.toInt() != -1 )
   {
      resize( windowWidth.toInt(), windowHeight.toInt() );
   }

   if( isMaximized.toInt() )
   {
      showMaximized();
   }
   else if( isMinimized.toInt() )
   {
      showMinimized();
   }
}
开发者ID:L2-Max,项目名称:l2ChipTuner,代码行数:35,代码来源:MainWindow.cpp

示例6: machine

void UIMachineWindowSeamless::prepareMiniToolbar()
{
    /* Get machine: */
    CMachine m = machine();

    /* Make sure mini-toolbar is necessary: */
    bool fIsActive = m.GetExtraData(GUI_ShowMiniToolBar) != "no";
    if (!fIsActive)
        return;

    /* Get the mini-toolbar alignment: */
    bool fIsAtTop = m.GetExtraData(GUI_MiniToolBarAlignment) == "top";
    /* Get the mini-toolbar auto-hide feature availability: */
    bool fIsAutoHide = m.GetExtraData(GUI_MiniToolBarAutoHide) != "off";
    /* Create mini-toolbar: */
    m_pMiniToolBar = new UIRuntimeMiniToolBar(this,
                                              fIsAtTop ? Qt::AlignTop : Qt::AlignBottom,
                                              IntegrationMode_External,
                                              fIsAutoHide);
    m_pMiniToolBar->show();
    QList<QMenu*> menus;
    QList<QAction*> actions = uisession()->newMenu()->actions();
    for (int i=0; i < actions.size(); ++i)
        menus << actions.at(i)->menu();
    m_pMiniToolBar->addMenus(menus);
    connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()));
    connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
            gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SLOT(trigger()));
    connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
            gActionPool->action(UIActionIndexRuntime_Simple_Close), SLOT(trigger()));
}
开发者ID:mutoso-mirrors,项目名称:vbox,代码行数:31,代码来源:UIMachineWindowSeamless.cpp

示例7: QMainWindow

ICMainWindow::ICMainWindow(ICServer *theServer, QWidget *parent) :
    QMainWindow(parent), server(theServer), questionDialog(new ICNewQuestionDialog(this)),
    onCanvas(false)
{
    setupUi(this);

    setWindowIcon(QIcon(":/images/icimage.png"));

    //this->setAttribute(Qt::WA_TranslucentBackground, true);
    setWindowFlags(Qt::FramelessWindowHint);
    //questionDialog->setWindowOpacity(0.8);
    questionDialog->setWindowFlags(questionDialog->windowFlags() | Qt::FramelessWindowHint);

    connect(exitButton, SIGNAL(clicked()), this, SLOT(close()));
    connect(minimizeButton, SIGNAL(clicked()), this, SLOT(showMinimized()));

    connect(understandButton, SIGNAL(clicked()), this, SLOT(understand()));
    connect(questionButton, SIGNAL(clicked()), this, SLOT(question()));
    connect(stopButton, SIGNAL(clicked()), this, SLOT(stop()));

    connect(server, SIGNAL(newAnswerArrived(QString)), this, SLOT(newAnswerArrived(QString)));
    connect(server, SIGNAL(connectionClosed()), this, SLOT(connectionClosed()));

    connect(questionDialog, SIGNAL(newQuestion(int,int)), this, SLOT(newQuestionReady(int,int)));

    sidLabel->setText(server->getIdentifier());
    countLabel->setText("0/0");
}
开发者ID:hzzlzz,项目名称:InteractiveCourse,代码行数:28,代码来源:icmainwindow.cpp

示例8: session

void UIMachineWindowFullscreen::prepareMiniToolBar()
{
    /* Get current machine: */
    CMachine machine = session().GetConsole().GetMachine();
    /* Check if mini tool-bar should present: */
    bool fIsActive = machine.GetExtraData(VBoxDefs::GUI_ShowMiniToolBar) != "no";
    if (fIsActive)
    {
        /* Get the mini tool-bar alignment: */
        bool fIsAtTop = machine.GetExtraData(VBoxDefs::GUI_MiniToolBarAlignment) == "top";
        /* Get the mini tool-bar auto-hide feature availability: */
        bool fIsAutoHide = machine.GetExtraData(VBoxDefs::GUI_MiniToolBarAutoHide) != "off";
        m_pMiniToolBar = new VBoxMiniToolBar(centralWidget(),
                                             fIsAtTop ? VBoxMiniToolBar::AlignTop : VBoxMiniToolBar::AlignBottom,
                                             true, fIsAutoHide);
        m_pMiniToolBar->updateDisplay(true, true);
        QList<QMenu*> menus;
        QList<QAction*> actions = uisession()->newMenu()->actions();
        for (int i=0; i < actions.size(); ++i)
            menus << actions.at(i)->menu();
        *m_pMiniToolBar << menus;
        connect(m_pMiniToolBar, SIGNAL(minimizeAction()), this, SLOT(showMinimized()));
        connect(m_pMiniToolBar, SIGNAL(exitAction()),
                gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(closeAction()),
                gActionPool->action(UIActionIndexRuntime_Simple_Close), SLOT(trigger()));
    }
}
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:28,代码来源:UIMachineWindowFullscreen.cpp

示例9: mdiParent

void KviWindow::minimize()
{
    if(mdiParent())
        mdiParent()->minimize();
    else
        showMinimized();
}
开发者ID:wodim,项目名称:kronos,代码行数:7,代码来源:KviWindow.cpp

示例10: showMinimized

void CameraWidget::closeEvent(QCloseEvent* event) {

    //--- We will not allow user to close camera windows
    event->ignore();
    //--- We will minimize it
    showMinimized();
}
开发者ID:losas,项目名称:OpenMoCap,代码行数:7,代码来源:CameraWidget.cpp

示例11: qDebug

void
MainWindow::closeEvent(QCloseEvent *event)
{
    qDebug() << "Close event";
    if (isVisible())
    {
#ifdef Q_OS_MAC
        showMinimized();
#else
        // Save the window geometry and position
        QSettings settings("Entomologist");
        settings.setValue("window-geometry", saveGeometry());
        settings.setValue("entomologist-state", saveState());
        if (!settings.value("minimize-warning", false).toBool())
        {
            QMessageBox box;
            box.setText("Entomologist will be minimized to your system tray.");
            box.exec();
            settings.setValue("minimize-warning", true);
        }

        hide();
#endif
        event->ignore();
    }
    else
    {
        qDebug() << "Accepting close event";
        event->accept();
    }
}
开发者ID:Entomologist,项目名称:entomologist,代码行数:31,代码来源:MainWindow.cpp

示例12: Q_ASSERT

QMenu* AbstractPart::createContextMenu() const
{
	QMenu * menu = AbstractAspect::createContextMenu();
	Q_ASSERT(menu);
	const QStyle *widget_style = d_mdi_window->style();
   	
	QAction *action_temp;
	if(d_mdi_window->windowState() & (Qt::WindowMinimized | Qt::WindowMaximized))
	{
		action_temp = menu->addAction(tr("&Restore"), d_mdi_window, SLOT(showNormal()));
		action_temp->setIcon(widget_style->standardIcon(QStyle::SP_TitleBarNormalButton));
	}
	if(!(d_mdi_window->windowState() & Qt::WindowMinimized))
	{
		action_temp = menu->addAction(tr("Mi&nimize"), d_mdi_window, SLOT(showMinimized()));
		action_temp->setIcon(widget_style->standardIcon(QStyle::SP_TitleBarMinButton));
	}
	if(!(d_mdi_window->windowState() & Qt::WindowMaximized))
	{
		action_temp = menu->addAction(tr("Ma&ximize"), d_mdi_window, SLOT(showMaximized()));
		action_temp->setIcon(widget_style->standardIcon(QStyle::SP_TitleBarMaxButton));
	}

	return menu;
}
开发者ID:narunlifescience,项目名称:scidavis,代码行数:25,代码来源:AbstractPart.cpp

示例13: showMinimized

void NormalWindow::showMinimizedTabPage()
{
	if (isWindow() && !isVisible())
		showMinimized();
	else
		emit tabPageShowMinimized();
}
开发者ID:ChALkeR,项目名称:vacuum-im,代码行数:7,代码来源:normalwindow.cpp

示例14: size

void MainWin::restoreStateFromSettings(UiSettings &s) {
  _normalSize = s.value("MainWinSize", size()).toSize();
  _normalPos = s.value("MainWinPos", pos()).toPoint();
  bool maximized = s.value("MainWinMaximized", false).toBool();

#ifndef HAVE_KDE
  restoreGeometry(s.value("MainWinGeometry").toByteArray());

  if(maximized) {
    // restoreGeometry() fails if the windows was maximized, so we resize and position explicitly
    resize(_normalSize);
    move(_normalPos);
  }

  restoreState(s.value("MainWinState").toByteArray());

#else
  move(_normalPos);
#endif

  if(s.value("MainWinHidden").toBool() && QtUi::haveSystemTray())
    QtUi::hideMainWidget();
  else if(s.value("MainWinMinimized").toBool())
    showMinimized();
  else if(maximized)
    showMaximized();
  else
    show();
}
开发者ID:bawNg,项目名称:quassel,代码行数:29,代码来源:mainwin.cpp

示例15: parentWidget

void toToolWidget::importData(std::map<QString, QString> &data, const QString &prefix)
{
    QWidget *par = parentWidget();
    if (!par)
        par = this;
    if (data[prefix + ":State"] == QString::fromLatin1("Maximized"))
    {
        par->showMaximized();
        showMaximized();
    }
    else if (data[prefix + ":State"] == QString::fromLatin1("Minimized"))
    {
        par->showMinimized();
        showMinimized();
    }
    else
    {
        par->showNormal();
        par->setGeometry(data[prefix + ":X"].toInt(),
                         data[prefix + ":Y"].toInt(),
                         data[prefix + ":Width"].toInt(),
                         data[prefix + ":Height"].toInt());

    }
}
开发者ID:nguyentienlong,项目名称:tora,代码行数:25,代码来源:totool.cpp


注:本文中的showMinimized函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。