本文整理汇总了C++中browse函数的典型用法代码示例。如果您正苦于以下问题:C++ browse函数的具体用法?C++ browse怎么用?C++ browse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了browse函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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());
}
开发者ID:VasilyPashkov,项目名称:otf-vis,代码行数:29,代码来源:main_window.cpp
示例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));
}
开发者ID:CJGoch,项目名称:CTK,代码行数:26,代码来源:ctkPathLineEdit.cpp
示例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)
}
开发者ID:k4rm,项目名称:AscoGraph,代码行数:45,代码来源:unrolled_xml_tree_browser.cpp
示例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;
}
开发者ID:guillaume-morin,项目名称:marcoyolo,代码行数:25,代码来源:marcoyolo.c
示例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);
}
开发者ID:AlexSoehn,项目名称:qt-base-deb,代码行数:36,代码来源:window.cpp
示例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());
}
开发者ID:LBdN,项目名称:Shaderkit,代码行数:29,代码来源:importer_wizard.cpp
示例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)));
}
开发者ID:clag,项目名称:morpheo_places,代码行数:29,代码来源:MainWindow.cpp
示例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);
}
开发者ID:normansaez,项目名称:lotuce2,代码行数:30,代码来源:window.cpp
示例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)));
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:28,代码来源:particle_sound_page.cpp
示例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)));
}
开发者ID:victor2002,项目名称:rockbox_victor_clipplus,代码行数:30,代码来源:newprojectdialog.cpp
示例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();
}
开发者ID:MKrishtop,项目名称:Circuit-Board-Routing,代码行数:32,代码来源:mainwindow.cpp
示例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 = "";
}
开发者ID:enGits,项目名称:envisu,代码行数:7,代码来源:reader.cpp
示例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()));
}
开发者ID:yuanjian113,项目名称:qt,代码行数:60,代码来源:QSimpleDownloader.cpp
示例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;
}
开发者ID:CroweCybersecurity,项目名称:shareenum,代码行数:28,代码来源:smb.c
示例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;
}
开发者ID:baka-ai,项目名称:Q-Uma-Download-Manager,代码行数:26,代码来源:moc_dialogsitegrabber.cpp
示例16: QPushButton
void BitmapWidget::setUpForm()
{
mpBrowseBox = new QLineEdit;
mpBrowseButton = new QPushButton(Helper::browse);
mpBrowseButton->setAutoDefault(true);
connect(mpBrowseButton, SIGNAL(clicked()), this, SLOT(browse()));
mpCheckBox = new QCheckBox(tr("Store picture in model"), this);
mpOkButton = new QPushButton(Helper::ok);
mpOkButton->setAutoDefault(false);
connect(mpOkButton, SIGNAL(clicked()), this, SLOT(edit()));
mpCancelButton = new QPushButton(Helper::cancel);
mpCancelButton->setAutoDefault(false);
connect(mpCancelButton, SIGNAL(clicked()), this, SLOT(reject()));
mpButtonBox = new QDialogButtonBox(Qt::Horizontal);
mpButtonBox->addButton(mpOkButton, QDialogButtonBox::ActionRole);
mpButtonBox->addButton(mpCancelButton, QDialogButtonBox::ActionRole);
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(mpBrowseBox, 0, 0);
mainLayout->addWidget(mpBrowseButton, 0, 1);
mainLayout->addWidget(mpCheckBox, 2, 0);
mainLayout->addWidget(mpButtonBox, 3, 0);
setLayout(mainLayout);
}
开发者ID:SemiSQ,项目名称:OpenModelica,代码行数:31,代码来源:BitmapAnnotation.cpp
示例17: QDialog
SelectSoundDialog::SelectSoundDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SelectSoundDialog)
{
ui->setupUi(this);
connect(ui->browseButton,SIGNAL(clicked()),this,SLOT(browse()));
QSettings settings("KitchenAlert","KitchenAlert");
QString filename = settings.value("soundfile").toString();
ui->lineEdit->setText(filename);
bool useDefaultSoundFile = settings.value("UseDefaultSound",true).toBool();
if (useDefaultSoundFile == true)
{
ui->DefaultSoundRadioButton->setChecked(true);
ui->browseButton->setDisabled(true);
ui->lineEdit->setDisabled(true);
}
else ui->CustomSoundRadioButton->setChecked(true);
// qDebug() << "UseDefaultSoundfile is " << useDefaultSoundFile;
isTesting_ = false;
connect(ui->TestButton,SIGNAL(clicked()),this,SLOT(testSound()));
}
开发者ID:helihyv,项目名称:KitchenAlert,代码行数:27,代码来源:selectsounddialog.cpp
示例18: QDialog
RssRegexpDlg::RssRegexpDlg(QWidget* parent)
: QDialog(parent)
{
setupUi(this);
m_regexp.tvs = RssRegexp::None;
connect(lineText, SIGNAL(textChanged(const QString&)), this, SLOT(test()));
connect(lineExpression, SIGNAL(textChanged(const QString&)), this, SLOT(test()));
connect(toolBrowse, SIGNAL(clicked()), this, SLOT(browse()));
connect(radioTVSNone, SIGNAL(toggled(bool)), this, SLOT(updateTVS()));
connect(radioTVSSeason, SIGNAL(toggled(bool)), this, SLOT(updateTVS()));
connect(radioTVSEpisode, SIGNAL(toggled(bool)), this, SLOT(updateTVS()));
connect(radioTVSDate, SIGNAL(toggled(bool)), this, SLOT(updateTVS()));
connect(radioParsingNone, SIGNAL(toggled(bool)), this, SLOT(updateParsing()));
connect(radioParsingExtract, SIGNAL(toggled(bool)), this, SLOT(updateParsing()));
connect(labelManage, SIGNAL(linkActivated(const QString&)), this, SLOT(linkClicked(const QString&)));
m_regexp.includeRepacks = true;
m_regexp.excludeManuals = true;
m_regexp.includeTrailers = false;
m_regexp.addPaused = false;
}
开发者ID:ActionLuzifer,项目名称:fatrat,代码行数:25,代码来源:RssRegexpDlg.cpp
示例19: QDialog
DistributorDialog::DistributorDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::DistributorDialog)
{
ui->setupUi(this);
QString appData(getenv("APPDATA"));
dataFileName = appData.append("\\FileDistributor\\settings.dat");
copier = new Copier();
copier->moveToThread(&workerThread);
dirsModel = new QStringListModel(copier->getDestDirs(), this);
load();
icon = new QSystemTrayIcon(QIcon(":/res/FD.ico"), this);
iconMenu = new QMenu(this);
iconMenu->addAction("Settings", this, SLOT(show()));
iconMenu->addSeparator();
iconMenu->addAction("Close", this, SLOT(quit()));
icon->setContextMenu(iconMenu);
icon->show();
displayMessage("", "FileDistributor is running");
timer = new QTimer(this);
connect(icon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(save()));
connect(ui->sourceDirBrowse, SIGNAL(clicked()), this, SLOT(browse()));
connect(ui->addDirB, SIGNAL(clicked()), this, SLOT(addDest()));
connect(ui->removeDirB, SIGNAL(clicked()), this, SLOT(removeDest()));
connect(timer, SIGNAL(timeout()), copier, SLOT(startCopy()));
connect(this, SIGNAL(startCopy()), copier, SLOT(startCopy()));
connect(copier, SIGNAL(copyStarted()), this, SLOT(copyStarted()));
workerThread.start();
emit startCopy();
timer->start(1000*copier->getRefreshRateSeconds());
}
开发者ID:username115,项目名称:FileDistributor,代码行数:35,代码来源:distributordialog.cpp
示例20: QDialog
SelectPictureDialog::SelectPictureDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SelectPictureDialog)
{
ui->setupUi(this);
connect(ui->browse, SIGNAL(clicked()), this, SLOT(browse()));
}
开发者ID:robcaldecott,项目名称:jupiter,代码行数:8,代码来源:SelectPictureDialog.cpp
注:本文中的browse函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论