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