void PsiTipLabel::init(const QString& text) { setText(text); initUi(); resize(sizeHint()); qApp->installEventFilter(this); startHideTimer(); setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, nullptr, this) / 255.0); setForegroundRole(QPalette::ToolTipText); setBackgroundRole(QPalette::ToolTipBase); setPalette(QToolTip::palette()); enableColoring_ = PsiOptions::instance()->getOption("options.ui.look.colors.tooltip.enable").toBool(); if(enableColoring_){ QColor textColor(PsiOptions::instance()->getOption("options.ui.look.colors.tooltip.text").toString()); QColor baseColor(PsiOptions::instance()->getOption("options.ui.look.colors.tooltip.background").toString()); if(textColor.isValid() && baseColor.isValid() && textColor != baseColor) { //looks fine QPalette palette(QToolTip::palette()); palette.setColor(QPalette::ToolTipText, textColor); palette.setColor(QPalette::ToolTipBase, baseColor); palette.setColor(QPalette::WindowText, textColor); palette.setColor(QPalette::Window, baseColor); setPalette(palette); } else { enableColoring_ = false; } } const QString css = PsiOptions::instance()->getOption("options.ui.contactlist.tooltip.css").toString(); if (!css.isEmpty()) { setStyleSheet(css); } }
/// Creates a model gui with properties populated to match the input model guiModelEditor::guiModelEditor(CModelPtr model) { this->setupUi(this); initUi(); mModel = model; // get information about the model QString model_name = QString::fromStdString(mModel->name()); QString position_name = QString::fromStdString(mModel->GetPosition()->name()); QString shader_id = QString::fromStdString(mModel->GetShader()->ID()); const vector<CFeaturePtr> features = mModel->GetFeatures(); guiCommon::setSelectedValue(cboModels, model_name); guiCommon::setSelectedValue(cboPositions, position_name); guiCommon::setSelectedValue(cboShaders, shader_id); QString feature_name; for(auto feature: features) { feature_name = QString::fromStdString(feature->name()); listFeatures->addItem(feature_name); } }
MainFrm::MainFrm(RoleDef* roleDef, QWidget *parent, Qt::WFlags flags): m_roleDef(roleDef),QMainWindow(parent, flags){ pFrmFrame=0; pFrmMinorStrata=0; pFrmFrameDetails=0; pFrmSampling=0; pFrmCell=0; sSample=new Sample; pFrmVesselType=0; pFrmVessel=0; pFrmTrip=0; pFrmOperation=0; pFrmCatch=0; pFrmPrjPage=0; toolbar=0; ruleCheckerPtr=0; pFrmReports=0; process=0; curHelpId=""; handler=0; setAttribute( Qt::WA_AlwaysShowToolTips); setupUi(this); initUi(); }
void GxsGroupDialog::showEvent(QShowEvent*) { ui.headerFrame->setHeaderImage(serviceImage()); setWindowIcon(serviceWindowIcon()); initUi(); }
FacebookViewDialog::FacebookViewDialog ( const QUrl& link, QWidget* parent, const QString& urlString) : KDialog(parent) { mLink = link; QUrl url(urlString); mCloseUrl = url; initUi(); }
void Editor::init() { if(m_initialized){ return; } Engine* engine = Engine::getInstance(); QQmlEngine* qmlEngine = engine->getQmlEngine(); QQmlContext* context = qmlEngine->rootContext(); context->setContextProperty("editor",this); editorUiComponent = new QQmlComponent(qmlEngine,Util::getUrlPathToAsset("qml/editor/EditorUi.qml")); for(QQmlError error :editorUiComponent->errors()){ qDebug() << "Error on Line" << error.line() << ":" << error.description(); } if(editorUiComponent->isReady()){ initUi(); }else { connect(editorUiComponent,SIGNAL(statusChanged(QQmlComponent::Status)), this,SLOT(onLoadingUiChanged(QQmlComponent::Status))); } m_initialized = true; }
TrackerControlWidget::TrackerControlWidget(QWidget *parent) : QWidget(parent) { setupUi(this); initUi(); readProjectData(); }
void Configurator::constructorHelper() { _currentWigetItem = 0; initUi(); initUiFromSettings(); }
GiftListView::GiftListView() : mPageTotal(0),mPageSize(10),mPageCurr(1),mPageRowSize(5),mItemIntervalH(3),mPageInterval(10),mIsMove(false), mNowSeledItem(NULL),mIsControl(true),mTimer(0),mMovex(0),mApater(NULL),mItemIntervalV(3),mIsClickEnable(true) { initUi(); mMarkPosOffset.x=0; mMarkPosOffset.y=0; }
MinesRankingWidget::MinesRankingWidget(QWidget *parent) : QWidget(parent) { initUi(); dataFileName = "ranking.xml"; readRanking(); updateUi(); }
DesktopMainWindow::DesktopMainWindow(GodziApp* app, const std::string& configPath, const std::string& defaultMap) : _app(app), _configPath(configPath), _defaultMap(defaultMap) { initUi(); _app->actionManager()->addAfterActionCallback(this); connect(_app, SIGNAL(projectChanged(osg::ref_ptr<Godzi::Project>, osg::ref_ptr<Godzi::Project>)), this, SLOT(onProjectChanged(osg::ref_ptr<Godzi::Project>, osg::ref_ptr<Godzi::Project>))); }
RuleCheckWidget::RuleCheckWidget(QWidget* parent /* = NULL */) :QDialog(parent) { m_saveList = NULL; initUi(); initTable(); initSlots(); }
SearchWidget::SearchWidget(QWidget *parent) : BasedWidget(parent) { setFixedSize(searchWidgetSize); setObjectName("SearchWidget"); initUi(); initConnect(); }
MainWnd::MainWnd(QWidget *parent) : QFrame(parent) { // 初始化变量 initVariable(); // 初始化界面 initUi(); }
MainBottomWidget::MainBottomWidget(QWidget *parent) : QWidget(parent) { setFixedSize(900, 120); m_backGroundWidget = new BackGroundWidget(this); m_backGroundWidget->setGeometry(rect()); m_maxDuration = 400000; initUi(); initConnect(); }
void PsiTipLabel::init(const QString& text) { setText(text); initUi(); resize(sizeHint()); qApp->installEventFilter(this); startHideTimer(); setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0); setPalette(QToolTip::palette()); }
FormSettings::FormSettings(QWidget *parent) : QWidget(parent), ui(new Ui::FormSettings) { ui->setupUi(this); globals = Globals::getInstance(); database = EnigmaDatabase::getInstance(); initUi(); }
NormDock::NormDock(QWidget *parent) : QDockWidget(parent) { // init with zero ranges ranges.insert(representation::IMG, multi_img::Range()); ranges.insert(representation::GRAD, multi_img::Range()); modes.insert(representation::IMG, multi_img::NORM_OBSERVED); modes.insert(representation::GRAD, multi_img::NORM_OBSERVED); setupUi(this); initUi(); }
TitleWidget::TitleWidget(const bool &isMainTitle, QWidget *parent) : BasedStyleShetWidget(parent) { setAttribute(Qt::WA_TranslucentBackground); setObjectName("NetNaseTitle"); initUi(isMainTitle); if (isMainTitle) { setFixedSize(mainTitleSize); initAction(); } else setFixedSize(logInTitleSize); }
ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent, const QString & _name, LedColors _color ) : DEFAULT_LEDCHECKBOX_INITIALIZER_LIST, m_text( _text ) { initUi( _color ); } ledCheckBox::ledCheckBox( QWidget * _parent, const QString & _name, LedColors _color ) : DEFAULT_LEDCHECKBOX_INITIALIZER_LIST { initUi( _color ); } #undef DEFAULT_LEDCHECKBOX_INITIALIZER_LIST ledCheckBox::~ledCheckBox() { delete m_ledOnPixmap; delete m_ledOffPixmap; } void ledCheckBox::setText( const QString &s ) { m_text = s; onTextUpdated(); }
LayoutSettingsPage::LayoutSettingsPage(QWidget *parent) : QFrame(parent), ui(new Ui::LayoutSettingsPage) { qRegisterMetaType<QPageSize::PageSizeId>("QPageSize::PageSizeId"); qRegisterMetaType<QPageLayout::Unit>("QPageLayout::Unit"); ui->setupUi(this); m_layoutSettings = new LayoutSettings(this); initPageFormatComboBox(); initLayoutUnitComboBox(); m_pageLayout = m_layoutSettings->pageLayout(); initUi(); createConnections(); }
AppearanceSettings::AppearanceSettings(QWidget* parent, Qt::WFlags fl) : QDialog(parent, fl), m_isStatusView(false) { initUi(); loadThemes(); loadColorSchemes(); loadSavedTheme(); connect(qApp, SIGNAL(appMessage(QString,QByteArray)), this, SLOT(receiveAppMessage(QString,QByteArray))); QMenu *menu = QSoftMenuBar::menuFor(this); menu->addAction(QIcon(":icon/Note"), tr("Add to current profile"), this, SLOT(pushSettingStatus())); menu->addAction(QIcon(":image/homescreen/homescreen"), tr("Homescreen Settings..."), this, SLOT(openHomescreenSettings())); setWindowTitle(tr("Appearance")); }
FalseColorDock::FalseColorDock(QWidget *parent) : QDockWidget(parent), lastShown(FalseColoring::CMF) { setObjectName("FalseColorDock"); /* setup our UI here as it is quite minimalistic */ QWidget *contents = new QWidget(this); QVBoxLayout *layout = new QVBoxLayout(contents); view = new AutohideView(contents); view->setBaseSize(QSize(250, 300)); view->setFrameShape(QFrame::NoFrame); view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); layout->addWidget(view); this->setWidget(contents); connect(QApplication::instance(), SIGNAL(lastWindowClosed()), this, SLOT(saveState())); initUi(); restoreState(); }
void ChatDlg::init() { initUi(); initActions(); setShortcuts(); // TODO: this have to be moved to chatEditCreated() chatView()->setDialog(this); chatEdit()->setDialog(this); chatEdit()->installEventFilter(this); connect(chatView(), SIGNAL(selectionChanged()), SLOT(logSelectionChanged())); // SyntaxHighlighters modify the QTextEdit in a QTimer::singleShot(0, ...) call // so we need to install our hooks after it fired for the first time QTimer::singleShot(10, this, SLOT(initComposing())); connect(this, SIGNAL(composing(bool)), SLOT(updateIsComposing(bool))); setAcceptDrops(TRUE); updateContact(jid(), true); X11WM_CLASS("chat"); setLooks(); updatePGP(); connect(account(), SIGNAL(pgpKeyChanged()), SLOT(updatePGP())); connect(account(), SIGNAL(encryptedMessageSent(int, bool, int, const QString &)), SLOT(encryptedMessageSent(int, bool, int, const QString &))); account()->dialogRegister(this, jid()); chatView()->setFocusPolicy(Qt::NoFocus); chatEdit()->setFocus(); // TODO: port to restoreSavedSize() (and adapt it from restoreSavedGeometry()) QSize size = PsiOptions::instance()->getOption("options.ui.chat.size").toSize(); if (!size.isEmpty()) { resize(size); } else { resize(defaultSize()); } }
void QtUiApplication::init() { if (!Quassel::init()) { throw ExitException{EXIT_FAILURE, tr("Could not initialize Quassel!")}; } // Settings upgrade/downgrade handling if (!migrateSettings()) { throw ExitException{EXIT_FAILURE, tr("Could not load or upgrade client settings!")}; } Client::init(new QtUi()); // Init UI only after the event loop has started // TODO Qt5: Make this a lambda QTimer::singleShot(0, this, SLOT(initUi())); Quassel::registerQuitHandler([]() { QtUi::mainWindow()->quit(); }); }
Jmplayer::Jmplayer( QWidget * parent, Qt::WFlags f) : QMainWindow(parent, f) { setupUi(this); timer = new QTimer(this); ms = 0; fileIndex = 0; firstTime = true; running = false; connect(timer, SIGNAL(timeout()), this, SLOT(showTime())); connect(timer, SIGNAL(timeout()), this, SLOT(setSliderValue())); connect(play_button, SIGNAL(clicked()), this, SLOT(pauseContinue())); connect(prev_button, SIGNAL(clicked()), this, SLOT(skipBackward())); connect(next_button, SIGNAL(clicked()), this, SLOT(skipForward())); connect(add_button, SIGNAL(clicked()), this, SLOT(loadFiles())); connect(timeSlider, SIGNAL(sliderReleased()),this, SLOT(seekFile())); connect(volumeSlider, SIGNAL(valueChanged(int)),this, SLOT(changeVolume())); program = "/usr/bin/mplayer"; myProcess = new QProcess(parent); adjustWindow(); initUi(); }
KWStatisticsWidget::KWStatisticsWidget(QWidget *parent, bool shortVersion) : QWidget(parent), m_resourceManager(0), m_selection(0), m_document(0), m_textDocument(0), m_timer(0), m_words(0), m_sentences(0), m_syllables(0), m_cjkChars(0), m_charsWithSpace(0), m_charsWithoutSpace(0), m_lines(0), m_paragraphs(0) { this->shortVersion = shortVersion; m_timer = new QTimer(this); initUi(); initLayout(); //All kind of stuff related to the option menu, unnecessary stuff in short version if(!shortVersion) { m_menu = new StatisticsPreferencesPopup(m_preferencesButton); m_preferencesButton->setMenu(m_menu); m_preferencesButton->setPopupMode(QToolButton::InstantPopup); m_preferencesButton->setIcon(koIcon("configure")); connect(m_menu, SIGNAL(wordsDisplayChange(int)), this, SLOT(wordsDisplayChanged(int))); connect(m_menu, SIGNAL(sentencesDisplayChange(int)), this, SLOT(sentencesDisplayChanged(int))); connect(m_menu, SIGNAL(linesDisplayChange(int)), this, SLOT(linesDisplayChanged(int))); connect(m_menu, SIGNAL(syllablesDisplayChange(int)), this, SLOT(syllablesDisplayChanged(int))); connect(m_menu, SIGNAL(charspaceDisplayChange(int)), this, SLOT(charspaceDisplayChanged(int))); connect(m_menu, SIGNAL(charnospaceDisplayChange(int)), this, SLOT(charnospaceDisplayChanged(int))); connect(m_menu, SIGNAL(eastDisplayChange(int)), this, SLOT(eastDisplayChanged(int))); connect(m_menu, SIGNAL(fleschDisplayChange(int)), this, SLOT(fleschDisplayChanged(int))); connect(m_preferencesButton, SIGNAL(clicked()), m_preferencesButton, SLOT(showMenu())); }
SearchWidget::SearchWidget(QWidget *parent) : QWidget(parent)//, //ui(new Ui::SearchWidget) { //ui->setupUi(this); initUi(); player = new QMediaPlayer(this); // owned by PlaylistModel playlist = new QMediaPlaylist(); player->setPlaylist(playlist); urlLineEdit = new QLineEdit("http://sw.bos.baidu.com/sw-search-sp/software/f4570d2d3175b/ue_chinese_23.20.0.28.exe"); manager = new QNetworkAccessManager; songUrlManager = new QNetworkAccessManager; manager_lyric2 = new QNetworkAccessManager; QObject::connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(changeList(QNetworkReply *))); QObject::connect(searchBtn, SIGNAL(clicked()), this, SLOT(slotSearchBtn())); //QObject::connect(local, SIGNAL(clicked()),this, SLOT(slotLocal())); QObject::connect(nextPage, SIGNAL(clicked()), this, SLOT(slotNextPage())); QObject::connect(previousPage, SIGNAL(clicked()), this, SLOT(slotPreviousPage())); QObject::connect(this, SIGNAL(searchSignal()), this, SLOT(slotSearch())); QObject::connect(listTable, SIGNAL(cellClicked(int,int)), this, SLOT(tableClicked(int,int))); QObject::connect(songUrlManager, SIGNAL(finished(QNetworkReply*)),this, SLOT(finishGetSongUrl(QNetworkReply *))); QObject::connect(manager_lyric2, SIGNAL(finished(QNetworkReply*)), this, SLOT(getUrl(QNetworkReply *))); urlLabel = new QLabel(tr("&URL:")); urlLabel->setBuddy(urlLineEdit); statusLabel = new QLabel(tr("Please enter the URL of a file you want to " "download.")); statusLabel->setWordWrap(true); downloadButton = new QPushButton(tr("Download")); downloadButton->setDefault(true); quitButton = new QPushButton(tr("Quit")); quitButton->setAutoDefault(false); buttonBox = new QDialogButtonBox; buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole); buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole); progressDialog = new QProgressDialog(this); QHBoxLayout *topLayout = new QHBoxLayout; topLayout->addWidget(lyricLabel); topLayout->addWidget(urlLabel); topLayout->addWidget(urlLineEdit); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(topLayout); mainLayout->addWidget(statusLabel); mainLayout->addWidget(lyricLabel); mainLayout->addWidget(buttonBox); setLayout(mainLayout); setWindowTitle(tr("Funky"));/**/ urlLineEdit->setFocus(); }
guiModelEditor::guiModelEditor() { this->setupUi(this); initUi(); }
StatusBar::StatusBar(QWidget *parent) : QWidget(parent) { // 初始化界面 initUi(); }