コード例 #1
0
bool HelloWorld::onTouchBegan(Touch *touch, Event *unused_event)
{
    string filePath = browseFolder();
    
    convert(filePath);
    
    return true;
}
コード例 #2
0
void ProjectConfigDialog::onButtonAddSearchPathClicked(void)
{
    string dir = browseFolder(m_project.getProjectDir());
    if (dir.length() > 0)
    {
        m_project.addPackagePath(dir);
        updatePackagePath();
    }
}
コード例 #3
0
void ProjectConfigDialog::onSelectProjectDir(void)
{
    string dir = browseFolder(m_project.getProjectDir());
    if (dir.length() > 0)
    {
        m_project.setProjectDir(dir);
        updateProjectDir();
        updateScriptFile();
        updatePackagePath();
    }
}
コード例 #4
0
InstallTalkWindow::InstallTalkWindow(QWidget *parent) : QDialog(parent)
{
    ui.setupUi(this);
    talkcreator = new TalkFileCreator(this);

    connect(ui.buttonBrowse, SIGNAL(clicked()), this, SLOT(browseFolder()));
    connect(ui.change,SIGNAL(clicked()),this,SLOT(change()));

    ui.recursive->setChecked(true);
    ui.GenerateOnlyNew->setChecked(true);
    ui.StripExtensions->setChecked(true);
    
    updateSettings();
}
コード例 #5
0
ファイル: NewFileDialog.cpp プロジェクト: Ryp/GLShaderDev
NewFileDialog::NewFileDialog(QWidget *parent)
: QDialog(parent),
  _shaderCombo(new QComboBox),
  _folderLineEdit(new QLineEdit),
  _fileNameLineEdit(new QLineEdit),
  _newButton(new QPushButton(QIcon(":/document-new.png"), tr("&New"))),
  _cancelButton(new QPushButton(QIcon(":/dialog-cancel.png"), tr("&Cancel"))),
  _browseButton(new QPushButton(QIcon(":/document-open-folder.png"), tr("&Browse...")))
{
  QGroupBox* typeGroupBox = new QGroupBox(tr("Properties"));
  QGroupBox* locationGroupBox = new QGroupBox(tr("File Location"));

  QFormLayout* propertiesLayout = new QFormLayout;
  propertiesLayout->setAlignment(Qt::AlignLeft);
  _fileNameLineEdit->setPlaceholderText(tr("Shader Identifier..."));
  propertiesLayout->addRow(tr("Identifier:"), _fileNameLineEdit);
  _shaderCombo->insertItem(0, tr("Vertex Shader"), ShaderObject::VertexShader);
  _shaderCombo->insertItem(1, tr("Tesselation Evaluation Shader"), ShaderObject::TesselationControlShader);
  _shaderCombo->insertItem(2, tr("Tesselation Evaluation Shader"), ShaderObject::TesselationEvaluationShader);
  _shaderCombo->insertItem(3, tr("Geometry Shader"), ShaderObject::GeometryShader);
  _shaderCombo->insertItem(4, tr("Fragment Shader"), ShaderObject::FragmentShader);
  propertiesLayout->addRow(tr("Type:"), _shaderCombo);

  QHBoxLayout* locationLayout = new QHBoxLayout;
  locationLayout->addWidget(new QLabel(tr("Location:")));
  _folderLineEdit->setPlaceholderText(tr("Folder..."));
  _folderLineEdit->setMinimumWidth(300);
  locationLayout->addWidget(_folderLineEdit);
  locationLayout->addWidget(_browseButton);

  QBoxLayout* buttonsLayout = new QBoxLayout(QBoxLayout::LeftToRight);
  buttonsLayout->setAlignment(Qt::AlignRight);
  buttonsLayout->addWidget(_newButton);
  buttonsLayout->addWidget(_cancelButton);

  locationGroupBox->setLayout(locationLayout);
  typeGroupBox->setLayout(propertiesLayout);

  QVBoxLayout* mainLayout = new QVBoxLayout(this);
  mainLayout->addWidget(typeGroupBox);
  mainLayout->addWidget(locationGroupBox);
  mainLayout->addLayout(buttonsLayout);

  connect(_browseButton, SIGNAL(clicked()), this, SLOT(browseFolder()));
  connect(_newButton, SIGNAL(clicked()), this, SLOT(accept()));
  connect(_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));

  _newButton->setDefault(true);
  setWindowTitle(tr("New Shader File"));
}
コード例 #6
0
void AudioBrowserScreen::init()
{
    connect(buttons[EXIT], SIGNAL(clicked()), this, SLOT(lower()));
    connect(buttons[DOWN], SIGNAL(clicked()), listView, SLOT(scrollDown()));
    connect(buttons[UP], SIGNAL(clicked()), listView, SLOT(scrollUp()));
    connect(buttons[PGDOWN], SIGNAL(clicked()), listView,SLOT(scrollPageDown()));
    connect(buttons[PGUP], SIGNAL(clicked()), listView, SLOT(scrollPageUp()));
    connect(buttons[SELECT], SIGNAL(clicked()), this, SLOT(selectFolder()));
    connect(buttons[PLUS], SIGNAL(clicked()), this, SLOT(selectFolderPlus()));
    connect(buttons[BACK], SIGNAL(clicked()), this, SLOT(backFolder()));
    connect(buttons[BROWSE], SIGNAL(clicked()), this, SLOT(browseFolder()));
    connect(listView,SIGNAL(highlighted(int)),this,SLOT(highlight(int)));
    connect(listView,SIGNAL(selected(int)),this, SLOT(select(int)));

    setDir(rootDir);
}
コード例 #7
0
ファイル: list.c プロジェクト: rjknight123/asuswrt-merlin
int browse_to_tree(char *parenthref,Server_TreeNode *node)
{
    //printf("browse_to_tree node parenthref is %s\n",parenthref);
    Browse *br = NULL;
    int fail_flag = 0;
    //int loop;
    //int i;

    Server_TreeNode *tempnode = NULL, *p1 = NULL,*p2 = NULL;
    tempnode = create_server_treeroot();
    tempnode->level = node->level + 1;

    tempnode->parenthref = my_str_malloc((size_t)(strlen(parenthref)+1));

    br = browseFolder(parenthref);
    sprintf(tempnode->parenthref,"%s",parenthref);

    if(NULL == br)
    {
        free_server_tree(tempnode);
        //printf("browse folder failed\n");
        return -1;
    }

    tempnode->browse = br;

    if(node->Child == NULL)
    {
        node->Child = tempnode;
    }
    else
    {
        //printf("have child\n");
        p2 = node->Child;
        p1 = p2->NextBrother;

        while(p1 != NULL)
        {
            //printf("p1 nextbrother have\n");
            p2 = p1;
            p1 = p1->NextBrother;
        }

        p2->NextBrother = tempnode;
        tempnode->NextBrother = NULL;
    }

    //printf("browse folder num is %d\n",br->foldernumber);
    CloudFile *de_foldercurrent;
    de_foldercurrent = br->folderlist->next;
    while(de_foldercurrent != NULL && !exit_loop)
    {
        if(browse_to_tree(de_foldercurrent->href,tempnode) == -1)
        {
            fail_flag = 1;
            break;
        }
        de_foldercurrent = de_foldercurrent->next;
    }
    /*for( i= 0; i <br->foldernumber;i++)
    {
        id = (br->folderlist)[i]->id;

        if(browse_to_tree(username,id,xmlfilename,tempnode) == -1)
        {
            fail_flag = 1;
        }
    }*/
    if(exit_loop)
        fail_flag = 1;
    //free_server_list(br);
    //my_free(br);

    return (fail_flag == 1) ? -1 : 0 ;

}