Skip to content

Commit

Permalink
Added tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nighty3098 committed Jun 8, 2024
1 parent 1406c1d commit d00248b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/CodeKeeper/keeperFunc/getProjectInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ QString MainWindow::getRepositoryData(QString git_url, QTableWidget *table)
table->setColumnCount(2);
table->setShowGrid(false);

table->setColumnWidth(0, 190);
table->setColumnWidth(1, 190);
table->setColumnWidth(0, 195);
table->setColumnWidth(1, 195);

table->setRowHeight(0, 25);
table->setRowHeight(1, 25);
Expand Down
26 changes: 22 additions & 4 deletions src/CodeKeeper/keeperFunc/projectsFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,19 @@ void MainWindow::openProject(QListWidget *listWidget, QListWidgetItem *item)
{
if (item) {
QDialog dialog(this);
dialog.setFixedSize(400, 550);
dialog.setFixedSize(420, 550);
dialog.setWindowTitle(tr("Edit project"));
dialog.setWindowFlags(windowFlags() | Qt::FramelessWindowHint);

QVBoxLayout *centralLayout = new QVBoxLayout(&dialog);

QTabWidget *tabs = new QTabWidget();
tabs->setMovable(true);
tabs->setTabPosition(QTabWidget::South);

QWidget *projectTab = new QWidget();
QGridLayout mainLayout(projectTab);

QString data = item->text();
QStringList splitData = data.split("\n");

Expand All @@ -138,8 +147,6 @@ void MainWindow::openProject(QListWidget *listWidget, QListWidgetItem *item)
qDebug() << "Open project: " << projectData[0] << " " << projectData[1] << " "
<< projectData[2] << " " << projectData[3] << " " << projectData[4];

QGridLayout mainLayout(&dialog);

QLineEdit *title = new QLineEdit();
title->setAlignment(Qt::AlignCenter);
title->setPlaceholderText(" Project name: ");
Expand All @@ -155,7 +162,7 @@ void MainWindow::openProject(QListWidget *listWidget, QListWidgetItem *item)
linkToGit->setFont(selectedFont);

QComboBox *documentation = new QComboBox();
documentation->setFixedSize(190, 20);
documentation->setFixedSize(200, 20);
documentation->setFont(selectedFont);

QLabel *lastMod = new QLabel();
Expand Down Expand Up @@ -264,6 +271,17 @@ void MainWindow::openProject(QListWidget *listWidget, QListWidgetItem *item)
thread->start();
});




QWidget *issuesTab = new QWidget();
QGridLayout issuesLayout(issuesTab);

tabs->addTab(projectTab, "Project");
tabs->addTab(issuesTab, "Issues");

centralLayout->addWidget(tabs);

dialog.exec();
} else {
qWarning() << "Error";
Expand Down

0 comments on commit d00248b

Please sign in to comment.