DrewTechs
3 years ago
3 changed files with 427 additions and 0 deletions
@ -0,0 +1,133 @@ |
|||||
|
QT += core gui |
||||
|
|
||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
||||
|
|
||||
|
CONFIG += c++11 |
||||
|
|
||||
|
# You can make your code fail to compile if it uses deprecated APIs. |
||||
|
# In order to do so, uncomment the following line. |
||||
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 |
||||
|
|
||||
|
SOURCES += \ |
||||
|
addApplicationLauncher.cpp \ |
||||
|
applicationlaunchers.cpp \ |
||||
|
copyItemDialog.cpp \ |
||||
|
importSection.cpp \ |
||||
|
itemProperties.cpp \ |
||||
|
main.cpp \ |
||||
|
mainwindow.cpp \ |
||||
|
newNotebookDialog.cpp \ |
||||
|
newSectionDialog.cpp \ |
||||
|
newSectionGroupDialog.cpp \ |
||||
|
notebook.cpp \ |
||||
|
notebooklist.cpp \ |
||||
|
notebookmanager.cpp \ |
||||
|
sectiongroup.cpp \ |
||||
|
settings.cpp \ |
||||
|
unfiledNotes.cpp |
||||
|
|
||||
|
HEADERS += \ |
||||
|
addApplicationLauncher.h \ |
||||
|
applicationlaunchers.h \ |
||||
|
copyItemDialog.h \ |
||||
|
importSection.h \ |
||||
|
itemProperties.h \ |
||||
|
mainwindow.h \ |
||||
|
newNotebookDialog.h \ |
||||
|
newSectionDialog.h \ |
||||
|
newSectionGroupDialog.h \ |
||||
|
notebook.h \ |
||||
|
notebooklist.h \ |
||||
|
notebookmanager.h \ |
||||
|
sectiongroup.h \ |
||||
|
settings.h \ |
||||
|
unfiledNotes.h |
||||
|
|
||||
|
FORMS += \ |
||||
|
addApplicationLauncher.ui \ |
||||
|
copyItemDialog.ui \ |
||||
|
importSection.ui \ |
||||
|
itemProperties.ui \ |
||||
|
mainwindow.ui \ |
||||
|
newNotebookDialog.ui \ |
||||
|
newSectionDialog.ui \ |
||||
|
newSectionGroupDialog.ui \ |
||||
|
settings.ui \ |
||||
|
unfiledNotes.ui |
||||
|
|
||||
|
# Default rules for deployment. |
||||
|
qnx: target.path = /tmp/$${TARGET}/bin |
||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin |
||||
|
!isEmpty(target.path): INSTALLS += target |
||||
|
|
||||
|
DISTFILES += \ |
||||
|
HelpText/Page01 \ |
||||
|
HelpText/Page02 \ |
||||
|
HelpText/Page03 \ |
||||
|
HelpText/Page04 \ |
||||
|
HelpText/Page05 \ |
||||
|
HelpText/Page06 \ |
||||
|
HelpText/Page07 \ |
||||
|
HelpText/Page08 \ |
||||
|
HelpText/Page09 \ |
||||
|
HelpText/Page10 \ |
||||
|
HelpText/Page11 \ |
||||
|
HelpText/Page12 \ |
||||
|
HelpText/Page13 \ |
||||
|
HelpText/Page14 \ |
||||
|
HelpText/Page15 \ |
||||
|
HelpText/Page16 \ |
||||
|
Icons/CopyItemIcon.png \ |
||||
|
Icons/DeleteItemIcon.png \ |
||||
|
Icons/ExportSectionIcon.png \ |
||||
|
Icons/HelpIcon.png \ |
||||
|
Icons/ImportSectionIcon.png \ |
||||
|
Icons/MoveDownIcon.png \ |
||||
|
Icons/MoveItemIcon.png \ |
||||
|
Icons/MoveUpIcon.png \ |
||||
|
Icons/NewNotebookIcon.png \ |
||||
|
Icons/NewSectionGroupIcon.png \ |
||||
|
Icons/NewSectionIcon.png \ |
||||
|
Icons/NotebookIcon_Apple.png \ |
||||
|
Icons/NotebookIcon_Black.png \ |
||||
|
Icons/NotebookIcon_Blue.png \ |
||||
|
Icons/NotebookIcon_BlueMist.png \ |
||||
|
Icons/NotebookIcon_Cyan.png \ |
||||
|
Icons/NotebookIcon_Green.png \ |
||||
|
Icons/NotebookIcon_LemonLime.png \ |
||||
|
Icons/NotebookIcon_Magenta.png \ |
||||
|
Icons/NotebookIcon_Orange.png \ |
||||
|
Icons/NotebookIcon_Purple.png \ |
||||
|
Icons/NotebookIcon_PurpleMist.png \ |
||||
|
Icons/NotebookIcon_Red.png \ |
||||
|
Icons/NotebookIcon_RedChalk.png \ |
||||
|
Icons/NotebookIcon_Silver.png \ |
||||
|
Icons/NotebookIcon_Tan.png \ |
||||
|
Icons/NotebookIcon_Teal.png \ |
||||
|
Icons/NotebookIcon_White.png \ |
||||
|
Icons/NotebookIcon_Yellow.png \ |
||||
|
Icons/OpenNotebookIcon.png \ |
||||
|
Icons/OpenSectionGroupIcon.png \ |
||||
|
Icons/OpenSectionIcon.png \ |
||||
|
Icons/RefreshNotebookListIcon.png \ |
||||
|
Icons/SectionGroupIcon_Apple.png \ |
||||
|
Icons/SectionGroupIcon_Black.png \ |
||||
|
Icons/SectionGroupIcon_Blue.png \ |
||||
|
Icons/SectionGroupIcon_BlueMist.png \ |
||||
|
Icons/SectionGroupIcon_Cyan.png \ |
||||
|
Icons/SectionGroupIcon_Green.png \ |
||||
|
Icons/SectionGroupIcon_LemonLime.png \ |
||||
|
Icons/SectionGroupIcon_Magenta.png \ |
||||
|
Icons/SectionGroupIcon_Orange.png \ |
||||
|
Icons/SectionGroupIcon_Purple.png \ |
||||
|
Icons/SectionGroupIcon_PurpleMist.png \ |
||||
|
Icons/SectionGroupIcon_Red.png \ |
||||
|
Icons/SectionGroupIcon_RedChalk.png \ |
||||
|
Icons/SectionGroupIcon_Silver.png \ |
||||
|
Icons/SectionGroupIcon_Tan.png \ |
||||
|
Icons/SectionGroupIcon_Teal.png \ |
||||
|
Icons/SectionGroupIcon_White.png \ |
||||
|
Icons/SectionGroupIcon_Yellow.png \ |
||||
|
Icons/SectionIcon.png \ |
||||
|
Icons/UnfiledNotesIcon.png \ |
||||
|
NoteBinderLogo.png |
@ -0,0 +1,71 @@ |
|||||
|
/* DrewTechs
|
||||
|
* Note Binder |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
|
||||
|
#ifndef NEWSECTIONGROUPDIALOG_H |
||||
|
#define NEWSECTIONGROUPDIALOG_H |
||||
|
|
||||
|
#include <QDialog> |
||||
|
#include <QObject> |
||||
|
#include <QFileInfo> |
||||
|
#include <QDir> |
||||
|
#include <QTreeWidgetItem> |
||||
|
#include <QPushButton> |
||||
|
#include "mainwindow.h" |
||||
|
#include "notebook.h" |
||||
|
#include "sectiongroup.h" |
||||
|
#include "notebooklist.h" |
||||
|
#include "notebookmanager.h" |
||||
|
#include "applicationlaunchers.h" |
||||
|
|
||||
|
namespace Ui { class newSectionGroupDialog; } |
||||
|
|
||||
|
class newSectionGroupDialog : public QDialog |
||||
|
{ |
||||
|
Q_OBJECT |
||||
|
|
||||
|
public: |
||||
|
//newSectionDialog(QWidget *parent = nullptr);
|
||||
|
newSectionGroupDialog(QStringList notebookColorList, QStringList notebookDirList, QStringList list, QWidget *parent = nullptr); |
||||
|
~newSectionGroupDialog(); |
||||
|
|
||||
|
QStringList getDirectories() const; |
||||
|
QStringList getNotebookDirList() const; |
||||
|
QStringList getNotebookColorList() const; |
||||
|
QString getSgName() const; |
||||
|
QString getSgDirectory() const; |
||||
|
QString getSgFileName() const; |
||||
|
QString getSgColor() const; |
||||
|
|
||||
|
void setDirectories(QStringList dirList); |
||||
|
void setNotebookDirList(QStringList nbDirList); |
||||
|
void setNotebookColorList(QStringList nbColorList); |
||||
|
void setSgName(QString newSgName); |
||||
|
void setSgDirectory(QString newSgDirectory); |
||||
|
void setSgFileName(QString newSgFileName); |
||||
|
void setSgColor(QString newSgColor); |
||||
|
|
||||
|
QIcon SetNotebookIcon(QString notebookColor); |
||||
|
QIcon SetSectionGroupIcon(QString sectionGroupColor); |
||||
|
private slots: |
||||
|
void on_buttonBox_accepted(); |
||||
|
void on_buttonBox_rejected(); |
||||
|
void addItemsToDirectory(); |
||||
|
void directoryCreator(); |
||||
|
|
||||
|
private: |
||||
|
Ui::newSectionGroupDialog *ui; |
||||
|
|
||||
|
QStringList var_directoryList; // Directories displayed on the ComboBox of Directory List
|
||||
|
QStringList notebookdirList; // Actual Filepaths of each Notebook or Section Group.
|
||||
|
QStringList notebookcolorlist; // Color of Notebook or Section
|
||||
|
QString sgName; // Section Group Name
|
||||
|
QString sgDirectory; // Section Group Directory
|
||||
|
QString sgFileName; // Section Group FileName (.sectgr)
|
||||
|
QString sgColor; // Section Group Color
|
||||
|
|
||||
|
void init(); |
||||
|
}; |
||||
|
|
||||
|
#endif // NEWSECTIONDIALOG_H
|
@ -0,0 +1,223 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<ui version="4.0"> |
||||
|
<class>newSectionGroupDialog</class> |
||||
|
<widget class="QDialog" name="newSectionGroupDialog"> |
||||
|
<property name="geometry"> |
||||
|
<rect> |
||||
|
<x>0</x> |
||||
|
<y>0</y> |
||||
|
<width>551</width> |
||||
|
<height>232</height> |
||||
|
</rect> |
||||
|
</property> |
||||
|
<property name="windowTitle"> |
||||
|
<string>Create New Section Group</string> |
||||
|
</property> |
||||
|
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
|
<item> |
||||
|
<widget class="QLabel" name="notebookLabel"> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Select Notebook or Section Group:</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QComboBox" name="directorySelection"> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>24</width> |
||||
|
<height>24</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QLabel" name="fileNameLabel"> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Section Group Name:</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<layout class="QHBoxLayout" name="horizontalLayout"> |
||||
|
<item> |
||||
|
<widget class="QLineEdit" name="fileNameBox"> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string/> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QComboBox" name="sectionGroupColorBox"> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>None</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Red</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Orange</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Yellow</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Green</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Cyan</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Blue</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Purple</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Tan</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Magenta</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Teal</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Red Chalk</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Lemon Lime</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Apple</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Blue Mist</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Purple Mist</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Black</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
<item> |
||||
|
<property name="text"> |
||||
|
<string>Silver</string> |
||||
|
</property> |
||||
|
</item> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QDialogButtonBox" name="buttonBox"> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Horizontal</enum> |
||||
|
</property> |
||||
|
<property name="standardButtons"> |
||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
<resources/> |
||||
|
<connections> |
||||
|
<connection> |
||||
|
<sender>buttonBox</sender> |
||||
|
<signal>accepted()</signal> |
||||
|
<receiver>newSectionGroupDialog</receiver> |
||||
|
<slot>accept()</slot> |
||||
|
<hints> |
||||
|
<hint type="sourcelabel"> |
||||
|
<x>17</x> |
||||
|
<y>222</y> |
||||
|
</hint> |
||||
|
<hint type="destinationlabel"> |
||||
|
<x>157</x> |
||||
|
<y>192</y> |
||||
|
</hint> |
||||
|
</hints> |
||||
|
</connection> |
||||
|
<connection> |
||||
|
<sender>buttonBox</sender> |
||||
|
<signal>rejected()</signal> |
||||
|
<receiver>newSectionGroupDialog</receiver> |
||||
|
<slot>reject()</slot> |
||||
|
<hints> |
||||
|
<hint type="sourcelabel"> |
||||
|
<x>85</x> |
||||
|
<y>222</y> |
||||
|
</hint> |
||||
|
<hint type="destinationlabel"> |
||||
|
<x>286</x> |
||||
|
<y>192</y> |
||||
|
</hint> |
||||
|
</hints> |
||||
|
</connection> |
||||
|
</connections> |
||||
|
</ui> |
Loading…
Reference in new issue