diff --git a/NEWS.md b/NEWS.md index 15bca97e..370b5ff5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ Red Panda C++ Version 1.0.3 - fix: don't show tips in the editor, when selecting by mouse - fix: auto syntax check doesn't work for new files - change: don't auto jump to the first syntax error location when compile + - enhancement: don't show folders that doesn't contain files in the project view + - enhancement: redesigned new project unit dialog Red Panda C++ Version 1.0.2 - enhancement: press tab in column mode won't exit column mode diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 7ceaec13..a98e9c33 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -175,6 +175,7 @@ SOURCES += \ widgets/newclassdialog.cpp \ widgets/newheaderdialog.cpp \ widgets/newprojectdialog.cpp \ + widgets/newprojectunitdialog.cpp \ widgets/ojproblempropertywidget.cpp \ widgets/ojproblemsetmodel.cpp \ widgets/qconsole.cpp \ @@ -321,6 +322,7 @@ HEADERS += \ widgets/newclassdialog.h \ widgets/newheaderdialog.h \ widgets/newprojectdialog.h \ + widgets/newprojectunitdialog.h \ widgets/ojproblempropertywidget.h \ widgets/ojproblemsetmodel.h \ widgets/qconsole.h \ @@ -384,6 +386,7 @@ FORMS += \ widgets/newclassdialog.ui \ widgets/newheaderdialog.ui \ widgets/newprojectdialog.ui \ + widgets/newprojectunitdialog.ui \ widgets/ojproblempropertywidget.ui \ widgets/searchdialog.ui \ widgets/signalmessagedialog.ui diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index b1e301b3..29cc85e3 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -79,7 +79,8 @@ #include #include "cpprefacter.h" -#include +#include "widgets/newprojectunitdialog.h" +#include "widgets/searchdialog.h" #ifdef Q_OS_WIN #include @@ -5934,31 +5935,59 @@ void MainWindow::newProjectUnitFile() if (current.isValid()) { node = static_cast(current.internalPointer()); } - QString newFileName; - do { - newFileName = tr("untitled")+QString("%1").arg(getNewFileNumber()); - if (mProject->options().isCpp) { - newFileName+=".cpp"; - } else { - newFileName+=".c"; - } - } while (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName))); + PProjectModelNode pNode = mProject->pointerToNode(node); - newFileName = QInputDialog::getText( - this, - tr("New Project File Name"), - tr("File Name:"), - QLineEdit::Normal, - newFileName); - if (newFileName.isEmpty()) - return; - if (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName))) { - QMessageBox::critical(this,tr("File Already Exists!"), - tr("File '%1' already exists!").arg(newFileName)); - return; + while (pNode && pNode->unitIndex>0) { + pNode = pNode->parent.lock(); } - PProjectUnit newUnit = mProject->newUnit( - mProject->pointerToNode(node),newFileName); + + if (!pNode) { + pNode = mProject->rootNode(); + } + + QString newFileName; + PProjectUnit newUnit; + if (mProject->modelType() == ProjectModelType::FileSystem) { + NewProjectUnitDialog newProjectUnitDialog; + QString folder = mProject->fileSystemNodeFolderPath(pNode); + newProjectUnitDialog.setFolder(folder); + switch (pNode->folderNodeType) { + case ProjectSpecialFolderNode::HEADERS: + newProjectUnitDialog.setSuffix("h"); + break; + case ProjectSpecialFolderNode::SOURCES: + if (mProject->options().isCpp) + newProjectUnitDialog.setSuffix("cpp"); + else + newProjectUnitDialog.setSuffix("c"); + break; + default: + newProjectUnitDialog.setSuffix(""); + } + if (newProjectUnitDialog.exec()!=QDialog::Accepted) { + return; + } + newFileName=newProjectUnitDialog.filename(); + if (newFileName.isEmpty()) + return; + } else { + newFileName = QInputDialog::getText( + this, + tr("New Project File Name"), + tr("File Name:"), + QLineEdit::Normal, + newFileName); + if (newFileName.isEmpty()) + return; + if (fileExists(QDir(mProject->directory()).absoluteFilePath(newFileName))) { + QMessageBox::critical(this,tr("File Already Exists!"), + tr("File '%1' already exists!").arg(newFileName)); + return; + } + } + newUnit = mProject->newUnit( + pNode,newFileName); + mProject->rebuildNodes(); mProject->saveAll(); updateProjectView(); diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index f439dbf7..8749602f 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -370,6 +370,7 @@ void Project::rebuildNodes() mUnits[idx]->node()->unitIndex = idx; mUnits[idx]->node()->priority = mUnits[idx]->priority(); } + break; } @@ -1290,31 +1291,58 @@ void Project::createFolderNodes() } } +static void addFolderRecursively(QSet& folders, QString folder) { + if (folder.isEmpty()) + return; + folders.insert(excludeTrailingPathDelimiter(folder)); + QString parentFolder = QFileInfo(folder).absolutePath(); + if (parentFolder==folder) + return; + addFolderRecursively(folders, parentFolder); +} + void Project::createFileSystemFolderNodes() { + QSet headerFolders; + QSet sourceFolders; + QSet otherFolders; + for (int idx=0;idxfileName()); + if (isHFile(fileInfo.fileName())) { + addFolderRecursively(headerFolders,fileInfo.absolutePath()); + } else if (isCFile(fileInfo.fileName())) { + addFolderRecursively(sourceFolders,fileInfo.absolutePath()); + } else { + addFolderRecursively(otherFolders,fileInfo.absolutePath()); + } + } PProjectModelNode node = makeNewFileNode(tr("Headers"),true,mRootNode); node->folderNodeType = ProjectSpecialFolderNode::HEADERS; node->priority = 1000; - createFileSystemFolderNode(ProjectSpecialFolderNode::HEADERS,folder(),node); + createFileSystemFolderNode(ProjectSpecialFolderNode::HEADERS,folder(),node, headerFolders); mFolderNodes.append(node); mSpecialNodes.insert(ProjectSpecialFolderNode::HEADERS,node); node = makeNewFileNode(tr("Sources"),true,mRootNode); node->folderNodeType = ProjectSpecialFolderNode::SOURCES; node->priority = 900; - createFileSystemFolderNode(ProjectSpecialFolderNode::SOURCES,folder(),node); + createFileSystemFolderNode(ProjectSpecialFolderNode::SOURCES,folder(),node, sourceFolders); mFolderNodes.append(node); mSpecialNodes.insert(ProjectSpecialFolderNode::SOURCES,node); node = makeNewFileNode(tr("Others"),true,mRootNode); node->folderNodeType = ProjectSpecialFolderNode::OTHERS; node->priority = 800; - createFileSystemFolderNode(ProjectSpecialFolderNode::OTHERS,folder(),node); + createFileSystemFolderNode(ProjectSpecialFolderNode::OTHERS,folder(),node, otherFolders); mFolderNodes.append(node); mSpecialNodes.insert(ProjectSpecialFolderNode::OTHERS,node); } -void Project::createFileSystemFolderNode(ProjectSpecialFolderNode folderType, const QString &folderName, PProjectModelNode parent) +void Project::createFileSystemFolderNode( + ProjectSpecialFolderNode folderType, + const QString &folderName, + PProjectModelNode parent, + const QSet& validFolders) { QDirIterator iter(folderName); while (iter.hasNext()) { @@ -1322,10 +1350,10 @@ void Project::createFileSystemFolderNode(ProjectSpecialFolderNode folderType, co QFileInfo fileInfo = iter.fileInfo(); if (fileInfo.isHidden() || fileInfo.fileName().startsWith('.')) continue; - if (fileInfo.isDir()) { + if (fileInfo.isDir() && validFolders.contains(fileInfo.absoluteFilePath())) { PProjectModelNode node = makeNewFileNode(fileInfo.fileName(),true,parent); mFileSystemFolderNodes.insert(QString("%1/%2").arg((int)folderType).arg(fileInfo.absoluteFilePath()),node); - createFileSystemFolderNode(folderType,fileInfo.absoluteFilePath(), node); + createFileSystemFolderNode(folderType,fileInfo.absoluteFilePath(), node, validFolders); } } } diff --git a/RedPandaIDE/project.h b/RedPandaIDE/project.h index 2e038309..ea5b96a9 100644 --- a/RedPandaIDE/project.h +++ b/RedPandaIDE/project.h @@ -244,7 +244,7 @@ private: void checkProjectFileForUpdate(SimpleIni& ini); void createFolderNodes(); void createFileSystemFolderNodes(); - void createFileSystemFolderNode(ProjectSpecialFolderNode folderType, const QString& folderName, PProjectModelNode parent); + void createFileSystemFolderNode(ProjectSpecialFolderNode folderType, const QString& folderName, PProjectModelNode parent, const QSet& validFolders); PProjectModelNode getParentFolderNode(const QString& filename); PProjectModelNode findFolderNode(const QString& folderPath, ProjectSpecialFolderNode nodeType); PProjectModelNode folderNodeFromName(const QString& name); diff --git a/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.cpp b/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.cpp index 0bdad5de..b3adf699 100644 --- a/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.cpp +++ b/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.cpp @@ -33,8 +33,9 @@ CompilerSetDirectoriesWidget::CompilerSetDirectoriesWidget(QWidget *parent) : connect(ui->listView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &CompilerSetDirectoriesWidget::selectionChanged); ui->listView->setSelectionMode(QAbstractItemView::SingleSelection); + onUpdateIcons(); connect(pIconsManager, &IconsManager::actionIconsUpdated, - this, &CompilerSetDirectoriesWidget::updateIcons); + this, &CompilerSetDirectoriesWidget::onUpdateIcons); } CompilerSetDirectoriesWidget::~CompilerSetDirectoriesWidget() @@ -103,7 +104,7 @@ void CompilerSetDirectoriesWidget::on_btnRemoveInvalid_pressed() setDirList(lst); } -void CompilerSetDirectoriesWidget::updateIcons() +void CompilerSetDirectoriesWidget::onUpdateIcons() { pIconsManager->setIcon(ui->btnAdd,IconsManager::ACTION_MISC_ADD); pIconsManager->setIcon(ui->btnDelete, IconsManager::ACTION_MISC_REMOVE); diff --git a/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.h b/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.h index 2f8e0321..58988178 100644 --- a/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.h +++ b/RedPandaIDE/settingsdialog/compilersetdirectorieswidget.h @@ -50,7 +50,7 @@ private slots: void on_btnRemoveInvalid_pressed(); - void updateIcons(); + void onUpdateIcons(); private: Ui::CompilerSetDirectoriesWidget *ui; diff --git a/RedPandaIDE/vcs/gitremotedialog.cpp b/RedPandaIDE/vcs/gitremotedialog.cpp index 4540d8fe..962001a4 100644 --- a/RedPandaIDE/vcs/gitremotedialog.cpp +++ b/RedPandaIDE/vcs/gitremotedialog.cpp @@ -15,7 +15,7 @@ GitRemoteDialog::GitRemoteDialog(const QString& folder, QWidget *parent) : mRemotes = manager.listRemotes(folder); ui->lstRemotes->addItems(mRemotes); connect(pIconsManager, &IconsManager::actionIconsUpdated, - this, &GitRemoteDialog::updateIcons); + this, &GitRemoteDialog::onUpdateIcons); ui->btnRemove->setEnabled(false); ui->pnlProcess->setVisible(false); ui->grpDetail->setEnabled(false); @@ -42,7 +42,7 @@ QString GitRemoteDialog::chooseRemote() return ""; } -void GitRemoteDialog::updateIcons() +void GitRemoteDialog::onUpdateIcons() { ui->btnAdd->setIcon(pIconsManager->getIcon(IconsManager::ACTION_MISC_ADD)); ui->btnRemove->setIcon(pIconsManager->getIcon(IconsManager::ACTION_MISC_REMOVE)); diff --git a/RedPandaIDE/vcs/gitremotedialog.h b/RedPandaIDE/vcs/gitremotedialog.h index b21f18e3..4e1d1903 100644 --- a/RedPandaIDE/vcs/gitremotedialog.h +++ b/RedPandaIDE/vcs/gitremotedialog.h @@ -17,7 +17,7 @@ public: QString chooseRemote(); private slots: - void updateIcons(); + void onUpdateIcons(); void onRemotesSelectionChanged(); void checkDetails(); void refresh(); diff --git a/RedPandaIDE/widgets/cpudialog.cpp b/RedPandaIDE/widgets/cpudialog.cpp index fe85ded8..f2a908b9 100644 --- a/RedPandaIDE/widgets/cpudialog.cpp +++ b/RedPandaIDE/widgets/cpudialog.cpp @@ -68,9 +68,9 @@ CPUDialog::CPUDialog(QWidget *parent) : sizes[1] = std::max(1,totalSize - sizes[0]); ui->splitter->setSizes(sizes); - updateIcons(); + onUpdateIcons(); connect(pIconsManager,&IconsManager::actionIconsUpdated, - this, &CPUDialog::updateIcons); + this, &CPUDialog::onUpdateIcons); } CPUDialog::~CPUDialog() @@ -192,7 +192,7 @@ void CPUDialog::on_btnStepIntoInstruction_clicked() pMainWindow->debugger()->sendCommand("-exec-step-instruction",""); } -void CPUDialog::updateIcons() +void CPUDialog::onUpdateIcons() { pIconsManager->setIcon(ui->btnStepIntoInstruction, IconsManager::ACTION_RUN_STEP_INTO_INSTRUCTION); pIconsManager->setIcon(ui->btnStepOverInstruction, IconsManager::ACTION_RUN_STEP_OVER_INSTRUCTION); diff --git a/RedPandaIDE/widgets/cpudialog.h b/RedPandaIDE/widgets/cpudialog.h index f5dc5018..ce372c0e 100644 --- a/RedPandaIDE/widgets/cpudialog.h +++ b/RedPandaIDE/widgets/cpudialog.h @@ -51,7 +51,7 @@ private slots: void on_chkBlendMode_stateChanged(int arg1); void on_btnStepOverInstruction_clicked(); void on_btnStepIntoInstruction_clicked(); - void updateIcons(); + void onUpdateIcons(); }; #endif // CPUDIALOG_H diff --git a/RedPandaIDE/widgets/newclassdialog.cpp b/RedPandaIDE/widgets/newclassdialog.cpp index 0f221e65..bf936a3b 100644 --- a/RedPandaIDE/widgets/newclassdialog.cpp +++ b/RedPandaIDE/widgets/newclassdialog.cpp @@ -11,7 +11,9 @@ NewClassDialog::NewClassDialog(QWidget *parent) : setWindowFlag(Qt::WindowContextHelpButtonHint,false); ui->setupUi(this); resize(pSettings->ui().newClassDialogWidth(),pSettings->ui().newClassDialogHeight()); - updateIcons(); + onUpdateIcons(); + connect(pIconsManager,&IconsManager::actionIconsUpdated, + this, &NewClassDialog::onUpdateIcons); ui->txtClassName->setFocus(); } @@ -65,7 +67,7 @@ void NewClassDialog::on_btnCreate_clicked() this->accept(); } -void NewClassDialog::updateIcons() +void NewClassDialog::onUpdateIcons() { pIconsManager->setIcon(ui->btnBrowsePath, IconsManager::ACTION_FILE_OPEN_FOLDER); } diff --git a/RedPandaIDE/widgets/newclassdialog.h b/RedPandaIDE/widgets/newclassdialog.h index 11877a61..37e43729 100644 --- a/RedPandaIDE/widgets/newclassdialog.h +++ b/RedPandaIDE/widgets/newclassdialog.h @@ -35,7 +35,7 @@ private: Ui::NewClassDialog *ui; private: - void updateIcons(); + void onUpdateIcons(); // QWidget interface protected: diff --git a/RedPandaIDE/widgets/newheaderdialog.cpp b/RedPandaIDE/widgets/newheaderdialog.cpp index 0f3ddc85..7b042af2 100644 --- a/RedPandaIDE/widgets/newheaderdialog.cpp +++ b/RedPandaIDE/widgets/newheaderdialog.cpp @@ -12,7 +12,9 @@ NewHeaderDialog::NewHeaderDialog(QWidget *parent) : setWindowFlag(Qt::WindowContextHelpButtonHint,false); ui->setupUi(this); resize(pSettings->ui().newHeaderDialogWidth(),pSettings->ui().newHeaderDialogHeight()); - updateIcons(); + onUpdateIcons(); + connect(pIconsManager,&IconsManager::actionIconsUpdated, + this, &NewHeaderDialog::onUpdateIcons); ui->txtHeader->setFocus(); } @@ -36,7 +38,7 @@ void NewHeaderDialog::setPath(const QString &location) ui->txtPath->setText(location); } -void NewHeaderDialog::updateIcons() +void NewHeaderDialog::onUpdateIcons() { pIconsManager->setIcon(ui->btnBrowse, IconsManager::ACTION_FILE_OPEN_FOLDER); } diff --git a/RedPandaIDE/widgets/newheaderdialog.h b/RedPandaIDE/widgets/newheaderdialog.h index 5929856b..640fdc62 100644 --- a/RedPandaIDE/widgets/newheaderdialog.h +++ b/RedPandaIDE/widgets/newheaderdialog.h @@ -22,7 +22,7 @@ private: Ui::NewHeaderDialog *ui; private: - void updateIcons(); + void onUpdateIcons(); // QWidget interface protected: diff --git a/RedPandaIDE/widgets/newprojectdialog.cpp b/RedPandaIDE/widgets/newprojectdialog.cpp index 18767736..d52f47ff 100644 --- a/RedPandaIDE/widgets/newprojectdialog.cpp +++ b/RedPandaIDE/widgets/newprojectdialog.cpp @@ -61,6 +61,10 @@ NewProjectDialog::NewProjectDialog(QWidget *parent) : this, &NewProjectDialog::updateProjectLocation); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); + + onUpdateIcons(); + connect(pIconsManager,&IconsManager::actionIconsUpdated, + this, &NewProjectDialog::onUpdateIcons); } NewProjectDialog::~NewProjectDialog() @@ -242,7 +246,7 @@ void NewProjectDialog::on_btnBrowse_clicked() } QString dir = QFileDialog::getExistingDirectory( this, - "Choose directory", + tr("Choose directory"), dirPath ); if (!dir.isEmpty()) { @@ -254,7 +258,7 @@ void NewProjectDialog::on_btnBrowse_clicked() } } -void NewProjectDialog::updateIcons() +void NewProjectDialog::onUpdateIcons() { pIconsManager->setIcon(ui->btnBrowse, IconsManager::ACTION_FILE_OPEN_FOLDER); } diff --git a/RedPandaIDE/widgets/newprojectdialog.h b/RedPandaIDE/widgets/newprojectdialog.h index 801a3d3e..df42dd48 100644 --- a/RedPandaIDE/widgets/newprojectdialog.h +++ b/RedPandaIDE/widgets/newprojectdialog.h @@ -47,7 +47,7 @@ private slots: void on_lstTemplates_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); void on_btnBrowse_clicked(); - void updateIcons(); + void onUpdateIcons(); void on_btnOk_clicked(); diff --git a/RedPandaIDE/widgets/newprojectunitdialog.cpp b/RedPandaIDE/widgets/newprojectunitdialog.cpp new file mode 100644 index 00000000..4e3045ff --- /dev/null +++ b/RedPandaIDE/widgets/newprojectunitdialog.cpp @@ -0,0 +1,113 @@ +#include "newprojectunitdialog.h" +#include "ui_newprojectunitdialog.h" +#include "../iconsmanager.h" +#include "../utils.h" + +#include + +NewProjectUnitDialog::NewProjectUnitDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::NewProjectUnitDialog), + mSuffix("cpp") +{ + ui->setupUi(this); + onUpdateIcons(); + connect(pIconsManager,&IconsManager::actionIconsUpdated, + this, &NewProjectUnitDialog::onUpdateIcons); +} + +NewProjectUnitDialog::~NewProjectUnitDialog() +{ + delete ui; +} + +QString NewProjectUnitDialog::folder() const +{ + return ui->txtFolder->text(); +} + +void NewProjectUnitDialog::setFolder(const QString &folderName) +{ + if (folderName!=folder()) { + ui->txtFolder->setText(folderName); + QDir dir(folder()); + if (dir.exists(filename()) || filename().isEmpty()) { + //todo change filename + QString newFileName; + QString ext; + if (filename().isEmpty()) { + ext = mSuffix; + } else { + ext = QFileInfo(filename()).suffix(); + } + do { + newFileName = tr("untitled")+QString("%1").arg(getNewFileNumber()); + if (!ext.isEmpty()) + newFileName += "." + ext; + } while (dir.exists(newFileName)); + setFilename(newFileName); + } + } +} + +void NewProjectUnitDialog::onUpdateIcons() +{ + pIconsManager->setIcon(ui->btnBrowse, IconsManager::ACTION_FILE_OPEN_FOLDER); +} + +void NewProjectUnitDialog::on_btnBrowse_clicked() +{ + QString dir = QFileDialog::getExistingDirectory( + this, + tr("Choose directory"), + folder() + ); + if (!dir.isEmpty()) { + setFolder(dir); + } +} + +void NewProjectUnitDialog::on_btnOk_clicked() +{ + accept(); +} + + +void NewProjectUnitDialog::on_btnCancel_clicked() +{ + reject(); +} + + +void NewProjectUnitDialog::on_txtFilename_textChanged(const QString &/*arg1*/) +{ + updateBtnOkStatus(); +} + +void NewProjectUnitDialog::updateBtnOkStatus() +{ + ui->btnOk->setEnabled(!ui->txtFilename->text().isEmpty() + && QFileInfo(ui->txtFolder->text()).isDir()); +} + +void NewProjectUnitDialog::closeEvent(QCloseEvent *event) +{ + reject(); +} + +bool NewProjectUnitDialog::suffix() const +{ + return mSuffix; +} + +void NewProjectUnitDialog::setSuffix(bool newSuffix) +{ + mSuffix = newSuffix; +} + + +void NewProjectUnitDialog::on_txtFolder_textChanged(const QString &/*arg1*/) +{ + updateBtnOkStatus(); +} + diff --git a/RedPandaIDE/widgets/newprojectunitdialog.h b/RedPandaIDE/widgets/newprojectunitdialog.h new file mode 100644 index 00000000..ea3f620e --- /dev/null +++ b/RedPandaIDE/widgets/newprojectunitdialog.h @@ -0,0 +1,50 @@ +#ifndef NEWPROJECTUNITDIALOG_H +#define NEWPROJECTUNITDIALOG_H + +#include + +namespace Ui { +class NewProjectUnitDialog; +} + +class NewProjectUnitDialog : public QDialog +{ + Q_OBJECT + +public: + explicit NewProjectUnitDialog(QWidget *parent = nullptr); + ~NewProjectUnitDialog(); + + QString folder() const; + void setFolder(const QString& folderName); + + QString filename() const; + void setFilename(const QString& filename); + + bool suffix() const; + void setSuffix(bool newSuffix); + +private slots: + void onUpdateIcons(); + void on_btnBrowse_clicked(); + + void on_btnOk_clicked(); + + void on_btnCancel_clicked(); + + void on_txtFilename_textChanged(const QString &arg1); + void on_txtFolder_textChanged(const QString &arg1); + +private: + void updateBtnOkStatus(); +private: + Ui::NewProjectUnitDialog *ui; +private: + bool mSuffix; + + // QWidget interface +protected: + void closeEvent(QCloseEvent *event) override; +}; + +#endif // NEWPROJECTUNITDIALOG_H diff --git a/RedPandaIDE/widgets/newprojectunitdialog.ui b/RedPandaIDE/widgets/newprojectunitdialog.ui new file mode 100644 index 00000000..206d4a72 --- /dev/null +++ b/RedPandaIDE/widgets/newprojectunitdialog.ui @@ -0,0 +1,119 @@ + + + NewProjectUnitDialog + + + + 0 + 0 + 400 + 300 + + + + Dialog + + + + + + Folder + + + + + + + true + + + + + + + Filename + + + + + + + Browse + + + Browse + + + + :/icons/images/newlook24/053-open.png:/icons/images/newlook24/053-open.png + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Ok + + + + + + + Cancel + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + +