本文整理汇总了C++中KviWindow::type方法的典型用法代码示例。如果您正苦于以下问题:C++ KviWindow::type方法的具体用法?C++ KviWindow::type怎么用?C++ KviWindow::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KviWindow
的用法示例。
在下文中一共展示了KviWindow::type方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isMaximized
KviMainWindow::~KviMainWindow()
{
KVI_OPTION_BOOL(KviOption_boolFrameIsMaximized) = isMaximized();
KVI_OPTION_RECT(KviOption_rectFrameGeometry) = QRect(pos().x(), pos().y(),
size().width(), size().height());
KVI_OPTION_BOOL(KviOption_boolStatusBarVisible) = m_pStatusBar ? true : false;
KviCustomToolBarManager::instance()->storeVisibilityState();
saveToolBarPositions();
saveModuleExtensionToolBars();
// Call the frame destructor callback AFTER saving the toolbar positions
// This is because the destructor callback kills alls the KVS objects
// and thus the eventual user toolbar objects too and their position
// wouldn't be saved if they are shown at startup.
g_pApp->frameDestructorCallback();
// Now start killing stuff
// Explicitly kill all the module extension toolbars: qt has NOT to delete them: we must call their "die" method
while(KviMexToolBar * t = m_pModuleExtensionToolBarList->first())
t->die();
delete m_pModuleExtensionToolBarList;
KVI_OPTION_BOOL(KviOption_boolShowDockExtension) = m_pTrayIcon != nullptr;
if(m_pTrayIcon)
{
m_pTrayIcon->die();
m_pTrayIcon = nullptr;
}
if(m_pStatusBar)
{
delete m_pStatusBar;
m_pStatusBar = nullptr;
}
//close all not console windows
for(int i = m_pWinList->count() - 1; i >= 0; --i)
{
KviWindow * wnd = m_pWinList->at(i);
if(wnd->type() != KviWindow::Console)
closeWindow(wnd);
}
// close all the remaining windows (consoles)
while(m_pWinList->first())
closeWindow(m_pWinList->first());
delete m_pWinList;
delete m_pAccellerators;
g_pMainWindow = nullptr;
}
示例2: consoleCount
unsigned int KviMainWindow::consoleCount()
{
unsigned int count = 0;
for(KviWindow * wnd = m_pWinList->first();wnd;wnd = m_pWinList->next())
{
if (wnd) if(wnd->type() == KviWindow::Console) count++;
}
return count;
}
示例3: popup
void UrlDialog::popup(QTreeWidgetItem * item, const QPoint & point)
{
m_szUrl = item->text(0);
QMenu p("menu", nullptr);
p.addAction(__tr2qs("&Remove"), this, SLOT(remove()));
p.addSeparator();
m_pListPopup = new QMenu("list", nullptr);
for(KviWindow * w = g_pMainWindow->windowList()->first(); w; w = g_pMainWindow->windowList()->next())
{
if((w->type() == KviWindow::Channel) || (w->type() == KviWindow::Query) || (w->type() == KviWindow::DccChat))
{
m_pListPopup->addAction(w->plainTextCaption());
}
}
p.addAction(__tr2qs("&Say to Window"))->setMenu(m_pListPopup);
connect(m_pListPopup, SIGNAL(triggered(QAction *)), this, SLOT(sayToWin(QAction *)));
p.exec(point);
}
示例4:
KviConsoleWindow * KviMainWindow::firstNotConnectedConsole()
{
for(KviWindow * wnd = m_pWinList->first(); wnd; wnd = m_pWinList->next())
{
if(wnd->type() == KviWindow::Console)
{
if(!((KviConsoleWindow *)wnd)->connectionInProgress())
return (KviConsoleWindow *)wnd;
}
}
return nullptr;
}
示例5: closeEvent
void KviMainWindow::closeEvent(QCloseEvent * e)
{
//check if the user just want us to minimize in tray; if we're not the sender
//of this signal (sender!=0), it has been generated by a "quit" action in a menu
if(KVI_OPTION_BOOL(KviOption_boolCloseInTray) && QObject::sender() == nullptr && e->spontaneous())
{
if(!trayIcon())
{
executeInternalCommand(KVI_INTERNALCOMMAND_TRAYICON_SHOW);
}
if(trayIcon())
{
e->ignore();
KVI_OPTION_BOOL(KviOption_boolFrameIsMaximized) = isMaximized();
QTimer::singleShot(0, this, SLOT(hide()));
}
return;
}
if(KVI_OPTION_BOOL(KviOption_boolConfirmCloseWhenThereAreConnections))
{
// check for running connections
bool bGotRunningConnection = false;
for(KviWindow * w = m_pWinList->first(); w; w = m_pWinList->next())
{
if(w->type() == KviWindow::Console)
{
if(((KviConsoleWindow *)w)->connectionInProgress())
{
bGotRunningConnection = true;
break;
}
}
}
if(bGotRunningConnection)
{
QString txt;
txt += __tr2qs("There are active connections, are you sure you wish to quit KVIrc?");
switch(QMessageBox::warning(this, __tr2qs("Confirm Close - KVIrc"), txt, __tr2qs("&Yes"), __tr2qs("&Always"), __tr2qs("&No"), 2, 2))
{
case 0:
// ok to close
break;
case 1:
// ok to close but don't ask again
KVI_OPTION_BOOL(KviOption_boolConfirmCloseWhenThereAreConnections) = false;
break;
case 2:
e->ignore();
return;
break;
}
}
}
e->accept();
if(g_pApp)
{
g_pApp->setKviClosingDown();
g_pApp->quit();
}
}