TwitterTimelineWidget::TwitterTimelineWidget(Choqok::Account *account, const QString &timelineName, QWidget *parent) : TwitterApiTimelineWidget(account, timelineName, parent) { if (timelineName.startsWith(QLatin1Char('@'))) { setClosable(); } }
TwitterApiSearchTimelineWidget::TwitterApiSearchTimelineWidget(Choqok::Account* account, const QString& timelineName, const SearchInfo &info, QWidget* parent) : TimelineWidget(account, timelineName, parent), d(new Private(info)) { setAttribute(Qt::WA_DeleteOnClose); d->searchBackend = qobject_cast<TwitterApiMicroBlog*>(currentAccount()->microblog())->searchBackend(); connect(Choqok::UI::Global::mainWindow(), SIGNAL(updateTimelines()), this, SLOT(slotUpdateSearchResults()) ); addFooter(); timelineDescription()->setText(i18n("Search results for %1", timelineName)); setClosable(); }
UBKeyboardPalette::UBKeyboardPalette(QWidget *parent) : UBActionPalette(Qt::TopRightCorner, parent) { // setWindowFlags(/*Qt::CustomizeWindowHint|*/Qt::WindowStaysOnTopHint|Qt::FramelessWindowHint); setCustomCloseProcessing(true); setCustomPosition(true); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); setFocusPolicy(Qt::NoFocus); setClosable(true); setGrip(false); capsLock = false; shift = false; languagePopupActive = false; keyboardActive = false; nSpecialModifierIndex = 0; specialModifier = 0; btnWidth = btnHeight = 16; strSize = "16x16"; currBtnImages = new BTNImages("16", btnWidth, btnHeight); storage = NULL; buttons = new UBKeyButton*[47]; for (int i=0; i<47; i++) { buttons[i] = new UBKeyButton(this); } locales = UBPlatformUtils::getKeyboardLayouts(this->nLocalesCount); createCtrlButtons(); nCurrentLocale = UBSettings::settings()->KeyboardLocale->get().toInt(); if (nCurrentLocale < 0 || nCurrentLocale >= nLocalesCount) nCurrentLocale = 0; if (locales!=NULL) setInput(locales[nCurrentLocale]); setContentsMargins( 22, 22, 22, 22 ); init(); }