void KviWindow::toggleButtonContainer() { QFrame * pContainer = buttonContainer(); if(pContainer) pContainer->setHidden(!pContainer->isHidden()); }
// This is always defined... void KviWindow::createCryptControllerButton(QWidget *) { #ifdef COMPILE_CRYPT_SUPPORT m_pCryptControllerButton = new KviWindowToolPageButton(KviIconManager::UnLockedOff, KviIconManager::UnLocked, __tr2qs("Encryption"), buttonContainer(), false); m_pCryptControllerButton->setObjectName("crypt_controller_button"); connect(m_pCryptControllerButton, SIGNAL(clicked()), this, SLOT(toggleCryptController())); #endif // COMPILE_CRYPT_SUPPORT }
KviQueryWindow::KviQueryWindow(KviConsoleWindow * lpConsole, const QString & szNick) : KviWindow(KviWindow::Query, szNick, lpConsole) { m_iFlags = 0; connection()->registerQuery(this); //m_pTopSplitter = new KviTalSplitter(QSplitter::Horizontal,this,"top_splitter"); m_pButtonBox = new KviTalHBox(this); m_pButtonBox->setSpacing(0); m_pButtonBox->setMargin(0); m_pLabel = new KviThemedLabel(m_pButtonBox, this, "query_label"); updateLabelText(); m_pButtonBox->setStretchFactor(m_pLabel, 1); // The button box on the right //KviTalHBox * box = new KviTalHBox(m_pTopSplitter,"button_box"); m_pButtonGrid = (QFrame *)new KviTalHBox(m_pButtonBox); createTextEncodingButton(m_pButtonGrid); m_pSplitter = new KviTalSplitter(Qt::Horizontal, this); m_pSplitter->setObjectName("query_splitter"); m_pSplitter->setChildrenCollapsible(false); m_pIrcView = new KviIrcView(m_pSplitter, this); connect(m_pIrcView, SIGNAL(rightClicked()), this, SLOT(textViewRightClicked())); //m_pEditorsContainer= new KviToolWindowsContainer(m_pSplitter); m_pListViewButton = new KviWindowToolPageButton(KviIconManager::HideListView, KviIconManager::ShowListView, __tr2qs("Show user list"), buttonContainer(), true); m_pListViewButton->setObjectName("list_view_button"); connect(m_pListViewButton, SIGNAL(clicked()), this, SLOT(toggleListView())); #ifdef COMPILE_CRYPT_SUPPORT createCryptControllerButton(m_pButtonGrid); #endif m_pUserListView = new KviUserListView(m_pSplitter, m_pListViewButton, connection()->userDataBase(), this, 7, __tr2qs("Query targets"), "user_list_view"); m_pInput = new KviInput(this, m_pUserListView); if(KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnQueryJoin)) pasteLastLog(); if(KVI_OPTION_BOOL(KviOption_boolAutoLogQueries)) m_pIrcView->startLogging(); // FIXME: #warning "Maybe tell the user all that we know about the remote szEnd(s)....channels..." m_pIrcView->enableDnd(true); connect(m_pIrcView, SIGNAL(fileDropped(const QString &)), this, SLOT(slotDndEvents(const QString &))); updateCaption(); }