本文整理汇总了C++中KviWindow::console方法的典型用法代码示例。如果您正苦于以下问题:C++ KviWindow::console方法的具体用法?C++ KviWindow::console怎么用?C++ KviWindow::console使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KviWindow
的用法示例。
在下文中一共展示了KviWindow::console方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: regClicked
void ChannelsJoinDialog::regClicked()
{
QString szTmp = m_pChannelEdit->text();
if(szTmp.isEmpty())
return;
KviQString::escapeKvs(&szTmp);
QString szCmd = "regchan.add ";
szCmd += szTmp;
KviConsoleWindow * c = g_pApp->topmostConnectedConsole();
if(!c)
return; // no connection
KviWindow * w = g_pActiveWindow;
if(w->console() != c)
w = c;
KviKvsScript::run(szCmd,w);
fillListView();
//focus the new item (in reality, the first matching one)
QList<QTreeWidgetItem*> items = m_pTreeWidget->findItems(szTmp, Qt::MatchRecursive | Qt::MatchExactly);
if(!items.empty())
{
m_pTreeWidget->setCurrentItem(items.first());
m_pTreeWidget->scrollToItem(items.first());
}
}
示例2: joinClicked
void ChannelsJoinDialog::joinClicked()
{
QString szPass = m_pPass->text();
QString szTmp = m_pChannelEdit->text();
if(szTmp.isEmpty())
return;
KviQString::escapeKvs(&szTmp);
KviQString::escapeKvs(&szPass);
QString szCmd = "join ";
szCmd += szTmp;
szCmd += " ";
szCmd += szPass;
KviConsoleWindow * c = g_pApp->topmostConnectedConsole();
if(!c)
return; // no connection
KviWindow * w = g_pActiveWindow;
if(w->console() != c)
w = c;
KviKvsScript::run(szCmd,w);
m_pChannelEdit->setText("");
m_pPass->setText("");
}
示例3: clearClicked
void ChannelsJoinDialog::clearClicked()
{
QString szCmd = "option stringlistRecentChannels";
KviConsoleWindow * c = g_pApp->topmostConnectedConsole();
if(!c)
return; // no connection
KviWindow * w = g_pActiveWindow;
if(w->console() != c)
w = c;
KviKvsScript::run(szCmd,w);
fillListView();
}