当前位置: 首页>>代码示例>>C++>>正文


C++ setupConnections函数代码示例

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


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

示例1: setup

void
setup(GtkWidget *widget)
{
    GtkWidgetProps props(widget);
    if (widget && GTK_IS_SCROLLED_WINDOW(widget) &&
        !props->scrolledWindowHacked) {
        GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(widget);
        GtkWidget *child;

        if ((child = gtk_scrolled_window_get_hscrollbar(scrolledWindow))) {
            setupConnections(child, widget);
        }
        if ((child = gtk_scrolled_window_get_vscrollbar(scrolledWindow))) {
            setupConnections(child, widget);
        }
        if ((child = gtk_bin_get_child(GTK_BIN(widget)))) {
            if (GTK_IS_TREE_VIEW(child) || GTK_IS_TEXT_VIEW(child) ||
                GTK_IS_ICON_VIEW(child)) {
                setupConnections(child, widget);
            } else if (oneOf(gTypeName(child), "ExoIconView",
                             "FMIconContainer")) {
                setupConnections(child, widget);
            }
        }
        props->scrolledWindowHacked = true;
    }
}
开发者ID:KDE,项目名称:qtcurve,代码行数:27,代码来源:scrolledwindow.cpp

示例2: setupConnections

    void ChainLink::setupCommunication(const KoFilter *const parentFilter) const
    {
        if (!parentFilter)
            return;

        const QMetaObject *const parent = parentFilter->metaObject();
        const QMetaObject *const child = m_filter->metaObject();
        if (!parent || !child)
            return;

        setupConnections(parentFilter, m_filter);
        setupConnections(m_filter, parentFilter);
    }
开发者ID:KDE,项目名称:koffice,代码行数:13,代码来源:KoFilterChainLink.cpp

示例3: QMainWindow

Kaqtoos::Kaqtoos()
	: QMainWindow(),
	  downloadManager(this),
	  isOAuthUserConnected(false)
{
	oauthRequest = new KQOAuthRequest();
	oauthManager = new KQOAuthManager(this);

	setupUi();
	setupActions();
	setupConnections();
	
	publicXmlUrls <<
		QString("http://api.kactoos.com/br/api/products/get-product-list/format/xml/oauth_consumer_key/%1/limit/30/orderby/new-products").arg(consumerKey) <<
		QString("http://api.kactoos.com/br/api/products/get-product-list/format/xml/oauth_consumer_key/%1/limit/30/orderby/popular").arg(consumerKey) <<
		QString("http://api.kactoos.com/br/api/products/get-product-list/format/xml/oauth_consumer_key/%1/limit/30/orderby/economic").arg(consumerKey);

	// start downloading
	downloadManager.append(publicXmlUrls);

	// NOTE: just for test
	QGraphicsScene *scene = new QGraphicsScene();

	ProductItem *item = new ProductItem();
	item->setImage("http://www.kactoos.com/libraries/thumb/?src=/images/products/5791_3556942391.jpg");
	
	scene->addItem(item);
	allProductsView->setScene(scene);

	setWindowTitle(tr("KaQToos"));
	resize(QSize(600, 480));
}
开发者ID:ftonello,项目名称:KaQToos,代码行数:32,代码来源:kaqtoos.cpp

示例4: QObject

Receiver::Receiver(int rx)
	: QObject()
	, set(Settings::instance())
	, m_filterMode(set->getCurrentFilterMode())
	, m_stopped(false)
	, m_receiver(rx)
	, m_samplerate(set->getSampleRate())
	, m_audioMode(1)
	//, m_calOffset(63.0)
	//, m_calOffset(33.0)
{
	setReceiverData(set->getReceiverDataList().at(m_receiver));

	InitCPX(inBuf, BUFFER_SIZE, 0.0f);
	InitCPX(outBuf, BUFFER_SIZE, 0.0f);

	newSpectrum.resize(BUFFER_SIZE*4);

	qtdsp = 0;

	setupConnections();

	highResTimer = new HResTimer();
	m_displayTime = (int)(1000000.0/set->getFramesPerSecond(m_receiver));

	m_smeterTime.start();
}
开发者ID:amontefusco,项目名称:cudaSDR,代码行数:27,代码来源:cusdr_receiver.cpp

示例5: DetailsUiControl

StylesUiControl::StylesUiControl(QWidget *p, FormatOptions *f,
                                 QObject *parent) :
    DetailsUiControl(p, f, parent)
{
    setupUi();
    setupConnections();
}
开发者ID:amilaperera,项目名称:clang-format-gui,代码行数:7,代码来源:StylesUiControl.cpp

示例6: QMainWindow

MainWindow::MainWindow(QWidget* parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow),
  scene(new Scene(config))
{
  ui->setupUi(this);

  ui->actionNew->setShortcut(QKeySequence::New);
  ui->actionSave->setShortcut(QKeySequence::Save);
  ui->actionQuit->setShortcut(QKeySequence::Quit);

  ui->sourceWidget->setupObjects("source", config.get_default_objects());
  ui->destinationWidget->setupObjects("destination", config.get_default_objects());
  ui->filterWidget->setupObjects("filter", config.get_default_objects());
  ui->templateWidget->setupObjects("template", config.get_default_objects());
  ui->rewriteWidget->setupObjects("rewrite", config.get_default_objects());
  ui->parserWidget->setupObjects("parser", config.get_default_objects());

  ui->sceneScrollArea->setWidget(scene);

  setupConnections();

  ui->actionLogStatement->trigger();  // the Scene widget has a LogStatement by default
  last_saved_config = QString::fromStdString(config.to_string());  // empty config contains version information
}
开发者ID:mamenyaka,项目名称:syslog-ng-config-qt,代码行数:25,代码来源:mainwindow.cpp

示例7: QPushButton

BookmarksWindow::BookmarksWindow()
{
	bookmarksTreeWidget = new QTreeWidget;
	addButton = new QPushButton(tr("Add"));
	closeButton = new QPushButton(tr("Close"));
	loadButton = new QPushButton(tr("Load"));
	saveButton = new QPushButton(tr("Save"));
	removeButton = new QPushButton(tr("Remove"));
	openButton = new QPushButton(tr("Open"));
	buttonsLayout = new QHBoxLayout;
	mainLayout = new QVBoxLayout;
	addBookmarkWindow = new AddBookmarkWindow;
	QTreeWidgetItem *item = new QTreeWidgetItem;
	item->setText(0, tr("Title"));
	item->setText(1,tr("Url"));
	bookmarksTreeWidget->setHeaderItem(item);
	buttonsLayout->addWidget(loadButton);
	buttonsLayout->addWidget(saveButton);
	buttonsLayout->addWidget(addButton);
	buttonsLayout->addWidget(removeButton);
	buttonsLayout->addWidget(openButton);
	buttonsLayout->addWidget(closeButton);
	mainLayout->addWidget(bookmarksTreeWidget);
	mainLayout->addLayout(buttonsLayout);
	mainLayout->setContentsMargins(5,25,5,5);
	setLayout(mainLayout);
        setTitle(tr("WebRender Bookmarks"));
	setupConnections();
}
开发者ID:JHooverman,项目名称:WebRender-1.0,代码行数:29,代码来源:bookmarkswindow.cpp

示例8: QDialog

/** Creates a new VolumeGroupDialog
    @param parent pointer to the parent widget
    @param vgName Volume Group name
    @param pvList List of LVM Physical Volumes used to create Volume Group
*/
VolumeGroupDialog::VolumeGroupDialog(QWidget* parent, QString& vgName, QStringList& pvList) :
    QDialog(parent),
    m_DialogWidget(new VolumeGroupWidget(this)),
    m_TargetName(vgName),
    m_TargetPVList(pvList),
    m_IsValidSize(false),
    m_IsValidName(true),
    m_TotalSize(0),
    m_TotalUsedSize(0),
    m_ExtentSize(0)
{
    mainLayout = new QVBoxLayout(this);
    setLayout(mainLayout);
    mainLayout->addWidget(&dialogWidget());

    dialogButtonBox = new QDialogButtonBox;
    okButton = dialogButtonBox->addButton(QDialogButtonBox::Ok);
    cancelButton = dialogButtonBox->addButton(QDialogButtonBox::Cancel);
    mainLayout->addWidget(dialogButtonBox);

    cancelButton->setFocus();
    cancelButton->setDefault(true);

    setupDialog();
    setupConstraints();
    setupConnections();
}
开发者ID:tctara,项目名称:partitionmanager,代码行数:32,代码来源:volumegroupdialog.cpp

示例9: addTimer

void AbstractNetworkJob::adoptRequest(QNetworkReply *reply)
{
    addTimer(reply);
    setReply(reply);
    setupConnections(reply);
    newReplyHook(reply);
}
开发者ID:uniblockchain,项目名称:client,代码行数:7,代码来源:abstractnetworkjob.cpp

示例10: setupOnlineCheck

PreferencesDialog::PreferencesDialog(QWidget *parent)
  : QDialog{parent}
  , ui{new Ui::PreferencesDialog}
  , m_cfg{Util::Settings::get()}
{
  ui->setupUi(this);

  // GUI page
  setupOnlineCheck();
  setupInterfaceLanguage();
  setupJobsJobOutput();
  setupCommonLanguages();
  setupCommonCountries();
  setupCommonCharacterSets();

  // Merge page
  ui->cbMAutoSetFileTitle->setChecked(m_cfg.m_autoSetFileTitle);
  ui->cbMSetAudioDelayFromFileName->setChecked(m_cfg.m_setAudioDelayFromFileName);
  Util::setupLanguageComboBox(*ui->cbMDefaultTrackLanguage, m_cfg.m_defaultTrackLanguage);
  Util::setupCharacterSetComboBox(*ui->cbMDefaultSubtitleCharset, m_cfg.m_defaultSubtitleCharset);

  setupProcessPriority();
  setupPlaylistScanningPolicy();
  setupOutputFileNamePolicy();

  // Chapter editor page
  Util::setupLanguageComboBox(*ui->cbCEDefaultLanguage, m_cfg.m_defaultChapterLanguage);
  Util::setupCountryComboBox(*ui->cbCEDefaultCountry, m_cfg.m_defaultChapterCountry, true, QY("– no selection by default –"));

  // Force scroll bars on combo boxes with a high number of entries.
  ui->cbMDefaultSubtitleCharset->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
  ui->cbCEDefaultCountry       ->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);

  setupConnections();
}
开发者ID:autoscatto,项目名称:mkvtoolnix,代码行数:35,代码来源:preferences_dialog.cpp

示例11: setupUi

MainMenu::MainMenu(QWidget *parent) 
{
	QString menuFile ;

	menuFile = ROOTMENU_PREFIX ;
	menuFile.append(ROOTMENU_POSTFIX) ;

	setupUi(this); 

	model = new FileBasedMenuModel(this);
	model->loadFromFile(menuFile);
	logoLabel->setVisible(true);
	titleLabel->setVisible(false);

	listView->setModel(model);
	listView->setFocus();
	listView->setCurrentIndex(model->index(0,0));

	setupConnections();

	contextMenu = new QMenu(this);
	QFont myfont = font();
	myfont.setPointSize(20);
	contextMenu->setFont(myfont);

	QAction *rebootAction = new QAction(tr("System Reboot"),this);
	connect(rebootAction,SIGNAL(triggered()),this,SLOT(onRebootAction()));
	contextMenu->addAction(rebootAction);
}
开发者ID:neuros,项目名称:app-mainmenu,代码行数:29,代码来源:mainmenu.cpp

示例12: getRequest

void DetermineAuthTypeJob::start()
{
    QNetworkReply *reply = getRequest(account()->davPath());
    setReply(reply);
    setupConnections(reply);
    AbstractNetworkJob::start();
}
开发者ID:AppSync1024,项目名称:client,代码行数:7,代码来源:owncloudsetupwizard.cpp

示例13: VariableListener

	ThymioVPLStandalone::ThymioVPLStandalone(QVector<QTranslator*> translators, const QString& commandLineTarget, bool useAnyTarget, bool debugLog, bool execFeedback):
		VariableListener(new TargetVariablesModel(this)),
		// create target
		target(new DashelTarget(translators, commandLineTarget)),
		// options
		useAnyTarget(useAnyTarget),
		debugLog(debugLog),
		execFeedback(execFeedback),
		// setup initial values
		id(0),
		vpl(0),
		allocatedVariablesCount(0),
		getDescriptionTimer(0)
	{
		subscribeToVariableOfInterest(ASEBA_PID_VAR_NAME);
		
		// create gui
		setupWidgets();
		setupConnections();
		
		// when everything is ready, get description
		target->broadcastGetDescription();
		
		// resize if not android
		#ifndef ANDROID
		resize(1000,700);
		#endif // ANDROID
	}
开发者ID:benzonico,项目名称:aseba,代码行数:28,代码来源:ThymioVPLStandalone.cpp

示例14: QSortFilterProxyModel

UProcessView::UProcessView(QWidget *parent /*= 0*/)
:QTableView(parent)
,killProcessAction_(0)
,selectColumnAction_(0)
{
    //设置Model。
    QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this);
    UProcessModel *processModel = new UProcessModel(this);
    connect(this,SIGNAL(processTerminated(unsigned int)),processModel,SLOT(refresh()));

    proxyModel->setSourceModel(processModel);
    proxyModel->setDynamicSortFilter(true);
    proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
    setModel(proxyModel);
    setSortingEnabled(true);
    
    setSelectionBehavior(QAbstractItemView::SelectRows);
    horizontalHeader()->setStretchLastSection(true);
    verticalHeader()->hide();
    setSelectionMode(QAbstractItemView::SingleSelection);

    setContextMenuPolicy(Qt::ActionsContextMenu);
    setupActions();

    setupConnections();
}
开发者ID:gauldoth,项目名称:UniCore,代码行数:26,代码来源:UProcessView.cpp

示例15: xml

void RequestEtagJob::start()
{
    QNetworkRequest req;
    // Let's always request all entries inside a directory. There are/were bugs in the server
    // where a root or root-folder ETag is not updated when its contents change. We work around
    // this by concatenating the ETags of the root and its contents.
    req.setRawHeader("Depth", "1");
    // See https://github.com/owncloud/core/issues/5255 and others

    QByteArray xml("<?xml version=\"1.0\" ?>\n"
                   "<d:propfind xmlns:d=\"DAV:\">\n"
                   "  <d:prop>\n"
                   "    <d:getetag/>\n"
                   "  </d:prop>\n"
                   "</d:propfind>\n");
    QBuffer *buf = new QBuffer(this);
    buf->setData(xml);
    buf->open(QIODevice::ReadOnly);
    // assumes ownership
    setReply(davRequest("PROPFIND", path(), req, buf));
    buf->setParent(reply());
    setupConnections(reply());

    if( reply()->error() != QNetworkReply::NoError ) {
        qDebug() << "getting etag: request network error: " << reply()->errorString();
    }
    AbstractNetworkJob::start();
}
开发者ID:alanljj,项目名称:client,代码行数:28,代码来源:networkjobs.cpp


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