void TextPalette::setFont(const QFont& font) { _font = font; _font.setPointSize(20); populateAll(); populateCommon(); update(); }
void DocumentSourceSort::populate() { /* make sure we've got a sort key */ verify(vSortKey.size()); if (!limitSrc) populateAll(); else if (limitSrc->getLimit() == 1) populateOne(); else populateTopK(); populated = true; }
LoginDialog::LoginDialog(const int &_passwordField, QWidget *parent): QDialog(parent), checkGLayout(new QGridLayout(this)), username(new QLineEdit(this)), password(new QLineEdit(this)), login(new QPushButton("Login")), cancel(new QPushButton("Cancel")) { populateAll(_passwordField); setLayout(checkGLayout); QObject::connect(username, SIGNAL(textChanged(QString)), this, SLOT(setUsername(QString))); QObject::connect(password, SIGNAL(textChanged(QString)), this, SLOT(setPassword(QString))); QObject::connect(login, SIGNAL(clicked()), this, SLOT(accept())); QObject::connect(cancel, SIGNAL(clicked()), this, SLOT(close())); }
void DocumentSourceSort::populate() { /* make sure we've got a sort key */ verify(vSortKey.size()); if (!limitSrc) populateAll(); else if (limitSrc->getLimit() == 1) populateOne(); else populateTopK(); /* start the sort iterator */ docIterator = documents.begin(); if (docIterator != documents.end()) pCurrent = docIterator->doc; populated = true; }
void CSideBar::Init() { m_iTopButtons = m_iBottomButtons = 0; m_topHeight = m_bottomHeight = 0; m_firstVisibleOffset = 0; m_totalItemHeight = 0; m_uLayout = (m_pContainer->dwFlagsEx & 0xff000000) >> 24; m_uLayout = ((m_uLayout < NR_LAYOUTS) ? m_uLayout : 0); m_currentLayout = &m_layouts[m_uLayout]; m_dwFlags = m_currentLayout->dwFlags; m_dwFlags = (m_pContainer->dwFlagsEx & TCF_SBARLEFT ? m_dwFlags | SIDEBARORIENTATION_LEFT : m_dwFlags & ~SIDEBARORIENTATION_LEFT); m_dwFlags = (m_pContainer->dwFlagsEx & TCF_SBARRIGHT ? m_dwFlags | SIDEBARORIENTATION_RIGHT : m_dwFlags & ~SIDEBARORIENTATION_RIGHT); if (m_pContainer->dwFlags & CNT_SIDEBAR) { if (m_hwndScrollWnd == 0) m_hwndScrollWnd = ::CreateWindowEx(0, _T("TS_SideBarClass"), _T(""), WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD, 0, 0, m_width, 40, m_pContainer->hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this); m_isActive = true; m_isVisible = m_isActive ? m_isVisible : true; createScroller(); m_elementHeight = m_currentLayout->height; m_elementWidth = m_currentLayout->width; m_width = m_elementWidth + 4; populateAll(); if (m_activeItem) setActiveItem(m_activeItem); } else { destroyScroller(); m_width = 0; m_isActive = m_isVisible = false; m_activeItem = 0; removeAll(); if (m_hwndScrollWnd) ::DestroyWindow(m_hwndScrollWnd); m_hwndScrollWnd = 0; } }