• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ showMinimized函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: showMinimized

void KviMdiChild::minimize()
{
	if(isVisible())
		showMinimized();
	else
		setWindowState((windowState() & Qt::WindowMinimized) & ~Qt::WindowMaximized);
}
开发者ID:namikaze90,项目名称:KVIrc,代码行数:7,代码来源:KviMdiChild.cpp


示例17: UIMiniToolBar

void UIMachineWindowFullscreen::prepareMiniToolbar()
{
    /* Make sure mini-toolbar is not restricted: */
    if (!gEDataManager->miniToolbarEnabled(vboxGlobal().managedVMUuid()))
        return;

    /* Create mini-toolbar: */
    m_pMiniToolBar = new UIMiniToolBar(this,
                                       GeometryType_Full,
                                       gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()),
                                       gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    AssertPtrReturnVoid(m_pMiniToolBar);
    {
        /* Configure mini-toolbar: */
        m_pMiniToolBar->addMenus(actionPool()->menus());
        connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()),
                this, SLOT(showMinimized()), Qt::QueuedConnection);
        connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
                actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
                actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutWindowActivationStolen()),
                this, SLOT(sltRevokeWindowActivation()), Qt::QueuedConnection);
# ifdef Q_WS_X11
        // WORKAROUND:
        // Due to Unity bug we want native full-screen flag to be set
        // for mini-toolbar _before_ trying to show it in full-screen mode.
        // That significantly improves of chances to have required geometry.
        if (vboxGlobal().typeOfWindowManager() == X11WMType_Compiz)
            vboxGlobal().setFullScreenFlag(m_pMiniToolBar);
# endif /* Q_WS_X11 */
    }
}
开发者ID:pombredanne,项目名称:virtualbox-org-svn-vbox-trunk,代码行数:33,代码来源:UIMachineWindowFullscreen.cpp


示例18: QAction

void MainWindow::setupTrayIcon()
{
    QAction *actionMinimize = new QAction(this);
    actionMinimize->setText(tr("Minimize"));
    connect(actionMinimize, SIGNAL(triggered()), this, SLOT(showMinimized()));

    QAction *actionRestore = new QAction(this);
    actionRestore->setText(tr("Restore"));
    connect(actionRestore, SIGNAL(triggered()), this, SLOT(showNormal()));

    QAction *actionQuit = new QAction(this);
    actionQuit->setText("Quit");

    QAction *actionLogout = new QAction(this);
    actionLogout->setText("Logout");
    connect(actionLogout, SIGNAL(triggered()), this, SLOT(changeUserPass()));

    m_trayIconMenu = new QMenu(this);
    m_trayIconMenu->addAction(actionMinimize);
    m_trayIconMenu->addAction(actionRestore);
    m_trayIconMenu->addSeparator();
    m_trayIconMenu->addAction(actionLogout);
    m_trayIconMenu->addAction(actionQuit);

    m_trayIcon = new QSystemTrayIcon(this);
    m_trayIcon->setIcon(QIcon(":/qtwidget_icon.ico"));
    m_trayIcon->setContextMenu(m_trayIconMenu);
    m_trayIcon->show();

    connect(m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
            this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
    connect(actionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
}
开发者ID:dekomote,项目名称:qtwitdget,代码行数:33,代码来源:mainwindow.cpp


示例19: QPropertyAnimation

void frmMain::InitStyle()
{
    QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
    animation->setDuration(1000);
    animation->setStartValue(0);
    animation->setEndValue(1);
    animation->start();

    this->max = false;
    this->location = this->geometry();
    this->setProperty("Form", true);
    this->setProperty("CanMove", true);
    this->setWindowTitle(ui->lab_Title->text());
    this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint
                         | Qt::WindowMinimizeButtonHint);

    IconHelper::Instance()->SetIcoMain(ui->lab_Ico, 40);
    IconHelper::Instance()->SetIcoMin(ui->btnMenu_Min);
    IconHelper::Instance()->SetIcoNormal(ui->btnMenu_Max);
    IconHelper::Instance()->SetIcoClose(ui->btnMenu_Close);

    connect(ui->btnMenu_Min, SIGNAL(clicked()), this, SLOT(showMinimized()));
    connect(ui->btnMenu_Close, SIGNAL(clicked()), this, SLOT(closeWidget()));
    connect(ui->btnExit, SIGNAL(clicked()),this, SLOT(closeWidget()));

    ui->widget_title->installEventFilter(this);
    ui->btnMenu_Max->click();
}
开发者ID:hzqgogogo,项目名称:IntelligentGreenHouse,代码行数:28,代码来源:frmmain.cpp


示例20: UIMiniToolBar

void UIMachineWindowFullscreen::prepareMiniToolbar()
{
    /* Make sure mini-toolbar is not restricted: */
    if (!gEDataManager->miniToolbarEnabled(vboxGlobal().managedVMUuid()))
        return;

    /* Create mini-toolbar: */
    m_pMiniToolBar = new UIMiniToolBar(this,
                                       GeometryType_Full,
                                       gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()),
                                       gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    AssertPtrReturnVoid(m_pMiniToolBar);
    {
        /* Configure mini-toolbar: */
        m_pMiniToolBar->addMenus(actionPool()->menus());
        connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()),
                this, SLOT(showMinimized()), Qt::QueuedConnection);
        connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
                actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
                actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
        connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutWindowActivationStolen()),
                this, SLOT(sltRevokeWindowActivation()), Qt::QueuedConnection);
    }
}
开发者ID:miguelinux,项目名称:vbox,代码行数:25,代码来源:UIMachineWindowFullscreen.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ showNormal函数代码示例发布时间:2022-05-30
下一篇:
C++ showMaximized函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap