Exemplo n.º 1
0
FileBrowser::FileBrowser(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::FileBrowser),
    historyPosition(0),
    model(0)
{
    ui->setupUi(this);

    actRename = new QAction(tr("Rename"),ui->treeFiles);
    actRename->setShortcut(Qt::Key_F2);
    actRename->setShortcutContext(Qt::WidgetWithChildrenShortcut);
    ui->treeFiles->addAction(actRename);
    connect(actRename,SIGNAL(triggered()),
            this,SLOT(Rename()));

    actDel = new QAction(QIcon(":/img16x16/delete.png"),tr("Delete"),ui->treeFiles);
    actDel->setShortcut(Qt::Key_Delete);
    actDel->setShortcutContext(Qt::WidgetWithChildrenShortcut);
    connect(actDel,SIGNAL(triggered()),
            this,SLOT(DeleteSelectedFile()));
    ui->treeFiles->addAction(actDel);

    actNewFolder = new QAction(QIcon(":img16x16/folder.png"),tr("New Folder"),ui->treeFiles);
    connect(actNewFolder,SIGNAL(triggered()),
            this,SLOT(NewFolder()));
    ui->treeFiles->addAction(actNewFolder);

    connect(ui->treeFiles, SIGNAL(customContextMenuRequested(QPoint)),
            this, SLOT(OnContextMenu(QPoint)));
}
Exemplo n.º 2
0
void MainWindow::connectland()
{
	connect(Btn_Close, SIGNAL(clicked()), qApp, SLOT(closeAllWindows()));
	connect(Btn_First_Ignore, SIGNAL(clicked()),this, SLOT(START_IgnorePath()));
	connect(Btn_First_Ok, SIGNAL(clicked()),this, SLOT(START_SetUpdaterPath()));
	connect(Btn_First_Search, SIGNAL(clicked()),this, SLOT(START_SearchPathUpdater()));
	connect(Btn_Item_addfolder, SIGNAL(clicked()),treeWidget, SLOT(AddFolder()));
	connect(Btn_Item_addfile, SIGNAL(clicked()),treeWidget, SLOT(AddFile()));
	connect(Btn_Item_remove, SIGNAL(clicked()),treeWidget, SLOT(DeleteSelectedFile()));

    connect(Btn_Apply_Edit, SIGNAL(clicked()), this, SLOT(Liste_Edit_Apply()));
    connect(checkBox, SIGNAL(clicked(bool)),treeWidget, SLOT(setFilelevel(bool)));

    connect(CBoxAfficherMsgBox, SIGNAL(stateChanged(int)), this, SLOT(EnableMsgBox(int)));
	connect(treeWidget,SIGNAL(TaskToShowInStatusbar(QString)), this, SLOT(Set_Status_Msg(QString)));
	connect(treeWidget,SIGNAL(TaskToShowGbEdit(bool)), this, SLOT(Liste_Show_Edit(bool)));
	connect(treeWidget,SIGNAL(TaskToEnableGUI(bool)), this, SLOT(EnableControls(bool)));
	connect(Btn_Apply, SIGNAL(clicked()), this, SLOT(LaunchGen()));
        connect(&OXM_Generator,SIGNAL(NotifyErrorMsg(QString)),this,SLOT(ShowMsgError(QString)));
        connect(&OXM_Generator,SIGNAL(NotifyMsg(QString)),this,SLOT(ShowMsg(QString)));
        connect(&OXM_Generator,SIGNAL(NotifyProgress(int, int)),this,SLOT(Showprogress(int, int)));
        connect(treeWidget,SIGNAL(NotifyProgress(int, int)),this,SLOT(Showprogress(int, int)));
        connect(&OXM_Generator,SIGNAL(finished()),this,SLOT(BuildFinished()));
}