Skip to content

Commit

Permalink
implemented newProject wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
bdenne2 committed Dec 3, 2010
1 parent a98d1e0 commit 0385559
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 107 deletions.
1 change: 0 additions & 1 deletion existingProjectWizard.h
Expand Up @@ -41,7 +41,6 @@ class ExistingProjectWizard: public QWizard
QRadioButton* remoteButton;
QComboBox* remoteOption;


signals:
void setPath();

Expand Down
4 changes: 2 additions & 2 deletions gitit.pro
Expand Up @@ -16,7 +16,7 @@ SOURCES += main.cpp \
gitcommand.cpp \
gitstagedstatusmodel.cpp \
existingProjectWizard.cpp \
newprojectwizard.cpp
newProjectWizard.cpp
HEADERS += mainwindow.h \
history.h \
commit.h \
Expand All @@ -26,7 +26,7 @@ HEADERS += mainwindow.h \
gitcommand.h \
gitstagedstatusmodel.h \
existingProjectWizard.h \
newprojectwizard.h
newProjectWizard.h
FORMS += mainwindow.ui \
configure.ui
RESOURCES += resources.qrc
16 changes: 12 additions & 4 deletions mainwindow.cpp
Expand Up @@ -17,7 +17,9 @@ MainWindow::MainWindow(QWidget *parent) :
gitStagedStatusModel(new GitStagedStatusModel),
gitIgnoredFilesModel(new QStringListModel),
existingProjectWizard( new ExistingProjectWizard),
newProjectWizard( new NewProjectWizard),
gitCommand(new GitCommand)

{
ui->setupUi(this);
ui->changedFileslistView->setModel(gitChangedStatusModel);
Expand All @@ -31,8 +33,9 @@ MainWindow::MainWindow(QWidget *parent) :
connect( ui->actionExit, SIGNAL( triggered() ), this, SLOT(exit()) );
connect( ui->actionNew, SIGNAL( triggered() ), this, SLOT(menuNew()) );
connect( ui->actionUser_s_Manual, SIGNAL( triggered() ), this, SLOT(userManual()) );
connect( ui->actionNew_2, SIGNAL(triggered()), this, SLOT(activateExistingProjectWizard()) );
connect( ui->actionRemote_Repository, SIGNAL(triggered()), this, SLOT(activateShareProjectWizard()) );
connect( ui->actionExisting_Project, SIGNAL(triggered()), this, SLOT(activateExistingProjectWizard()) );
connect( ui->actionNew, SIGNAL(triggered()), this, SLOT(activateNewProjectWizard()) );
connect( ui->actionNew_Project, SIGNAL(triggered()), this, SLOT(activateNewProjectWizard()));
//using a builtin model here:
connect( gitCommand, SIGNAL(lsIgnored(QStringList)), this, SLOT(updateIgnoredModel(QStringList)));
connect( gitCommand, SIGNAL(log(QString)) , this, SLOT(updateLog(QString) ));
Expand Down Expand Up @@ -106,14 +109,18 @@ void MainWindow::activateExistingProjectWizard()
existingProjectWizard->show();
}

void MainWindow::activateShareProjectWizard()
void MainWindow::activateNewProjectWizard()
{

newProjectWizard->restart();
newProjectWizard->clear();
newProjectWizard->show();
}

void MainWindow::updateIgnoredModel(QStringList files)
{
gitIgnoredFilesModel->setStringList(files);
}

void MainWindow::updateLog(QString log)
{
ui->gitLogTextEdit->setPlainText(log);
Expand All @@ -133,6 +140,7 @@ void MainWindow::on_gitAddButton_clicked()
}
reload();
}

void MainWindow::reload()
{
gitCommand->status();
Expand Down
7 changes: 4 additions & 3 deletions mainwindow.h
Expand Up @@ -4,7 +4,7 @@
#include <QMainWindow>
#include <QStringListModel>
#include "existingProjectWizard.h"
//#include "shareProjectWizard.h"
#include "newProjectWizard.h"

class Configure;
class GitChangedStatusModel;
Expand All @@ -31,7 +31,8 @@ class MainWindow : public QMainWindow
QStringListModel* gitIgnoredFilesModel;
QString repo;
ExistingProjectWizard* existingProjectWizard;
// ShareProjectWizard shareProjectWizard;
NewProjectWizard* newProjectWizard;

GitCommand* gitCommand;

signals:
Expand All @@ -50,7 +51,7 @@ private slots:
void menuNew();
void userManual();
void activateExistingProjectWizard();
void activateShareProjectWizard();
void activateNewProjectWizard();
void updateIgnoredModel(QStringList);
void updateLog(QString);
public slots:
Expand Down
151 changes: 79 additions & 72 deletions mainwindow.ui
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>804</width>
<width>811</width>
<height>548</height>
</rect>
</property>
Expand All @@ -29,65 +29,6 @@
<attribute name="title">
<string>Local Workspace</string>
</attribute>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>510</x>
<y>20</y>
<width>241</width>
<height>351</height>
</rect>
</property>
<layout class="QVBoxLayout" name="commitLayout">
<item>
<widget class="QPushButton" name="shipButton">
<property name="text">
<string>Ship</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="withLabel">
<property name="text">
<string>with</string>
</property>
</widget>
</item>
<item>
<widget class="QSplitter" name="nameSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>name</string>
</property>
</widget>
<widget class="QLineEdit" name="commitName"/>
</widget>
</item>
<item>
<widget class="QLabel" name="andLabel">
<property name="text">
<string>and</string>
</property>
</widget>
</item>
<item>
<widget class="QSplitter" name="descriptionSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QLabel" name="descriptionLabel">
<property name="text">
<string>description</string>
</property>
</widget>
<widget class="QTextEdit" name="commitDescription"/>
</widget>
</item>
</layout>
</widget>
<widget class="QSplitter" name="changedFilesSplitter">
<property name="geometry">
<rect>
Expand Down Expand Up @@ -180,7 +121,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="resources.qrc">
<normaloff>:/images/downArrow.png</normaloff>:/images/downArrow.png</iconset>
</property>
<property name="iconSize">
Expand All @@ -206,7 +147,7 @@ p, li { white-space: pre-wrap; }
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="resources.qrc">
<normaloff>:/images/topArrow15.png</normaloff>
<normalon>:/images/topArrow15.png</normalon>
<disabledoff>:/images/topArrow15.png</disabledoff>
Expand All @@ -229,8 +170,8 @@ p, li { white-space: pre-wrap; }
<widget class="QPushButton" name="reload">
<property name="geometry">
<rect>
<x>690</x>
<y>420</y>
<x>680</x>
<y>410</y>
<width>85</width>
<height>27</height>
</rect>
Expand All @@ -239,6 +180,64 @@ p, li { white-space: pre-wrap; }
<string>Reload</string>
</property>
</widget>
<widget class="QFrame" name="frame_3">
<property name="geometry">
<rect>
<x>490</x>
<y>20</y>
<width>281</width>
<height>351</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>261</width>
<height>331</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QPushButton" name="shipButton">
<property name="text">
<string>Ship</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="withLabel">
<property name="text">
<string>with title</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="commitName"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="andLabel">
<property name="text">
<string>and description</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QTextEdit" name="commitDescription"/>
</item>
</layout>
</widget>
</widget>
</widget>
<widget class="QWidget" name="packageTree">
<attribute name="title">
Expand Down Expand Up @@ -353,13 +352,13 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
<width>804</width>
<height>23</height>
<width>811</width>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
<string>Project</string>
</property>
<addaction name="actionNew"/>
<addaction name="actionOpen"/>
Expand All @@ -377,8 +376,9 @@ p, li { white-space: pre-wrap; }
<property name="title">
<string>Wizards</string>
</property>
<addaction name="actionNew_Project"/>
<addaction name="actionExisting_Project"/>
<addaction name="actionNew_2"/>
<addaction name="actionShare_Project"/>
<addaction name="actionRemote_Repository"/>
</widget>
<addaction name="menuFile"/>
Expand Down Expand Up @@ -416,21 +416,26 @@ p, li { white-space: pre-wrap; }
<string>User's Manual</string>
</property>
</action>
<action name="actionNew_2">
<action name="actionExisting_Project">
<property name="text">
<string>Existing Project</string>
</property>
</action>
<action name="actionRemote_Repository">
<action name="actionShare_Project">
<property name="text">
<string>Share Project</string>
</property>
</action>
<action name="actionExisting_Project">
<action name="actionNew_Project">
<property name="text">
<string>New Project</string>
</property>
</action>
<action name="actionRemote_Repository">
<property name="text">
<string>Remote Repository</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
Expand All @@ -445,6 +450,8 @@ p, li { white-space: pre-wrap; }
<tabstop>renameBranch</tabstop>
<tabstop>changeCurrentBranch</tabstop>
</tabstops>
<resources/>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit 0385559

Please sign in to comment.