Skip to content

Commit

Permalink
Merge branch 'feature-Xtra-tags'
Browse files Browse the repository at this point in the history
  • Loading branch information
adiultra committed Jun 6, 2016
2 parents d5dd76c + 80749d5 commit 8d5f731
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 20 deletions.
Binary file modified data.tdx
Binary file not shown.
10 changes: 10 additions & 0 deletions docs/Dev-Guide/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _Developer-Guide:
=================
Developer's Guide
=================

This documentation is for the people who want to contribute to TodX by improving the codebase. Or to those who would like to know how things happen in the App.


.. toctree::
:maxdepth: 2
23 changes: 23 additions & 0 deletions docs/User-Guide/Basic-Commands/help.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _help:

======
Help
======

Command
-------

``help`` or ``h``


Function
--------

This saves the data to a readable text file.

Explanation
-----------

It saves the contents of Lists in an external human readable text file. The extension is ``.tdexp``. This file cannot be reread by the program.

.. Warning:: If a file exists by the same name It is **Over Written**, Please later save your exported files to different location.
2 changes: 1 addition & 1 deletion docs/User-Guide/Basic-Commands/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Basic Commands
There are various Basic commands in the app. These commands are entered with the `*>` prompt.

.. toctree::
:maxdepth: 2
:maxdepth: 1

new
open
Expand Down
17 changes: 16 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,25 @@ TodX is a simple and to the point ToDo list app which enhances productivity and


Contents
--------
****************

User Guide
----------------


.. toctree::
:caption: User Guide
:maxdepth: 2

quickstart
User-Guide/index.rst


Developer's Guide
----------------

.. toctree::
:caption: Developer's Guide
:maxdepth: 2

Dev-Guide/index.rst
58 changes: 41 additions & 17 deletions fabric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ using namespace std;
List::List(){
_listIndex = 0;
_tagIndex = 0;
_hasTags = 0;
}

List::List(char Title[100]) {
_listIndex = 0;
_tagIndex = 0;
_hasTags = 0;

strcpy(title, Title);
}
Expand Down Expand Up @@ -44,8 +46,12 @@ void List::enter(){
break;
}
}

_hasTags = 1;
}

cout << "Has tags = " << _hasTags << endl;

}


Expand All @@ -62,12 +68,14 @@ void List::view() {
cout << title << endl;
cout << "============" << endl;

cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
}
if (_hasTags) {
cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
}

cout << endl << endl;
cout << endl << endl;
}

for (int i = 0; i < _listIndex; i++) {
cout << " [" << list[i].status << "] ";
Expand All @@ -79,12 +87,14 @@ void List::indexView() {
cout << title << endl;
cout << "============" << endl;

cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
}
if (_hasTags) {
cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
}

cout << endl << endl;
cout << endl << endl;
}

for (int i = 0; i < _listIndex; i++) {
cout << " " << i << ". [" << list[i].status << "] ";
Expand All @@ -95,12 +105,15 @@ void List::indexView() {
void List::tagView() {
cout << title << endl;

cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
if (_hasTags) {
cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
}

cout << endl;
}

cout << endl;
}

void List::todoView(int index) {
Expand All @@ -112,9 +125,17 @@ void List::tagIndexView() {
cout << title << endl;
cout << "============" << endl;

cout << "Tags :" << endl;
for (int i = 0; i < _tagIndex; i++) {
cout << " " << i << ". " << tags[i] << endl;
if (_hasTags) {
cout << "Tags : ";
for (int i = 0; i < _tagIndex; i++) {
cout << tags[i] << " ";
}

cout << endl << endl;
}

else {
cout << "No tags here." << endl;
}
}

Expand Down Expand Up @@ -142,6 +163,9 @@ void List::removeTag(int index) {
strcpy(tags[i], tags[i + 1]);
}
_tagIndex--;
if (_tagIndex == 0) {
_hasTags = 0;
}
}

void List::changeStatus(int index, char status){
Expand Down
1 change: 1 addition & 0 deletions fabric.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class List {

int _listIndex; // Variable to count the filling of list
int _tagIndex; // Variable to count the filling of tags
int _hasTags;

List(); // Asks for #title(required) and #tags(can be skipped).

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: todx.out
all: clean todx.out

todx.out: fabric.o main.o
g++ -o todx.out main.o fabric.o
Expand Down

0 comments on commit 8d5f731

Please sign in to comment.