From: hama Date: Fri, 1 May 2015 23:14:00 +0000 (+0200) Subject: Merge branch 'master' of git@f-r-e-i.de:/home/git/repo/rplqt X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=5719b75c28c8845a4da4a47c2d20d68823985f0e;p=reqt Merge branch 'master' of git@f-r-e-i.de:/home/git/repo/rplqt Conflicts: appl/refind/mainwindow.cpp appl/refind/refind.pro --- 5719b75c28c8845a4da4a47c2d20d68823985f0e diff --cc appl/refind/mainwindow.cpp index ccf3ecf,7c6b745..ac74665 --- a/appl/refind/mainwindow.cpp +++ b/appl/refind/mainwindow.cpp @@@ -93,39 -90,9 +93,41 @@@ MainWindow::MainWindow(const QString& s ui->tableWidget->setColumnWidth(TC_SIZE, 125); ui->tableWidget->setColumnWidth(TC_MODIFIED, 175); ui->tableWidget->setColumnWidth(TC_TYPE, 75); - ui->tableWidget->horizontalHeader()->setStretchLastSection(true); + addContextMenu(); } +/** + * @brief Destructor. + */ +MainWindow::~MainWindow(){ + delete ui; +} + +/** + * Prepares the context menu of the result table. + * + */ +void MainWindow::addContextMenu(){ + ui->tableWidget->setContextMenuPolicy(Qt::CustomContextMenu); + connect(ui->tableWidget, + SIGNAL(customContextMenuRequested(const QPoint&)), + SLOT(handleTableContextMenu(const QPoint&))); + ContextHandler* handler = new ContextHandler(); + handler->m_text = "kedit"; + handler->m_program = "kedit"; + handler->m_arguments = "${full}"; + handler->m_changeToParentDirectory = ContextHandler::DM_UNDEF; + m_fileHandler.append(handler); + handler = new ContextHandler(); + handler->m_text = "bash"; + handler->m_program = "konsole"; + handler->m_arguments = "${full}"; + handler->m_changeToParentDirectory = ContextHandler::DM_TO_FILE; + m_dirHandler.append(handler); +} + ++======= ++>>>>>>> branch 'master' of git@f-r-e-i.de:/home/git/repo/rplqt void MainWindow::mousePressEvent(QMouseEvent* event) { if (event->button() == Qt::LeftButton