示例#1
0
void DirectoryView::slotFolderSelected( QListViewItem *i )
{
	if (!i || !showDirsOnly()) return;

	Directory *dir = reinterpret_cast<Directory*>(i);
	emit folderSelected(dir->fullName());
}
示例#2
0
void DirectoryView::slotFolderSelected( QListViewItem *i )
{
  if ( !i )	return;

  Directory *dir = (Directory*)i;
  emit folderSelected( dir->fullName() );
}
示例#3
0
PathButton::PathButton(QWidget *parent)
    : QPushButton(parent), d(new Data)
{
    QPushButton::setText(d->getText());

    connect(this, &QPushButton::clicked, this, [=] () {
        switch (d->mode) {
        case Folder: {
            const auto ret = getFolder();
            if (!ret.isEmpty()) {
                emit folderSelected(ret);
                if (d->editor)
                    d->prop.write(d->editor, ret);
            }
            break;
        } case SingleFile: {
            const auto ret = getFile();
            if (!ret.isEmpty()) {
                emit fileSelected(ret);
                if (d->editor)
                    d->prop.write(d->editor, ret);
            }
            break;
        } case MultiFile: {
            const auto ret = getFiles();
            if (!ret.isEmpty()) {
                emit filesSelected(ret);
                if (d->editor)
                    d->prop.write(d->editor, ret);
            }
        } default:
            break;
        }
    });
}
示例#4
0
void WatchFolderAdd::folderButtonClicked() {
    QDir dir;
    fileDialog->setDirectory(dir.homePath()+"/");
    fileDialog->setFileMode(QFileDialog::DirectoryOnly);
    connect(fileDialog, SIGNAL(fileSelected(QString)), this, SLOT(folderSelected(QString)));
    fileDialog->exec();
}
示例#5
0
void AudioBrowserScreen::select(int index)
{
    if (listView->isDir(index))
        setDir(currDir + "/" + listView->dir(index));
    else {
        emit folderSelected(currDir, false, 0, 0);
        lower();
    }
}
示例#6
0
bool DirectoryView::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: folderSelected((const QString&)static_QUType_QString.get(_o+1)); break;
    default:
	return QListView::qt_emit(_id,_o);
    }
    return TRUE;
}
示例#7
0
bool FolderPage::validatePage()
{
   if (edtAlias_->text().isEmpty())
   {
      QMessageBox::information(this, tr("Wrong Alias"), 
         tr("Please make up an alias for Maverick Poker Bot. You can use the \"Random\" button to generate a random alias automatically."));
      edtAlias_->setFocus();
      return false;
   }
   emit folderSelected(lePath_->text());
   return true;
}
示例#8
0
MusicWindow::MusicWindow(MusicPlayer* player) 
{
	ui.setupUi(this);

	this->player = player;

	initFolderList();

	// SIGNALS
	connect(ui.folderList, SIGNAL(itemSelectionChanged()), this, SLOT(folderSelected()));
	connect(ui.fileList, SIGNAL(itemSelectionChanged()), this, SLOT(fileSelected()));
}
示例#9
0
void AudioBrowserScreen::folderSelect(bool plus)
{
    QString path = currDir;
    int i = listView->currentItem();
    if (listView->isDir(i)) {
        if (listView->dir(i) == "..") {
            backFolder();
            return;
        }
        path += "/" + listView->dir(i);
    }
    emit folderSelected(path, plus, 0, 0);
    lower();
}