Exemple #1
0
QVariant BrowseCommand::operator()(const QVariantMap &request)
{
    QString caption = request.contains("caption") ? request["caption"].toString() : "";
    if(request.contains("type"))
    {
        QString type = request["type"].toString();

        if(type == "save")
        {
            return browseNewFile(caption);
        }
        else
        if(type=="open")
        {
            QString extensions = request.contains("extensions")?request["extensions"].toString():"";
            return browseFile(caption, extensions);
        }
        else
        if(type=="directory")
        {
            return browseDirectory(caption);
        }
        else
        {
            return QVariant::fromValue(false); //type not known
        }
    }
    return browseDirectory(caption);
}
Exemple #2
0
	bool MpkManip::addDir(const char* sourceDir,const char* targetDir,bool replaceExist,bool compress,bool encrypt,IMpkManipCallback *pCallback,void *p)
	{
		_Data data;
		data.pThis = this;
		data.bReplaceExist = replaceExist;
		data.pCallback = pCallback;
		data.pCallbackData = p;
		data.compress = compress;
		data.encrypt = encrypt;
		return browseDirectory(sourceDir,targetDir,dirProc,fileProc,(uint)&data,bdm_file|bdm_dir);
	}
Exemple #3
0
//---------------------------------------------------------------------------
// AdHash
// (c) 2015 Razen M. AlHarbi. Web site: http://cloud.kaust.edu.sa/Pages/adhash.aspx
//
// This work is licensed under the Creative Commons
// Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy
// of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/
// or send a letter to Creative Commons, 171 Second Street, Suite 300,
// San Francisco, California, 94105, USA.
//---------------------------------------------------------------------------
LoadDataDialog::LoadDataDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LoadDataDialog)
{
    ui->setupUi(this);
    QPalette palette = ui->frame->palette();
    palette.setColor( backgroundRole(), QColor(236, 232, 228) );
    ui->frame->setPalette( palette );
    ui->frame->setAutoFillBackground( true );
    cachedPath = QDir::home().path();
    connect(ui->browseButton, SIGNAL(clicked()), this, SLOT(browseFile()));
    connect(ui->browseButton_2, SIGNAL(clicked()), this, SLOT(browseDirectory()));
    connect(ui->browseButton_3, SIGNAL(clicked()), this, SLOT(browseDirectory2()));
}
DGLRunAppProjectFactory::DGLRunAppProjectFactory() {
    m_ui.setupUi(&m_gui);

#ifndef _WIN32
    m_ui.radioButton_ModeWGLGLX->setText("GLX");
#endif

    CONNASSERT(m_ui.lineEdit_Executable, SIGNAL(editingFinished()), this,
               SLOT(updatePath()));
    CONNASSERT(m_ui.toolButton_Exec, SIGNAL(clicked()), this,
               SLOT(browseExecutable()));
    CONNASSERT(m_ui.toolButton_Dir, SIGNAL(clicked()), this,
               SLOT(browseDirectory()));
    m_ui.lineEdit_Executable->setFocus();
}
Exemple #5
0
QVariant BrowseCommand::operator()()
{
    return browseDirectory("");
}
Exemple #6
0
void HgCloneDialog::slotBrowseSourceClicked()
{
    browseDirectory(m_source);
}
Exemple #7
0
void HgCloneDialog::slotBrowseDestClicked()
{
    browseDirectory(m_destination);
}
Exemple #8
0
LRESULT DownloadPage::onClickedBrowseTempDir(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
  browseDirectory(IDC_TEMP_DOWNLOAD_DIRECTORY);
  return 0;
}