本文整理汇总了C++中browse函数的典型用法代码示例。如果您正苦于以下问题:C++ browse函数的具体用法?C++ browse怎么用?C++ browse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了browse函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connect
void MainWindow::installTool(Tool* controllingWidget)
{
QAction* action = controllingWidget->action();
action->setCheckable(true);
tools_list.push_back(controllingWidget);
sidebarContents->addWidget(controllingWidget);
modeActions->addAction(action);
connect(action, SIGNAL(triggered(bool)),
this, SLOT(actionTriggered()));
connect(controllingWidget, SIGNAL(activateMe()),
this, SLOT(activateTool()));
connect(controllingWidget, SIGNAL(showEvent(Event_model*)),
this, SLOT(showEvent(Event_model*)));
connect(controllingWidget, SIGNAL(showState(State_model*)),
this, SLOT(showState(State_model*)));
connect(controllingWidget, SIGNAL(browse()),
this, SLOT(browse()));
action->setWhatsThis(controllingWidget->whatsThis());
}
示例2: Q_Q
//-----------------------------------------------------------------------------
void ctkPathLineEditPrivate::init()
{
Q_Q(ctkPathLineEdit);
QHBoxLayout* layout = new QHBoxLayout(q);
layout->setContentsMargins(0,0,0,0);
layout->setSpacing(0); // no space between the combobx and button
this->createPathLineEditWidget(true);
this->BrowseButton = new QToolButton(q);
this->BrowseButton->setText("...");
// Don't vertically stretch the path line edit unnecessary
this->BrowseButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored));
this->BrowseButton->setToolTip(ctkPathLineEdit::tr("Open a dialog"));
QObject::connect(this->BrowseButton,SIGNAL(clicked()),
q, SLOT(browse()));
layout->addWidget(this->BrowseButton);
q->setSizePolicy(QSizePolicy(
QSizePolicy::Expanding, QSizePolicy::Fixed,
QSizePolicy::LineEdit));
}
示例3: reset
//______________________________________________________________________________
// control all of the tree browsing is in charge of the S_part visit
// it assumes that the score is a partwise score but the strategy could
// equalli work on a timewise score, provided that the jump information
// is consistent across the different parts.
//
// Jumps are under control of fNextIterator which could be modified by the
// measure visit. Anchor points for future jumps (like segno) are stored
// at S_part level using fStoreIterator pointer.
//
// visit methods can use the fStoreIterator pointer to store the current iterator
// to any ctree<xmlelement>::literator. Using fStoreDelay allows for delayed stores.
//
void unrolled_xml_tree_browser::visitStart( S_part& elt)
{
// first initializes the iterators used to broswe the tree
// segno and coda are initialized to the end of the measures list
fEndIterator = elt->elements().end();
fSegnoIterator= fCodaIterator = fEndIterator;
// stores the first measures and makes a provision for the forward repeat location
ctree<xmlelement>::literator iter = elt->elements().begin();
fFirstMeasure = fForwardRepeat = iter;
fStoreIterator = 0;
fStoreDelay = 0;
reset();
enter(*elt); // normal visit of the part (pass thru)
fForward = false;
// while we're not at the end location (elements().end() is checked for safety reasons only)
while ((iter != fEndIterator) && (iter != elt->elements().end())) {
fNextIterator = iter;
fNextIterator++; // default value for next iterator is the next measure
browse(**iter); // browse the measure
if (fStoreIterator) { // check if we need to store the current iterator
if (fStoreDelay == 0) {
*fStoreIterator = iter;
fStoreIterator = 0;
}
else fStoreDelay--; // this is actually a delayed store
}
iter = fNextIterator; // switch to next iterator (which may be changed by the measure visit)
}
leave(*elt); // normal visit of the part (pass thru)
}
示例4: main
int main (int argc, char** argv) {
int* matrix;
int s_rows,s_cols;
if (argc<3) {
printf("Not enough parameters.\nUsage : %s s_rows n_columns\n", argv[0]);
return 1;
}
s_rows=atoi(argv[1]);
s_cols=atoi(argv[2]);
matrix=calloc(2*s_rows*s_cols,sizeof(int));
display(matrix,s_rows,s_cols);
initialize(matrix,s_rows,s_cols);
display(matrix,s_rows,s_cols);
/* Actual exercise */
browse(matrix,s_rows,s_cols);
destroy(matrix);
return 0;
}
示例5: QWidget
//! [0]
Window::Window(QWidget *parent)
: QWidget(parent)
{
browseButton = createButton(tr("&Browse..."), SLOT(browse()));
findButton = createButton(tr("&Find"), SLOT(find()));
fileComboBox = createComboBox(tr("*"));
textComboBox = createComboBox();
directoryComboBox = createComboBox(QDir::currentPath());
fileLabel = new QLabel(tr("Named:"));
textLabel = new QLabel(tr("Containing text:"));
directoryLabel = new QLabel(tr("In directory:"));
filesFoundLabel = new QLabel;
createFilesTable();
//! [0]
//! [1]
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(fileLabel, 0, 0);
mainLayout->addWidget(fileComboBox, 0, 1, 1, 2);
mainLayout->addWidget(textLabel, 1, 0);
mainLayout->addWidget(textComboBox, 1, 1, 1, 2);
mainLayout->addWidget(directoryLabel, 2, 0);
mainLayout->addWidget(directoryComboBox, 2, 1);
mainLayout->addWidget(browseButton, 2, 2);
mainLayout->addWidget(filesTable, 3, 0, 1, 3);
mainLayout->addWidget(filesFoundLabel, 4, 0, 1, 2);
mainLayout->addWidget(findButton, 4, 2);
setLayout(mainLayout);
setWindowTitle(tr("Find Files"));
resize(700, 300);
}
示例6: QWizard
ImporterWizard::ImporterWizard(ScenePtr scene, QWidget* parent)
: QWizard(parent),
m_first(true),
m_ui(new Ui::ImporterWizard),
m_scene(scene),
m_objects(0),
m_models(0),
m_animations(0),
m_cameras(0),
m_lights(0),
m_materials(0),
m_textures(0)
{
m_ui->setupUi(this);
setButtonText(NextButton, tr("Load file >"));
button(NextButton)->setDisabled(true);
setAttribute(Qt::WA_DeleteOnClose);
connect(m_ui->browse, SIGNAL(clicked()), this, SLOT(browse()));
connect(m_ui->filename, SIGNAL(textChanged(QString)), this, SLOT(fileChanged(QString)));
connect(this, SIGNAL(currentIdChanged(int)), SLOT(changed(int)));
connect(m_ui->manualDrag, SIGNAL(toggled(bool)), this, SLOT(manualDragToggled(bool)));
QSettings settings("Shaderkit", "Shaderkit");
m_ui->autoScale->setChecked(settings.value("import/auto_scale", true).toBool());
m_ui->manualDrag->setChecked(settings.value("import/manual_drag", false).toBool());
}
示例7: QMainWindow
MainWindow::MainWindow(Logger* log, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
pLogger = log;
ui->statusBar->showMessage("Ready to be used");
// Récupération des valeur possibles pour le calcul des voies depuis l'énumération
for (int i = 0; i < WayMethods::numMethods; i++) {
ui->methodComboBox->addItem(WayMethods::MethodeVoies_name[i]);
}
ui->methodComboBox->setCurrentIndex(WayMethods::ANGLE_MIN); // valeur par défaut
// Connexion des messages émis depuis le logger ou la database
connect(pLogger,SIGNAL(information(QString)),this,SLOT(logInformation(QString)));
connect(pLogger,SIGNAL(debug(QString)),this,SLOT(logDebug(QString)));
connect(pLogger,SIGNAL(warning(QString)),this,SLOT(logWarning(QString)));
connect(pLogger,SIGNAL(fatal(QString)),this,SLOT(logFatal(QString)));
connect(ui->calculatePushButton,SIGNAL(clicked()),this,SLOT(calculate()));
connect(ui->modifyPushButton,SIGNAL(clicked()),this,SLOT(modify()));
connect(ui->browsePushButton, SIGNAL(clicked()), this, SLOT(browse()));
connect(ui->classificationRadioButton, SIGNAL(toggled(bool)), this, SLOT(optionsModification(bool)));
}
示例8: QWidget
//! [0]
Window::Window(QWidget *parent)
: QWidget(parent)
{
confBrowseButton = createButton(tr("&Browse..."), SLOT(browse()));
startButton = createButton(tr("&Start"), SLOT(goDarc()));
startButton->setEnabled(false);
cancelButton = createButton(tr("&Cancel"), SLOT(cancel()));
homePath = QDir::homePath()+tr("/lotuce2/conf/");
configFileComboBox = createComboBox(homePath);
configFileLabel = new QLabel(tr("Darc Config File:"));
//! [0]
//! [1]
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(configFileLabel, 0, 0);
mainLayout->addWidget(configFileComboBox, 0, 1);
mainLayout->addWidget(confBrowseButton, 0, 2);
mainLayout->addWidget(cancelButton, 1, 2);
mainLayout->addWidget(startButton, 1, 3);
setLayout(mainLayout);
setWindowTitle(tr("Lotuce2"));
resize(700, 300);
}
示例9: QWidget
CSoundPage::CSoundPage(QWidget *parent)
: QWidget(parent)
{
_ui.setupUi(this);
// setup dialog the sounds gain
_ui.gainWidget->setRange(0.f, 1.f);
_ui.gainWidget->setWrapper(&_GainWrapper);
_ui.gainWidget->setSchemeWrapper(&_GainWrapper);
_ui.gainWidget->init();
// setup dialog the sounds pitch
_ui.pitchWidget->setRange(0.001f, 5.f);
_ui.pitchWidget->setWrapper(&_PitchWrapper);
_ui.pitchWidget->setSchemeWrapper(&_PitchWrapper);
_ui.pitchWidget->init();
// setup dialog the percent of sound emissions
_ui.emissionWidget->setRange(0.f, 1.f);
_ui.emissionWidget->setWrapper(&_EmissionPercentWrapper);
connect(_ui.browsePushButton ,SIGNAL(clicked()), this, SLOT(browse()));
connect(_ui.playPushButton ,SIGNAL(clicked()), this, SLOT(play()));
connect(_ui.spawnCheckBox ,SIGNAL(toggled(bool)), this, SLOT(setSpawn(bool)));
connect(_ui.muteCheckBox ,SIGNAL(toggled(bool)), this, SLOT(setMute(bool)));
connect(_ui.keepPitchCheckBox ,SIGNAL(toggled(bool)), this, SLOT(setKeepPitch(bool)));
connect(_ui.soundNameLineEdit ,SIGNAL(textChanged(QString)), this, SLOT(setSoundName(QString)));
}
示例10: QDialog
NewProjectDialog::NewProjectDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::NewProjectDialog)
{
ui->setupUi(this);
/* Getting the default directory from the application settings */
QSettings settings;
settings.beginGroup("NewProjectDialog");
ui->locationBox->setText(settings.value("defaultDir",
QDir::home().absolutePath())
.toString());
settings.endGroup();
/* Populating the target box */
TargetData targets;
for(int i = 0; i < targets.count(); i++)
{
ui->targetBox->insertItem(i, QIcon(), targets.name(i), targets.id(i));
}
targetChange(0);
/* Connecting the browse button and target box */
QObject::connect(ui->browseButton, SIGNAL(clicked()),
this, SLOT(browse()));
QObject::connect(ui->targetBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(targetChange(int)));
}
示例11: QWidget
MainWindow::MainWindow(QWidget *parent) :
QWidget(parent)
{
renderArea = new RenderArea;
qEdit1 = new QLineEdit(tr("Path..."));
//qEdit1->text(tr("Path..."));
qLabel1 = new QLabel(tr("&Input file:"));
qLabel1->setBuddy(qEdit1);
qButton1 = new QPushButton(tr("&Browse"));
connect(qButton1, SIGNAL(clicked()), this, SLOT(browse()));
QGridLayout *mainLayout = new QGridLayout;
mainLayout->setColumnStretch(0, 1);
mainLayout->setColumnStretch(3, 1);
mainLayout->setRowMinimumHeight(1, 6);
mainLayout->addWidget(qLabel1, 2, 1, Qt::AlignRight);
mainLayout->addWidget(qEdit1, 2, 2, Qt::AlignRight);
mainLayout->addWidget(qButton1, 2, 3, Qt::AlignRight);
mainLayout->addWidget(renderArea, 3, 0, 1, 4);
setLayout(mainLayout);
setWindowTitle(tr("L6V14_oapsois"));
this->setMinimumHeight(100);
this->setMinimumWidth(300);
mLogic = new MLogic();
}
示例12: GuiWsItem
Reader::Reader(WorkSpace *ws) : GuiWsItem(ws)
{
connect(m_Dlg.ui.apply_pb, SIGNAL(clicked()), this, SLOT(apply()));
connect(m_Dlg.ui.help_pb, SIGNAL(clicked()), this, SLOT(help()));
connect(m_Dlg.ui.browse_pb, SIGNAL(clicked()), this, SLOT(browse()));
m_Formats = "";
}
示例13: QWidget
QSimpleDownloader::QSimpleDownloader(QWidget *parent)
: QWidget(parent)
{
labelUrl = new QLabel(tr("&URL:"));
labelUrl->setFixedWidth(60);
labelUrl->setAlignment(Qt::AlignRight);
editUrl = new QLineEdit();
labelUrl->setBuddy(editUrl);
QHBoxLayout *topLayout = new QHBoxLayout();
topLayout->addWidget(labelUrl);
topLayout->addWidget(editUrl);
labelSaveTo = new QLabel(tr("&Save To:"));
labelSaveTo->setFixedWidth(60);
labelSaveTo->setAlignment(Qt::AlignRight);
editSaveTo = new QLineEdit();
labelSaveTo->setBuddy(editSaveTo);
btnBrowse = new QPushButton(tr("&Browse..."));
QHBoxLayout *midLayout = new QHBoxLayout();
midLayout->addWidget(labelSaveTo);
midLayout->addWidget(editSaveTo);
midLayout->addWidget(btnBrowse);
btnSetting = new QPushButton(tr("Se&tting..."));
btnAbout = new QPushButton(tr("&About..."));
btnAboutQt = new QPushButton(tr("About &Qt..."));
btnAboutQt->setStatusTip(tr("Show the Qt library's About box"));
btnDownload = new QPushButton(tr("&Download"));
btnExit = new QPushButton(tr("E&xit"));
QHBoxLayout *midLayout2 = new QHBoxLayout();
midLayout2->addWidget(btnSetting);
midLayout2->addWidget(btnAbout);
midLayout2->addWidget(btnAboutQt);
midLayout2->addStretch();
midLayout2->addWidget(btnDownload);
midLayout2->addWidget(btnExit);
outputList = new QListWidget();
QVBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->addLayout(topLayout);
mainLayout->addLayout(midLayout);
mainLayout->addLayout(midLayout2);
mainLayout->addWidget(outputList);
setLayout(mainLayout);
setWindowTitle(tr("Qt Simple Downloader"));
this->resize(600, 480);
optionDlg = new OptionDlg(this);
optionDlg->setWindowTitle(tr("Option"));
optionDlg->resize(480, 320);
connect(btnBrowse, SIGNAL(clicked()), this, SLOT(browse()));
connect(btnSetting, SIGNAL(clicked()), this, SLOT(setting()));
connect(btnAbout, SIGNAL(clicked()), this, SLOT(about()));
connect(btnAboutQt, SIGNAL(clicked()), qApp, SLOT(aboutQt()));
connect(btnDownload, SIGNAL(clicked()), this, SLOT(download()));
connect(btnExit, SIGNAL(clicked()), this, SLOT(close()));
}
示例14: runtarget
smbresultlist* runtarget(char *target, int maxdepth) {
SMBCCTX *context;
char buf[256];
smbresultlist *res = NULL;
//Try to create a context, if it's null that means we failed, so let the user know.
if((context = create_context()) == NULL) {
smbresult *tmp = createSMBResultEmpty();
parse_smburl(target, &tmp->host, &tmp->share, &tmp->object);
tmp->statuscode = errno;
smbresultlist_push(&res, tmp);
return res;
}
//Check to see if the target has smb:// in front, if not add it.
if(strncmp("smb://", target, 6) != 0) {
snprintf(buf, sizeof(buf), "smb://%s", target);
} else {
strncpy(buf, target, strlen(target) + 1);
}
//Browse to our file and get the goods
res = browse(context, buf, maxdepth, 0);
//Delete our context, so there's less segfaults.
delete_context(context);
return res;
}
示例15: switch
int DialogSiteGrabber::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: runProject((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3])),(*reinterpret_cast< QStringList(*)>(_a[4]))); break;
case 1: next(); break;
case 2: back(); break;
case 3: run(); break;
case 4: cancel(); break;
case 5: addFilter(); break;
case 6: browse(); break;
case 7: pageChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 8: typeChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 9: lePNameChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 10: lePDirChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 11: lePURLChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
case 12: leFTPURLChanged((*reinterpret_cast< QString(*)>(_a[1]))); break;
default: ;
}
_id -= 13;
}
return _id;
}