Example #1
0
NewFileDialog::NewFileDialog(QString windowTitle,QString defName,QString defPath, QWidget* parent) :
   QDialog(parent),
   ui(new Ui::NewFileDialog)
{
   ui->setupUi(this);
   ui->name->setText(defName);
   ui->path->setText(defPath);
   on_path_textChanged(defPath);
   setWindowTitle(windowTitle);
   ui->name->setFocus();
}
Example #2
0
NewProjectDialog::NewProjectDialog(QWidget* parent,QString windowTitle,QString defName,QString defPath, bool showTemplate) :
   QDialog(parent),
   ui(new Ui::NewProjectDialog)
{
   ui->setupUi(this);
   ui->name->setText(defName);
   ui->path->setText(defPath);
   on_path_textChanged(defPath);
   setWindowTitle(windowTitle);
   ui->templateGroup->setVisible(showTemplate);
   ui->name->setFocus();

   QDir templatesDir(":/templates/NES");
   QStringList templates = templatesDir.entryList();

   ui->templateProject->addItem("Empty Project");
   ui->templateProject->addItems(templates);
}