本文整理汇总了C++中showWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ showWindow函数的具体用法?C++ showWindow怎么用?C++ showWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
void MainWindow::hideWindow()
{
f->close();
delete f;
ui->pushButton->disconnect();
connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(showWindow()));
}
示例2: showWindow
void ViewerWindow::onConnected(RfbOutputGate *output)
{
// Set flags.
m_isConnected = true;
m_sizeIsChanged = false;
m_dsktWnd.setConnected();
// Set output for client-to-server messages in file transfer.
m_fileTransfer->setOutput(output);
m_remoteProcess->setOutput(output);
// Update list of supported operation for file transfer.
vector<UINT32> clientMsgCodes;
m_viewerCore->getEnabledClientMsgCapabilities(&clientMsgCodes);
vector<UINT32> serverMsgCodes;
m_viewerCore->getEnabledServerMsgCapabilities(&serverMsgCodes);
m_fileTransfer->getCore()->updateSupportedOperations(&clientMsgCodes, &serverMsgCodes);
// Start viewer window and applying settings.
showWindow();
setForegroundWindow();
applySettings();
}
示例3: QAction
/** Create and bind actions to events. Setup for initial
* tray menu configuration. */
void MainWindow::createActions()
{
_prefsAct = new QAction(QIcon(IMAGE_PREFERENCES), tr("Options"), this);
connect(_prefsAct, SIGNAL(triggered()), this, SLOT(showPreferencesWindow()));
_bandwidthAct = new QAction(QIcon(IMAGE_BWGRAPH), tr("Bandwidth Graph"), this);
connect(_bandwidthAct, SIGNAL(triggered()),
_bandwidthGraph, SLOT(showWindow()));
_messengerwindowAct = new QAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this);
connect(_messengerwindowAct, SIGNAL(triggered()),this, SLOT(showMessengerWindow()));
_messagesAct = new QAction(QIcon(IMAGE_MESSAGES), tr("Open Messages"), this);
connect(_messagesAct, SIGNAL(triggered()),this, SLOT(showMess()));
_appAct = new QAction(QIcon(IMAGE_UNFINISHED), tr("Applications"), this);
connect(_appAct, SIGNAL(triggered()),this, SLOT(showApplWindow()));
//_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this);
//connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer()));
_helpAct = new QAction(QIcon(IMG_HELP), tr("Help"), this);
connect(_helpAct, SIGNAL(triggered()), this, SLOT(showHelpDialog()));
}
示例4: QT_VERSION_CHECK
// handle osx's applicationShouldHandleReopen
// QTBUG-10899 OS X: Add support for ApplicationState capability
void MainWindow::checkShowWindow()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
if (qApp->applicationState() & Qt::ApplicationActive)
showWindow();
#endif
}
示例5: LOG
void
CSecondaryScreen::leave()
{
LOG((CLOG_INFO "leaving screen"));
CLock lock(&m_mutex);
assert(m_active == true);
getScreen()->syncDesktop();
// subclass hook
onPreLeave();
// restore toggle key state
setToggleState(m_toggleKeys);
// warp and hide mouse
SInt32 x, y;
getScreen()->getCursorCenter(x, y);
showWindow(x, y);
// subclass hook
onPostLeave();
// not active anymore
m_active = false;
// make sure our idea of clipboard ownership is correct
getScreen()->checkClipboards();
}
示例6: LoadAccelerators
int WiEngineApp::runWithScene(wyScene* s) {
// load accelerator table
HACCEL hAccelTable = LoadAccelerators(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_WIENGINESKELETONPROJECT));
// register window class
registerWindowClass();
// create window
createWindow();
// set window and accelerator to gl view
m_glView->setWindowHandle(m_hWnd);
m_glView->setAccelTable(hAccelTable);
// show window
showWindow();
// prepare
m_glView->prepare();
// run with first scene
wyDirector::getInstance()->runWithScene(s);
// run
return m_glView->run();
}
示例7: removeAction
void WindowMenu::onAboutToShow()
{
QWidget* win = QApplication::activeWindow();
pMinimize_->setEnabled(win);
pZoom_->setEnabled(win && win->maximumSize() != win->minimumSize());
pBringAllToFront_->setEnabled(win);
for (int i = windows_.size() - 1; i >= 0; i--)
{
QAction* pAction = windows_[i];
removeAction(pAction);
windows_.removeAt(i);
pAction->deleteLater();
}
QWidgetList topLevels = QApplication::topLevelWidgets();
for (int i = 0; i < topLevels.size(); i++)
{
QWidget* pWindow = topLevels.at(i);
if (!pWindow->isVisible())
continue;
QAction* pAction = new QAction(pWindow->windowTitle(), pWindow);
pAction->setData(QVariant::fromValue(pWindow));
pAction->setCheckable(true);
if (pWindow->isActiveWindow())
pAction->setChecked(true);
insertAction(pWindowPlaceholder_, pAction);
connect(pAction, SIGNAL(triggered()),
this, SLOT(showWindow()));
windows_.append(pAction);
}
}
示例8: setWindowTitle
void PluginArtistWindow::loadBaseUi() {
setWindowTitle(tr("Artist"));
setCentralWidget(new QWidget);
m_view->setModel(m_model);
m_view->setItemDelegate(new NavDelegate(m_view));
m_avatar->setFixedSize(100, 100);
m_avatar->setFallbackSource(QUrl::fromLocalFile("/usr/share/icons/hicolor/96x96/hildon/general_default_avatar.png"));
m_titleLabel->setWordWrap(true);
QWidget *scrollWidget = new QWidget(m_scrollArea);
QVBoxLayout *vbox = new QVBoxLayout(scrollWidget);
vbox->addWidget(m_avatar, Qt::AlignLeft);
vbox->addWidget(m_titleLabel, Qt::AlignLeft | Qt::AlignTop);
vbox->addWidget(m_descriptionLabel, Qt::AlignTop);
vbox->setStretch(2, 1);
vbox->setContentsMargins(0, 0, 0, 0);
m_scrollArea->setWidget(scrollWidget);
m_scrollArea->setWidgetResizable(true);
m_scrollArea->setFixedWidth(410);
m_layout = new QHBoxLayout(centralWidget());
m_layout->addWidget(m_scrollArea);
m_layout->addWidget(m_view);
m_layout->setStretch(1, 1);
m_layout->setContentsMargins(0, 0, 0, 0);
menuBar()->addAction(m_nowPlayingAction);
connect(m_view, SIGNAL(activated(QModelIndex)), this, SLOT(showWindow(QModelIndex)));
connect(m_descriptionLabel, SIGNAL(anchorClicked(QUrl)), this, SLOT(showResource(QUrl)));
}
示例9: UT_ASSERT
HWND XAP_Win32DialogBase::createModeless(XAP_Frame* pFrame, LPCWSTR dlgTemplate)
{
UT_ASSERT(m_tag == magic_tag);
UT_return_val_if_fail(pFrame, NULL);
XAP_App* pApp = XAP_App::getApp();
UT_return_val_if_fail(pApp, NULL);
XAP_Win32App* pWin32App = static_cast<XAP_Win32App*>(pApp);
XAP_FrameImpl* pFrameImpl = pFrame->getFrameImpl();
XAP_Win32FrameImpl* pWin32FrameImpl = static_cast<XAP_Win32FrameImpl*>(pFrameImpl);
HWND hFrameWnd = pWin32FrameImpl->getTopLevelWindow();
HWND hWnd = CreateDialogParamW(pWin32App->getInstance(),
dlgTemplate,
hFrameWnd,
(DLGPROC)&XAP_Win32DialogBase::s_dlgProc,
(LPARAM)this);
UT_return_val_if_fail(hWnd, NULL);
m_hDlg = hWnd;
showWindow(SW_SHOW);
bringWindowToTop();
return hWnd;
}
示例10: QSystemTrayIcon
/**
* Méthode initialisant l'icône de la zone de notification
*
* @return void
* @since 1.0.0
*/
void ConvertWindow::initIcon()
{
tray_icon = new QSystemTrayIcon(this);
QMenu* menu = new QMenu(this);
QAction* action_show = new QAction(QString::fromUtf8("Afficher"), this);
QAction* action_hide = new QAction(QString::fromUtf8("Réduire"), this);
QAction* action_about = new QAction(QString::fromUtf8("A propos de QOpenConvert"), this);
QAction* action_close = new QAction(QString::fromUtf8("Fermer QOpenConvert"), this);
connect(action_show, SIGNAL(triggered()), this, SLOT(showWindow()));
connect(action_hide, SIGNAL(triggered()), this, SLOT(hideWindow()));
connect(action_close, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(action_about, SIGNAL(triggered()), this, SLOT(showAbout()));
connect(tray_icon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
menu->addAction(action_show);
menu->addAction(action_hide);
menu->addAction(action_about);
menu->addAction(action_close);
tray_icon->setContextMenu(menu);
QIcon image = QIcon(":/images/icon.png");
tray_icon->setIcon(image);
tray_icon->show();
}
示例11: m_cursorResize
CTimelineControl::CTimelineControl(uiWindow* parent, int x, int y, int w, int h)
:uiWindow(L"timeLineControl", x, y, w, h, parent),
m_cursorResize( UICURSOR_SIZEWE, true ),
m_cursorArrow( UICURSOR_ARROW, true ),
m_cursorSelect( IDC_HAND, true ),
m_cursorMoveValue( UICURSOR_CROSS, true )
{
changeWindowStyle( UISTYLE_CHILD );
showWindow(true);
m_timeLength = 0.0f;
m_crollX = 0;
m_maxValue = 0.0f;
m_minValue = 0.0f;
m_lengthPixel = 15;
m_needSortValue = true;
m_changeTimeAndValue = false;
m_lbuttonDown = false;
m_rbuttonDown = false;
m_selectTimeID = -1;
m_mouseActionState = -1;
}
示例12: mCurrentState
PlayBack::PlayBack(CdrMain *cdrMain) :
mCurrentState(STATE_IDLE),
mTargetState(STATE_IDLE),
mStopFlag(0),
bmpIcon()
{
RECT rect;
HWND hMainWnd = cdrMain->getHwnd();
db_msg("PlayBack:-----------------------\n");
GetWindowRect(hMainWnd, &rect);
mHwnd = CreateWindowEx(WINDOW_PLAYBACK, "",
WS_NONE,
WS_EX_TRANSPARENT | WS_EX_USEPARENTFONT,
WINDOWID_PLAYBACK,
0, 0, RECTW(rect), RECTH(rect),
hMainWnd, (DWORD)this);
if(mHwnd == HWND_INVALID) {
return;
}
showWindow(SW_HIDE);
mCdrMain = cdrMain;
mIZetaMediaPlayer = new zeta::iZetaMediaPlayer();
mPlayBackListener = new PlayBackListener(this);
ResourceManager *rm = ResourceManager::getInstance();
rm->setHwnd(WINDOWID_PLAYBACK, mHwnd);
mCurId=0;
}
示例13: QSystemTrayIcon
// Tray functions
void MainWindow::setupTray()
{
trayIcon = new QSystemTrayIcon(this);
trayIcon->setIcon(StatusIcon::getStatusIcon(UserStatus::Offline));
trayIcon->show();
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(onTrayIconActivated(QSystemTrayIcon::ActivationReason)));
trayMenu = new QMenu(this);
openTvAction = trayMenu->addAction(tr(OPEN_TV_MENU_ITEM));
connect(openTvAction, SIGNAL(triggered()), this, SLOT(showWindow()));
trayMenu->addSeparator();
onlineAction = trayMenu->addAction(StatusIcon::getStatusIcon(UserStatus::Online), tr(ONLINE_MENU_ITEM));
connect(onlineAction, SIGNAL(triggered()), this, SLOT(relogon()));
offlineAction = trayMenu->addAction(StatusIcon::getStatusIcon(UserStatus::Offline), tr(OFFLINE_MENU_ITEM));
connect(offlineAction, SIGNAL(triggered()), this, SLOT(offline()));
networkSettingsAction = trayMenu->addAction(tr(NETWORK_SETTINGS_MENU_ITEM));
connect(networkSettingsAction, SIGNAL(triggered()), this, SLOT(showSettings()));
trayMenu->addSeparator();
signOutAction = trayMenu->addAction(tr(SIGNOUT_MENU_ITEM));
connect(signOutAction, SIGNAL(triggered()), this, SLOT(logout()));
exitAction = trayMenu->addAction(tr(EXIT_MENU_ITEM));
connect(exitAction, SIGNAL(triggered()), this, SLOT(shutDown()));
}
示例14: CommandLineArgument
bool NeuroAndSimEvaluationStandardGuiApplication::setupGui() {
//Register command line argument descriptions to the PlugInManager to support
//switching the GUI on and off
CommandLineArgument *guiArgument =
new CommandLineArgument(
"enableGui", "gui", "",
"Starts the application with graphical user interface.",
0, 0,
true);
CommandLineArgument *noGuiArgument =
new CommandLineArgument(
"disableGui", "nogui", "",
"Starts the application without graphical user interface.",
0, 0,
true);
if(noGuiArgument->getParameterValue()->get() != "") {
mEnableGui = false;
}
if(guiArgument->getParameterValue()->get() != "") {
mEnableGui = true;
}
if(mEnableGui) {
mGuiMainWindow = new GuiMainWindow(mEnableControl, mEnableDebugging);
connect(this, SIGNAL(showGui()), mGuiMainWindow, SLOT(showWindow()));
}
return true;
}
示例15: app_indicator_new
void MainWindow::createSystemTray()
{
#ifdef UBUNTU_UNITY
AppIndicator *indicator = app_indicator_new("Shadowsocks-Qt5", "shadowsocks-qt5", APP_INDICATOR_CATEGORY_OTHER);
GtkWidget *menu = gtk_menu_new();
showItem = gtk_check_menu_item_new_with_label(tr("Show").toLocal8Bit().constData());
gtk_check_menu_item_set_active((GtkCheckMenuItem*)showItem, true);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), showItem);
g_signal_connect(showItem, "toggled", G_CALLBACK(onShow), qApp);
gtk_widget_show(showItem);
GtkWidget *exitItem = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), exitItem);
g_signal_connect(exitItem, "activate", G_CALLBACK(onQuit), qApp);
gtk_widget_show(exitItem);
app_indicator_set_status(indicator, APP_INDICATOR_STATUS_ACTIVE);
app_indicator_set_menu(indicator, GTK_MENU(menu));
#else
//desktop systray
systrayMenu = new QMenu(this);
systrayMenu->addAction(tr("Show"), this, SLOT(showWindow()));
systrayMenu->addAction(QIcon::fromTheme("application-exit", QIcon::fromTheme("exit")), tr("Quit"), qApp, SLOT(exit()));
systray->setIcon(QIcon(":/icons/icons/shadowsocks-qt5.png"));
systray->setToolTip(QString("Shadowsocks-Qt5"));
systray->setContextMenu(systrayMenu);
connect(systray, &QSystemTrayIcon::activated, this, &MainWindow::onSystrayActivated);
systray->show();
#endif
}