• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ retranslate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中retranslate函数的典型用法代码示例。如果您正苦于以下问题:C++ retranslate函数的具体用法?C++ retranslate怎么用?C++ retranslate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了retranslate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: connect

// Initialize the dialog widgets and connect the signals/slots
void ObservabilityDialog::createDialogContent()
{
	ui->setupUi(dialog);
	ui->tabs->setCurrentIndex(0);
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));

	// Settings:
	connect(ui->Today, SIGNAL(stateChanged(int)), this, SLOT(setTodayFlag(int)));
	connect(ui->AcroCos, SIGNAL(stateChanged(int)), this, SLOT(setAcroCosFlag(int)));
	connect(ui->Opposition, SIGNAL(stateChanged(int)), this, SLOT(setOppositionFlag(int)));
	connect(ui->Goods, SIGNAL(stateChanged(int)), this, SLOT(setGoodDatesFlag(int)));
	connect(ui->FullMoon, SIGNAL(stateChanged(int)), this, SLOT(setFullMoonFlag(int)));
//	connect(ui->Crescent, SIGNAL(stateChanged(int)), this, SLOT(setCrescentMoonFlag(int)));
//	connect(ui->SuperMoon, SIGNAL(stateChanged(int)), this, SLOT(setSuperMoonFlag(int)));

	connect(ui->Red, SIGNAL(sliderMoved(int)), this, SLOT(setRed(int)));
	connect(ui->Green, SIGNAL(sliderMoved(int)), this, SLOT(setGreen(int)));
	connect(ui->Blue, SIGNAL(sliderMoved(int)), this, SLOT(setBlue(int)));
	connect(ui->fontSize, SIGNAL(sliderMoved(int)), this, SLOT(setSize(int)));
	connect(ui->SunAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setAltitude(int)));
	connect(ui->HorizAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setHorizon(int)));

	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults()));
	connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings()));

	// About tab
	setAboutHtml();
	StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
	Q_ASSERT(gui);
	ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet));

	updateGuiFromSettings();

}
开发者ID:incadoi,项目名称:stellarium-1,代码行数:36,代码来源:ObservabilityDialog.cpp


示例2: connect

void MpcImportWindow::createDialogContent()
{
	ui->setupUi(dialog);

	//Signals
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));

	connect(ui->pushButtonAcquire, SIGNAL(clicked()),
	        this, SLOT(acquireObjectData()));
	connect(ui->pushButtonAbortDownload, SIGNAL(clicked()),
	        this, SLOT(abortDownload()));
	connect(ui->pushButtonAdd, SIGNAL(clicked()), this, SLOT(addObjects()));
	connect(ui->pushButtonDiscard, SIGNAL(clicked()),
	        this, SLOT(discardObjects()));

	connect(ui->pushButtonBrowse, SIGNAL(clicked()), this, SLOT(selectFile()));
	connect(ui->comboBoxBookmarks, SIGNAL(currentIndexChanged(QString)),
	        this, SLOT(bookmarkSelected(QString)));

	connect(ui->radioButtonFile, SIGNAL(toggled(bool)),
	        ui->frameFile, SLOT(setVisible(bool)));
	connect(ui->radioButtonURL, SIGNAL(toggled(bool)),
	        ui->frameURL, SLOT(setVisible(bool)));

	connect(ui->radioButtonAsteroids, SIGNAL(toggled(bool)),
	        this, SLOT(switchImportType(bool)));
	connect(ui->radioButtonComets, SIGNAL(toggled(bool)),
	        this, SLOT(switchImportType(bool)));

	connect(ui->pushButtonMarkAll, SIGNAL(clicked()),
	        this, SLOT(markAll()));
	connect(ui->pushButtonMarkNone, SIGNAL(clicked()),
	        this, SLOT(unmarkAll()));

	connect(ui->pushButtonSendQuery, SIGNAL(clicked()),
	        this, SLOT(sendQuery()));
	connect(ui->lineEditQuery, SIGNAL(returnPressed()),
		this, SLOT(sendQuery()));
	connect(ui->pushButtonAbortQuery, SIGNAL(clicked()),
	        this, SLOT(abortQuery()));
	connect(ui->lineEditQuery, SIGNAL(textEdited(QString)),
	        this, SLOT(resetNotFound()));
	//connect(ui->lineEditQuery, SIGNAL(editingFinished()), this, SLOT(sendQuery()));
	connect(countdownTimer, SIGNAL(timeout()), this, SLOT(updateCountdown()));

	QSortFilterProxyModel * filterProxyModel = new QSortFilterProxyModel(this);
	filterProxyModel->setSourceModel(candidateObjectsModel);
	filterProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
	ui->listViewObjects->setModel(filterProxyModel);
	connect(ui->lineEditSearch, SIGNAL(textChanged(const QString&)),
	        filterProxyModel, SLOT(setFilterFixedString(const QString&)));

	loadBookmarks();
	updateTexts();

	resetCountdown();
	resetDialog();
}
开发者ID:NGCyang,项目名称:stellarium,代码行数:60,代码来源:MpcImportWindow.cpp


示例3: KNMusicLibraryCategoryTab

KNMusicLibraryAlbumTab::KNMusicLibraryAlbumTab(QWidget *parent) :
    KNMusicLibraryCategoryTab(parent),
    m_tab(new KNCategoryTab(this)),
    m_showInAlbumTab(new QAction(this)),
    m_dropProxy(new KNDropProxyContainer(this)),
    m_albumDetail(new KNMusicAlbumDetail(m_dropProxy, this)),
    m_albumView(new KNMusicAlbumView(m_dropProxy)),
    m_albumModel(nullptr),
    m_libraryModel(nullptr)
{
    //Configure the tab button.
    m_tab->setIcon(QIcon(":/plugin/music/category/ablum.png"));
    //Configure the show in action.
    connect(m_showInAlbumTab, &QAction::triggered,
            this, &KNMusicLibraryAlbumTab::onActionShowInAlbum);
    //Configure the drop proxy container.
    m_dropProxy->setFocusProxy(m_albumView);
    setContentWidget(m_dropProxy);
    //Configure the album view.
    m_albumView->setAlbumDetail(m_albumDetail);

    //Initial the layout for the container, only for auto resize splitter.
    QBoxLayout *mainLayout=new QBoxLayout(QBoxLayout::LeftToRight, m_dropProxy);
    mainLayout->setContentsMargins(0,0,0,0);
    mainLayout->setSpacing(0);
    m_dropProxy->setLayout(mainLayout);
    //Add the album view to the main layout.
    mainLayout->addWidget(m_albumView);

    //Link retranslate.
    knI18n->link(this, &KNMusicLibraryAlbumTab::retranslate);
    retranslate();
}
开发者ID:CasparLi,项目名称:Mu,代码行数:33,代码来源:knmusiclibraryalbumtab.cpp


示例4: QMainWindow

MainWindow::MainWindow( QWidget* parent, Qt::WFlags flags )
    : QMainWindow( parent, flags )
{
    ui.setupUi(this);
    fillLanguages();
    retranslate();
}
开发者ID:Wolframe,项目名称:wolfclient,代码行数:7,代码来源:mainWindow.cpp


示例5: QObject

KNMusicGlobal::KNMusicGlobal(QObject *parent) :
    QObject(parent)
{
    //Initial global instance.
    m_global=KNGlobal::instance();
    //Register music metatypes.
    regMetaType();
    //Initial music types.
    initialFileType();
    //Initial threads.
    initialThreads();
    //Initial resources.
    initialHeaderText();
    initialGenreText();

    //Set the library path.
    setMusicLibraryPath(m_global->libraryPath()+"/Music");
    //Link the library changed request.
    connect(KNGlobal::instance(), &KNGlobal::libraryMoved,
            this, &KNMusicGlobal::onActionLibraryMoved);

    //Connect retranslate signal.
    connect(KNGlobal::instance(), &KNGlobal::requireRetranslate,
            this, &KNMusicGlobal::retranslate);
    //Get the latest translation.
    retranslate();
}
开发者ID:loki1412,项目名称:Mu,代码行数:27,代码来源:knmusicglobal.cpp


示例6: GETSTELMODULE

void FOVWindow::createDialogContent()
{
	fov = GETSTELMODULE(FOV);
	ui->setupUi(dialog);

	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));

	populateFOV();

	connect(ui->doubleSpinBoxFOV0, SIGNAL(valueChanged(double)), this, SLOT(updateFOV0(double)));
	connect(ui->doubleSpinBoxFOV1, SIGNAL(valueChanged(double)), this, SLOT(updateFOV1(double)));
	connect(ui->doubleSpinBoxFOV2, SIGNAL(valueChanged(double)), this, SLOT(updateFOV2(double)));
	connect(ui->doubleSpinBoxFOV3, SIGNAL(valueChanged(double)), this, SLOT(updateFOV3(double)));
	connect(ui->doubleSpinBoxFOV4, SIGNAL(valueChanged(double)), this, SLOT(updateFOV4(double)));
	connect(ui->doubleSpinBoxFOV5, SIGNAL(valueChanged(double)), this, SLOT(updateFOV5(double)));
	connect(ui->doubleSpinBoxFOV6, SIGNAL(valueChanged(double)), this, SLOT(updateFOV6(double)));
	connect(ui->doubleSpinBoxFOV7, SIGNAL(valueChanged(double)), this, SLOT(updateFOV7(double)));
	connect(ui->doubleSpinBoxFOV8, SIGNAL(valueChanged(double)), this, SLOT(updateFOV8(double)));
	connect(ui->doubleSpinBoxFOV9, SIGNAL(valueChanged(double)), this, SLOT(updateFOV9(double)));

	connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(saveFOVSettings()));
	connect(ui->pushButtonReset, SIGNAL(clicked()), this, SLOT(resetFOVSettings()));

	updateAboutText();	
}
开发者ID:NGCyang,项目名称:stellarium,代码行数:27,代码来源:FOVWindow.cpp


示例7: connect

// Initialize the dialog widgets and connect the signals/slots
void SupernovaeDialog::createDialogContent()
{
	ui->setupUi(dialog);
	ui->tabs->setCurrentIndex(0);	
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
		this, SLOT(retranslate()));

	// Settings tab / updates group
	connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this, SLOT(setUpdatesEnabled(int)));
	connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON()));
	connect(GETSTELMODULE(Supernovae), SIGNAL(updateStateChanged(Supernovae::UpdateState)), this, SLOT(updateStateReceiver(Supernovae::UpdateState)));
	connect(GETSTELMODULE(Supernovae), SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompleteReceiver(void)));
	connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int)));
	refreshUpdateValues(); // fetch values for last updated and so on
	// if the state didn't change, setUpdatesEnabled will not be called, so we force it
	setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState());

	updateTimer = new QTimer(this);
	connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues()));
	updateTimer->start(7000);

	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));

	connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults()));
	connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings()));

	// About tab
	setAboutHtml();
	StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
	Q_ASSERT(gui);
	ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet));

	updateGuiFromSettings();

}
开发者ID:incadoi,项目名称:stellarium-1,代码行数:36,代码来源:SupernovaeDialog.cpp


示例8: connect

void KNMusicLibraryAlbumTab::setCategoryModel(KNMusicCategoryModelBase *model)
{
    //Check whether we set it before.
    if(m_albumModel!=nullptr)
    {
        return;
    }
    //Save category model pointer.
    m_albumModel=static_cast<KNMusicAlbumModel *>(model);
    //Check out the album model.
    if(m_albumModel==nullptr)
    {
        return;
    }

    //Do original set.
    KNMusicLibraryCategoryTab::setCategoryModel(model);
    //Link the artwork update signal.
    connect(m_albumModel, &KNMusicAlbumModel::albumRemoved,
            m_albumDetail, &KNMusicAlbumDetail::onActionAlbumRemoved);
    connect(m_albumModel, &KNMusicAlbumModel::albumArtUpdate,
            m_albumDetail, &KNMusicAlbumDetail::onActionAlbumArtUpdate);
    //Update the model.
    retranslate();

    //This should be done in constructor, but setModel() is a virtual
    //function, so we moved here.
    //Set the proxy model to album view.
    m_albumView->setModel(categoryProxyModel());
    //Set the default sort order.
    categoryProxyModel()->sort(0, Qt::AscendingOrder);
}
开发者ID:AnkyoChu,项目名称:Mu,代码行数:32,代码来源:knmusiclibraryalbumtab.cpp


示例9: connect

void DynamicPluginTemplateWindow::createDialogContent()
{
	ui->setupUi(dialog);

	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
}
开发者ID:argrento,项目名称:StellariumPluginTemplate,代码行数:7,代码来源:DynamicPluginTemplateWindow.cpp


示例10: KNMusicViewerItemBase

KNMusicListViewItem::KNMusicListViewItem(QObject *parent) :
    KNMusicViewerItemBase(parent)
{
    //Initial translation and icons.
    retranslate();

    //Initial the sort model.
    m_listViewModel=new KNMusicSortModel;
    m_listViewModel->setFilterKeyColumn(-1);
    m_listViewModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
    m_listViewModel->setSortCaseSensitivity(Qt::CaseInsensitive);

    //Initial the view widget.
    m_libraryView=new KNMusicListView;
    m_libraryView->setModel(m_listViewModel);
    connect(m_libraryView, &KNMusicListView::requireOpenUrl,
            [=](const QModelIndex &index)
            {
                emit requireSetProxy(m_listViewModel);
                emit requirePlayMusic(m_listViewModel->mapToSource(index));
            });
    connect(m_libraryView, &KNMusicListView::requireShowContextMenu,
            this, &KNMusicListViewItem::onActionShowContextMenu);

    m_container=new KNMusicViewContainer;
    m_container->setCentralWidget(m_libraryView);
    connect(m_container, &KNMusicViewContainer::requireAnalysisUrls,
            this, &KNMusicListViewItem::requireAnalysisUrls);
    connect(m_container, &KNMusicViewContainer::dragEntered,
            this, &KNMusicListViewItem::dragEntered);
    connect(m_container, &KNMusicViewContainer::dropped,
            this, &KNMusicListViewItem::dropped);
}
开发者ID:Kreogist,项目名称:Nerve,代码行数:33,代码来源:knmusiclistviewitem.cpp


示例11: QObject

KNGlobal::KNGlobal(QObject *parent) :
    QObject(parent),
    m_preference(nullptr),
    m_globalConfigure(nullptr)
{
    //Initial the managers.
    //Gerenate the configure manager.
    KNConfigureManager::initial(this);
    //Generate the font manager.
    KNFontManager::initial(this);
    //Generate the locale manager.
    KNLocaleManager::initial(this);
    //Generate the theme manager.
    KNThemeManager::initial(this);

    //Initial the infrastructure.
    initialInfrastrcture();
    //Update the infrastructure.
    // Load the language.
    knI18n->setLanguage(userConfigure()->data("Language").toString());

    //Link the retranslate.
    knI18n->link(this, &KNGlobal::retranslate);
    retranslate();
}
开发者ID:delkyd,项目名称:Mu,代码行数:25,代码来源:knglobal.cpp


示例12: connect

void BookmarksDialog::createDialogContent()
{
	ui->setupUi(dialog);
	
	//Signals and slots
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));

	connect(ui->addBookmarkButton, SIGNAL(clicked()), this, SLOT(addBookmarkButtonPressed()));
	connect(ui->removeBookmarkButton, SIGNAL(clicked()), this, SLOT(removeBookmarkButtonPressed()));
	connect(ui->goToButton, SIGNAL(clicked()), this, SLOT(goToBookmarkButtonPressed()));
	connect(ui->clearBookmarksButton, SIGNAL(clicked()), this, SLOT(clearBookmarksButtonPressed()));
	connect(ui->bookmarksTreeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(selectCurrentBookmark(QModelIndex)));

	connect(ui->clearHighlightsButton, SIGNAL(clicked()), this, SLOT(clearHighlightsButtonPressed()));
	connect(ui->highlightBookmarksButton, SIGNAL(clicked()), this, SLOT(highlightBookrmarksButtonPressed()));

	connect(ui->importBookmarksButton, SIGNAL(clicked()), this, SLOT(importBookmarks()));
	connect(ui->exportBookmarksButton, SIGNAL(clicked()), this, SLOT(exportBookmarks()));

	//Initializing the list of bookmarks
	bookmarksListModel->setColumnCount(ColumnCount);
	setBookmarksHeaderNames();

	ui->bookmarksTreeView->setModel(bookmarksListModel);
	ui->bookmarksTreeView->header()->setSectionsMovable(false);
	ui->bookmarksTreeView->header()->setSectionResizeMode(ColumnName, QHeaderView::ResizeToContents);
	ui->bookmarksTreeView->header()->setStretchLastSection(true);
	ui->bookmarksTreeView->hideColumn(ColumnUUID);

	loadBookmarks();
}
开发者ID:Stellarium,项目名称:stellarium,代码行数:33,代码来源:BookmarksDialog.cpp


示例13: MenuButton

CameraButton::CameraButton(QWidget *parent) :
    MenuButton(parent), _bgImage(NULL),
    _logo(QImage("graphics/camera_logo.png"))
{
    retranslate();

}
开发者ID:timakima,项目名称:arteacher,代码行数:7,代码来源:camerabutton.cpp


示例14: QDialog

Export_Dialog::Export_Dialog(QWidget *parent) :
    QDialog(parent), canvas ( 0 )
{
    setupUi(this);
    setWindowIcon(load::icon("document-export"));
    connect(&Translator::object,SIGNAL(language_changed()),SLOT(retranslate()));
}
开发者ID:johan,项目名称:Knotter,代码行数:7,代码来源:export_dialog.cpp


示例15: GETSTELMODULE

void AngleMeasureDialog::createDialogContent()
{
	am = GETSTELMODULE(AngleMeasure);
	ui->setupUi(dialog);

	// Kinetic scrolling
	kineticScrollingList << ui->aboutTextBrowser;
	StelGui* gui= static_cast<StelGui*>(StelApp::getInstance().getGui());
	enableKineticScrolling(gui->getFlagUseKineticScrolling());
	connect(gui, SIGNAL(flagUseKineticScrollingChanged(bool)), this, SLOT(enableKineticScrolling(bool)));

	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));

	ui->useDmsFormatCheckBox->setChecked(am->isDmsFormat());
	connect(ui->useDmsFormatCheckBox, SIGNAL(toggled(bool)), am, SLOT(useDmsFormat(bool)));
	ui->showPositionAngleCheckBox->setChecked(am->isPaDisplayed());
	connect(ui->showPositionAngleCheckBox, SIGNAL(toggled(bool)), am, SLOT(showPositionAngle(bool)));
	ui->showPositionAngleHorizontalCheckBox->setChecked(am->isHorPaDisplayed());
	connect(ui->showPositionAngleHorizontalCheckBox, SIGNAL(toggled(bool)), am, SLOT(showPositionAngleHor(bool)));
	ui->showEquatorial_GroupBox->setChecked(am->isEquatorial());
	connect(ui->showEquatorial_GroupBox, SIGNAL(toggled(bool)), am, SLOT(showEquatorial(bool)));
	ui->showHorizontal_GroupBox->setChecked(am->isHorizontal());
	connect(ui->showHorizontal_GroupBox, SIGNAL(toggled(bool)), am, SLOT(showHorizontal(bool)));
	ui->azAltStartOnSkyCheckBox->setChecked(am->isHorizontalStartSkylinked());
	connect(ui->azAltStartOnSkyCheckBox, SIGNAL(toggled(bool)), am, SLOT(showHorizontalStartSkylinked(bool)));
	ui->azAltEndOnSkyCheckBox->setChecked(am->isHorizontalEndSkylinked());
	connect(ui->azAltEndOnSkyCheckBox, SIGNAL(toggled(bool)), am, SLOT(showHorizontalEndSkylinked(bool)));

	connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(resetAngleMeasureSettings()));

	setAboutHtml();
}
开发者ID:Stellarium,项目名称:stellarium,代码行数:34,代码来源:AngleMeasureDialog.cpp


示例16: QObject

KNMusicSearchSyntaxEngine::KNMusicSearchSyntaxEngine(QObject *parent) :
    QObject(parent)
{
    //Link with the locale manager.
    knI18n->link(this, &KNMusicSearchSyntaxEngine::retranslate);
    retranslate();
}
开发者ID:AnkyoChu,项目名称:Mu,代码行数:7,代码来源:knmusicsearchsyntaxengine.cpp


示例17: connect

// Initialize the dialog widgets and connect the signals/slots
void TelescopeConfigurationDialog::createDialogContent()
{
	ui->setupUi(dialog);
	
	//Inherited connect
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(buttonDiscardPressed()));
	connect(dialog, SIGNAL(rejected()), this, SLOT(buttonDiscardPressed()));
	
	//Connect: sender, signal, receiver, member
	connect(ui->radioButtonTelescopeLocal, SIGNAL(toggled(bool)), this, SLOT(toggleTypeLocal(bool)));
	connect(ui->radioButtonTelescopeConnection, SIGNAL(toggled(bool)), this, SLOT(toggleTypeConnection(bool)));
	connect(ui->radioButtonTelescopeVirtual, SIGNAL(toggled(bool)), this, SLOT(toggleTypeVirtual(bool)));
	
	connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(buttonSavePressed()));
	connect(ui->pushButtonDiscard, SIGNAL(clicked()), this, SLOT(buttonDiscardPressed()));
	
	connect(ui->comboBoxDeviceModel, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(deviceModelSelected(const QString&)));
	
	//Setting validators
	ui->lineEditTelescopeName->setValidator(telescopeNameValidator);
	ui->lineEditHostName->setValidator(hostNameValidator);
	ui->lineEditCircleList->setValidator(circleListValidator);
	ui->lineEditSerialPort->setValidator(serialPortValidator);
}
开发者ID:EvilTosha,项目名称:Stellarium-GSoC12,代码行数:26,代码来源:TelescopeConfigurationDialog.cpp


示例18: connect

void ScriptConsole::createDialogContent()
{
	ui->setupUi(dialog);
	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));

	highlighter = new StelScriptSyntaxHighlighter(ui->scriptEdit->document());
	ui->includeEdit->setText(StelFileMgr::getInstallationDir() + "/scripts");

	ui->quickrunCombo->addItem(q_("quickrun..."));
	ui->quickrunCombo->addItem(q_("selected text"));
	ui->quickrunCombo->addItem(q_("clear text"));
	ui->quickrunCombo->addItem(q_("clear images"));
	ui->quickrunCombo->addItem(q_("natural"));
	ui->quickrunCombo->addItem(q_("starchart"));

	connect(ui->scriptEdit, SIGNAL(cursorPositionChanged()), this, SLOT(rowColumnChanged()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));
	connect(ui->loadButton, SIGNAL(clicked()), this, SLOT(loadScript()));
	connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(saveScript()));
	connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clearButtonPressed()));
	connect(ui->preprocessSSCButton, SIGNAL(clicked()), this, SLOT(preprocessScript()));
	connect(ui->runButton, SIGNAL(clicked()), this, SLOT(runScript()));
	connect(ui->stopButton, SIGNAL(clicked()), &StelApp::getInstance().getScriptMgr(), SLOT(stopScript()));
	connect(ui->includeBrowseButton, SIGNAL(clicked()), this, SLOT(includeBrowse()));
	connect(ui->quickrunCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(quickRun(int)));
	connect(&StelApp::getInstance().getScriptMgr(), SIGNAL(scriptRunning()), this, SLOT(scriptStarted()));
	connect(&StelApp::getInstance().getScriptMgr(), SIGNAL(scriptStopped()), this, SLOT(scriptEnded()));
	connect(&StelApp::getInstance().getScriptMgr(), SIGNAL(scriptDebug(const QString&)), this, SLOT(appendLogLine(const QString&)));
	connect(&StelApp::getInstance().getScriptMgr(), SIGNAL(scriptOutput(const QString&)), this, SLOT(appendOutputLine(const QString&)));
	ui->tabs->setCurrentIndex(0);
	ui->scriptEdit->setFocus();
}
开发者ID:PhiTheta,项目名称:stellarium,代码行数:33,代码来源:ScriptConsole.cpp


示例19: QWidget

KNMusicPlaylistDisplay::KNMusicPlaylistDisplay(QWidget *parent) :
    QWidget(parent)
{
    //Set properties.
    setContentsMargins(0,0,0,0);

    //Add layout.
    QBoxLayout *displayLayout=new QBoxLayout(QBoxLayout::TopToBottom,
                                             this);
    displayLayout->setContentsMargins(0,0,0,0);
    displayLayout->setSpacing(0);
    setLayout(displayLayout);

    //Initial the labels.
    initialLabels();
    initialTreeView();
    initialControls();

    //Initial information container.
    KNMouseSenseWidget *infoContainer=new KNMouseSenseWidget(this);
    infoContainer->setContentsMargins(20,12,0,8);
    QBoxLayout *infoLayout=new QBoxLayout(QBoxLayout::TopToBottom,
                                          infoContainer);
    infoLayout->setContentsMargins(0,0,0,0);
    infoLayout->setSpacing(0);
    infoContainer->setLayout(infoLayout);

    displayLayout->addWidget(infoContainer);

    //Initial the information label.
    infoLayout->addWidget(m_playlistTitle);
    QBoxLayout *detailLayout=new QBoxLayout(QBoxLayout::LeftToRight,
                                            infoLayout->widget());
    detailLayout->setContentsMargins(0,0,0,0);
    detailLayout->setSpacing(5);
    detailLayout->addWidget(m_playlistDetail);
    detailLayout->addWidget(m_playPlaylist);
    detailLayout->addWidget(m_addToPlaylist);
    detailLayout->addStretch();
    infoLayout->addLayout(detailLayout);

    displayLayout->addWidget(m_playlistTreeView, 1);

    //Initial playlist connection handler.
    m_modelSignalHandler=new KNConnectionHandler(this);

    //Initial the shadow.
    m_leftShadow=new KNSideShadowWidget(LeftShadow, this);

    //Connect search signal.
    connect(KNMusicGlobal::musicSearch(), SIGNAL(requireSearch(QString)),
            this, SLOT(updatePlaylistTitle()));

    //Connect retranslate signal.
    connect(KNGlobal::instance(), &KNGlobal::requireRetranslate,
            this, &KNMusicPlaylistDisplay::retranslate);
    //Do retranslate.
    retranslate();
}
开发者ID:loki1412,项目名称:Mu,代码行数:59,代码来源:knmusicplaylistdisplay.cpp


示例20: QDialog

KCMailReports::KCMailReports(QWidget *parent) :
    QDialog(parent)
{   
    setMinimumSize(480,320);
    mode=BugReportMode;
    titlePrefix[BugReportMode]="Bug: ";
    titlePrefix[FeedbackReportMode]="Feedback: ";
    retranslate();

    pal=palette();
    pal.setColor(QPalette::Highlight, QColor(0,0,0,255));
    setPalette(pal);

    QVBoxLayout *mainLayout=new QVBoxLayout(this);
    setLayout(mainLayout);
    mailTitle=new QLineEdit(this);
    pal=mailTitle->palette();
    pal.setColor(QPalette::Highlight, QColor(0xf7,0xcf,0x3d));
    mailTitle->setPalette(pal);
    mainLayout->addWidget(mailTitle);

    mailContent=new QPlainTextEdit(this);
    pal=mailContent->palette();
    pal.setColor(QPalette::Highlight, QColor(0xf7,0xcf,0x3d));
    mailContent->setPalette(pal);
    mainLayout->addWidget(mailContent, 1);

    buttonLayout=new QHBoxLayout();

    sendReport=new QPushButton(this);
    sendReport->setFixedHeight(30);
    pal=sendReport->palette();
    disabledButtonState();
    buttonLayout->addWidget(sendReport);
    cancelSending=new QPushButton(this);
    cancelSending->setFixedHeight(30);
    cancelSending->setText(tr("Cancel"));
    buttonLayout->addWidget(cancelSending);
    mainLayout->addLayout(buttonLayout);

    setMode(mode);
    instance=KCMailProcessObject::getInstance();
    connect(mailContent, SIGNAL(textChanged()),
            this, SLOT(buttonStatusSet()));
    connect(mailTitle, SIGNAL(textChanged(QString)),
            this, SLOT(buttonStatusSet()));
    connect(sendReport, SIGNAL(clicked()),
            this, SLOT(sendReports()));
    connect(instance, SIGNAL(statusChanged(KCMailProcessObject::SendingStatus)),
            this, SLOT(refreshStatus(KCMailProcessObject::SendingStatus)));
    connect(cancelSending, SIGNAL(clicked()),
            this, SLOT(close()));

    reportStatus=new KCMailSendingStatus(this);
    reportStatus->setGeometry(reportStatus->x(),
                              0-reportStatus->height()-30,
                              reportStatus->width(),
                              reportStatus->height());
}
开发者ID:Kreogist,项目名称:Cuties,代码行数:59,代码来源:kcmailreports.cpp



注:本文中的retranslate函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ retrieveTimelineAgent函数代码示例发布时间:2022-05-30
下一篇:
C++ retain函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap