DrewTechs
3 years ago
4 changed files with 2503 additions and 0 deletions
File diff suppressed because it is too large
@ -0,0 +1,119 @@ |
|||||
|
/* DrewTechs
|
||||
|
* Note Binder |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
|
||||
|
#ifndef MAINWINDOW_H |
||||
|
#define MAINWINDOW_H |
||||
|
|
||||
|
#include <QMainWindow> |
||||
|
#include <QFileDialog> |
||||
|
#include <QVector> |
||||
|
#include <QFileInfo> |
||||
|
#include <QDebug> |
||||
|
#include <QDirIterator> |
||||
|
#include <QComboBox> |
||||
|
#include <QTreeWidgetItem> |
||||
|
#include <QProcess> |
||||
|
#include <QCloseEvent> |
||||
|
#include "notebook.h" |
||||
|
#include "notebooklist.h" |
||||
|
#include "notebookmanager.h" |
||||
|
#include "unfiledNotes.h" |
||||
|
#include "newNotebookDialog.h" |
||||
|
#include "newSectionDialog.h" |
||||
|
#include "newSectionGroupDialog.h" |
||||
|
#include "copyItemDialog.h" |
||||
|
#include "itemProperties.h" |
||||
|
#include "importSection.h" |
||||
|
#include "settings.h" |
||||
|
#include "applicationlaunchers.h" |
||||
|
|
||||
|
QT_BEGIN_NAMESPACE |
||||
|
namespace Ui { class MainWindow; } |
||||
|
QT_END_NAMESPACE |
||||
|
|
||||
|
class MainWindow : public QMainWindow |
||||
|
{ |
||||
|
Q_OBJECT |
||||
|
|
||||
|
public: |
||||
|
MainWindow(QWidget *parent = nullptr); |
||||
|
NotebookList notebookList; // List of Notebooks Opened
|
||||
|
Settings* uiSettings; // Settings Ui (though kept invisible)
|
||||
|
void init(); // Initialization of Program
|
||||
|
void NewSection(); // Create New Section
|
||||
|
void runNewSectionApplication(QString fileLocation); |
||||
|
void runOpenSectionApplication(QString fileLocation); |
||||
|
void NewSectionGroup(); // Create New Section Group
|
||||
|
Notebook* OpenNotebook(QString fileName); // Open Existing Notebook
|
||||
|
void OpenSection(); // Open Highlighted Section in Notebook
|
||||
|
void OpenAtPageSection(unsigned int pageNum); // Opwn Highlighted Section at Page # (works in some applications only)
|
||||
|
void CloseNotebook(); // Close Notebook Already Opened
|
||||
|
void CloseAllNotebooks(); // Close All Opened Notebooks
|
||||
|
void DeleteSelectedItem(QTreeWidgetItem* selectedItem); // Deletes Selected Item
|
||||
|
void UpdateNotebookList(); // Refresh Notebok List on Menu
|
||||
|
void ExitProgram(); // Exit Program
|
||||
|
void closeEvent (QCloseEvent *event); // Exit Program Event
|
||||
|
void runUnfiledNotesApplication(QString extension); // Run Unfiled Notes Application
|
||||
|
void messageBox(QString title, QString message); // Print Message Dialog
|
||||
|
~MainWindow(); |
||||
|
|
||||
|
private slots: |
||||
|
void on_openNotebook_Button_clicked(); |
||||
|
void on_openSection_Button_clicked(); |
||||
|
void on_newSection_Button_clicked(); |
||||
|
void on_newSectionGroup_Button_clicked(); |
||||
|
void on_newNotebook_Button_clicked(); |
||||
|
void on_closeNotebook_Button_clicked(); |
||||
|
void on_closeAllNotebooksButton_clicked(); |
||||
|
void on_deleteSelectedItem_Button_clicked(); |
||||
|
void on_generalSettings_Button_clicked(); |
||||
|
void on_iconSizeSlider_valueChanged(int value); |
||||
|
void on_refreshNotebookListButton_clicked(); |
||||
|
void on_itemPropertiesButton_clicked(); |
||||
|
void on_hideDirectory_Check_stateChanged(int arg1); |
||||
|
void on_hideSize_Check_stateChanged(int arg1); |
||||
|
void on_unfiledNotes_Button_clicked(); |
||||
|
void on_moveItem_Button_clicked(); |
||||
|
void on_copyItem_Button_clicked(); |
||||
|
void on_importSection_Button_clicked(); |
||||
|
void on_exportSection_Button_clicked(); |
||||
|
|
||||
|
|
||||
|
void newSectionDirSequence_fileToSectGr(SectionGroup* sectionGroup, QString fullFileName); |
||||
|
void openNotebookDirSequence_treeWidget(SectionGroup* sectionGroup, QTreeWidgetItem* sectionGroupItem); |
||||
|
void newSectionDirSequence_toSectToDirDialog(SectionGroup* sectionGroup, SectionGroup* subSectionGroup); |
||||
|
int newSectionDirSequence_toSectToDirDialog(SectionGroup* sectionGroup, QStringList* notebookColorList, QStringList* list, int item_level, int tab_count); |
||||
|
void openSectionDirSequence_findFile(SectionGroup* sectionGroup, QString selectedItemStr); |
||||
|
void newSectionGroupDirSequence_treeWidget(SectionGroup* sectionGroup, SectionGroup* newSectionGroup, QTreeWidgetItem* sectionGroupItem); |
||||
|
void updateNotebookDirSequence_fileToSecGr(SectionGroup* sectionGroup); |
||||
|
void updateNotebookDirSequence_treeWidget(SectionGroup* sectionGroup, QTreeWidgetItem* sectionChildItem); |
||||
|
void deleteNotebookDirSequence_findFile(SectionGroup* sectionGroup, QString selectedItem); |
||||
|
|
||||
|
void on_actionNew_Section_triggered(); |
||||
|
void on_actionNew_Section_Group_triggered(); |
||||
|
void on_actionNew_Notebook_triggered(); |
||||
|
void on_actionOpen_Notebook_triggered(); |
||||
|
void on_actionOpen_Section_triggered(); |
||||
|
void on_actionUnfiled_Notes_triggered(); |
||||
|
void on_actionClose_Notebook_triggered(); |
||||
|
void on_actionClose_All_Notebooks_triggered(); |
||||
|
void on_actionExit_triggered(); |
||||
|
void on_actionDeleteItem_triggered(); |
||||
|
void on_actionImport_Section_triggered(); |
||||
|
void on_actionExport_Section_triggered(); |
||||
|
void on_actionSettings_triggered(); |
||||
|
void on_actionApplication_Launchers_triggered(); |
||||
|
void on_actionHelp_triggered(); |
||||
|
void on_actionAbout_triggered(); |
||||
|
void on_actionItem_Properties_triggered(); |
||||
|
void on_actionRefresh_Notebook_List_triggered(); |
||||
|
void on_actionExpand_All_Notebooks_triggered(); |
||||
|
void on_actionExpand_All_Items_triggered(); |
||||
|
void on_actionCollapse_All_Notebooks_triggered(); |
||||
|
|
||||
|
private: |
||||
|
Ui::MainWindow *ui; |
||||
|
}; |
||||
|
#endif // MAINWINDOW_H
|
@ -0,0 +1,775 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<ui version="4.0"> |
||||
|
<class>MainWindow</class> |
||||
|
<widget class="QMainWindow" name="MainWindow"> |
||||
|
<property name="geometry"> |
||||
|
<rect> |
||||
|
<x>0</x> |
||||
|
<y>0</y> |
||||
|
<width>1212</width> |
||||
|
<height>670</height> |
||||
|
</rect> |
||||
|
</property> |
||||
|
<property name="windowTitle"> |
||||
|
<string>Note Binder</string> |
||||
|
</property> |
||||
|
<widget class="QWidget" name="centralwidget"> |
||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
||||
|
<item> |
||||
|
<widget class="QTreeWidget" name="notebookList"> |
||||
|
<property name="dragEnabled"> |
||||
|
<bool>false</bool> |
||||
|
</property> |
||||
|
<property name="dragDropOverwriteMode"> |
||||
|
<bool>false</bool> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
<property name="horizontalScrollMode"> |
||||
|
<enum>QAbstractItemView::ScrollPerPixel</enum> |
||||
|
</property> |
||||
|
<property name="autoExpandDelay"> |
||||
|
<number>-1</number> |
||||
|
</property> |
||||
|
<property name="itemsExpandable"> |
||||
|
<bool>true</bool> |
||||
|
</property> |
||||
|
<property name="sortingEnabled"> |
||||
|
<bool>true</bool> |
||||
|
</property> |
||||
|
<attribute name="headerCascadingSectionResizes"> |
||||
|
<bool>true</bool> |
||||
|
</attribute> |
||||
|
<attribute name="headerDefaultSectionSize"> |
||||
|
<number>350</number> |
||||
|
</attribute> |
||||
|
<attribute name="headerStretchLastSection"> |
||||
|
<bool>true</bool> |
||||
|
</attribute> |
||||
|
<column> |
||||
|
<property name="text"> |
||||
|
<string>Notebooks</string> |
||||
|
</property> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
</column> |
||||
|
<column> |
||||
|
<property name="text"> |
||||
|
<string>Directory</string> |
||||
|
</property> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
</column> |
||||
|
<column> |
||||
|
<property name="text"> |
||||
|
<string>Size</string> |
||||
|
</property> |
||||
|
<property name="font"> |
||||
|
<font> |
||||
|
<pointsize>12</pointsize> |
||||
|
</font> |
||||
|
</property> |
||||
|
</column> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QSplitter" name="splitter"> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Vertical</enum> |
||||
|
</property> |
||||
|
<widget class="QWidget" name="layoutWidget"> |
||||
|
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="newSection_Button"> |
||||
|
<property name="text"> |
||||
|
<string> New Section</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="newSectionGroup_Button"> |
||||
|
<property name="text"> |
||||
|
<string> New Section |
||||
|
Group</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="newNotebook_Button"> |
||||
|
<property name="text"> |
||||
|
<string> New Notebook</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="unfiledNotes_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Unfiled Notes</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="openSection_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Open Section</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="openNotebook_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Open Notebook</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="importSection_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Import Section</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="exportSection_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Export Section</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
<widget class="QWidget" name="layoutWidget"> |
||||
|
<layout class="QVBoxLayout" name="verticalLayout_2"> |
||||
|
<item> |
||||
|
<widget class="QSlider" name="iconSizeSlider"> |
||||
|
<property name="minimum"> |
||||
|
<number>16</number> |
||||
|
</property> |
||||
|
<property name="maximum"> |
||||
|
<number>64</number> |
||||
|
</property> |
||||
|
<property name="value"> |
||||
|
<number>32</number> |
||||
|
</property> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Horizontal</enum> |
||||
|
</property> |
||||
|
<property name="invertedAppearance"> |
||||
|
<bool>false</bool> |
||||
|
</property> |
||||
|
<property name="tickPosition"> |
||||
|
<enum>QSlider::TicksBelow</enum> |
||||
|
</property> |
||||
|
<property name="tickInterval"> |
||||
|
<number>8</number> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<layout class="QHBoxLayout" name="horizontalLayout"> |
||||
|
<item> |
||||
|
<widget class="QLabel" name="label_2"> |
||||
|
<property name="text"> |
||||
|
<string>16</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<spacer name="horizontalSpacer"> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Horizontal</enum> |
||||
|
</property> |
||||
|
<property name="sizeHint" stdset="0"> |
||||
|
<size> |
||||
|
<width>13</width> |
||||
|
<height>20</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</spacer> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QLabel" name="label"> |
||||
|
<property name="text"> |
||||
|
<string>Icon Size</string> |
||||
|
</property> |
||||
|
<property name="alignment"> |
||||
|
<set>Qt::AlignCenter</set> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<spacer name="horizontalSpacer_2"> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Horizontal</enum> |
||||
|
</property> |
||||
|
<property name="sizeHint" stdset="0"> |
||||
|
<size> |
||||
|
<width>13</width> |
||||
|
<height>20</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</spacer> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QLabel" name="label_3"> |
||||
|
<property name="text"> |
||||
|
<string>64</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QSplitter" name="splitter_2"> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Vertical</enum> |
||||
|
</property> |
||||
|
<widget class="QWidget" name="layoutWidget"> |
||||
|
<layout class="QVBoxLayout" name="verticalLayout_4"> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="deleteSelectedItem_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Delete Item</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="refreshNotebookListButton"> |
||||
|
<property name="text"> |
||||
|
<string> Refresh |
||||
|
Notebook List</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="generalSettings_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Settings</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="itemPropertiesButton"> |
||||
|
<property name="text"> |
||||
|
<string> Item |
||||
|
Properties</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="moveItem_Button"> |
||||
|
<property name="text"> |
||||
|
<string> Move Item</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="copyItem_Button"> |
||||
|
<property name="text"> |
||||
|
<string>Copy Item</string> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="closeNotebook_Button"> |
||||
|
<property name="text"> |
||||
|
<string>Close Notebook</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QPushButton" name="closeAllNotebooksButton"> |
||||
|
<property name="text"> |
||||
|
<string> Close All |
||||
|
Notebooks</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
<widget class="QWidget" name="widget" native="true"> |
||||
|
<layout class="QVBoxLayout" name="verticalLayout_3"> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="hideDirectory_Check"> |
||||
|
<property name="text"> |
||||
|
<string>Hide Directory</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="hideSize_Check"> |
||||
|
<property name="text"> |
||||
|
<string>Hide Size</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
<widget class="QMenuBar" name="menubar"> |
||||
|
<property name="geometry"> |
||||
|
<rect> |
||||
|
<x>0</x> |
||||
|
<y>0</y> |
||||
|
<width>1212</width> |
||||
|
<height>21</height> |
||||
|
</rect> |
||||
|
</property> |
||||
|
<widget class="QMenu" name="menuFile"> |
||||
|
<property name="title"> |
||||
|
<string>File</string> |
||||
|
</property> |
||||
|
<addaction name="actionNew_Section"/> |
||||
|
<addaction name="actionNew_Section_Group"/> |
||||
|
<addaction name="actionNew_Notebook"/> |
||||
|
<addaction name="actionUnfiled_Notes"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionOpen_Notebook"/> |
||||
|
<addaction name="actionOpen_Section"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionImport_Section"/> |
||||
|
<addaction name="actionExport_Section"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionClose_Notebook"/> |
||||
|
<addaction name="actionClose_All_Notebooks"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionExit"/> |
||||
|
</widget> |
||||
|
<widget class="QMenu" name="menuEdit"> |
||||
|
<property name="title"> |
||||
|
<string>Edit</string> |
||||
|
</property> |
||||
|
<addaction name="actionCopy_Item"/> |
||||
|
<addaction name="actionMove_Item"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionDeleteItem"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionItem_Properties"/> |
||||
|
</widget> |
||||
|
<widget class="QMenu" name="menuSettings"> |
||||
|
<property name="title"> |
||||
|
<string>Settings</string> |
||||
|
</property> |
||||
|
<addaction name="actionSettings"/> |
||||
|
<addaction name="actionApplication_Launchers"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionRefresh_Notebook_List"/> |
||||
|
</widget> |
||||
|
<widget class="QMenu" name="menuHelp"> |
||||
|
<property name="title"> |
||||
|
<string>Help</string> |
||||
|
</property> |
||||
|
<addaction name="actionHelp"/> |
||||
|
<addaction name="actionAbout"/> |
||||
|
</widget> |
||||
|
<widget class="QMenu" name="menuView"> |
||||
|
<property name="title"> |
||||
|
<string>View</string> |
||||
|
</property> |
||||
|
<addaction name="actionExpand_All_Notebooks"/> |
||||
|
<addaction name="actionExpand_All_Items"/> |
||||
|
<addaction name="actionCollapse_All_Notebooks"/> |
||||
|
<addaction name="separator"/> |
||||
|
</widget> |
||||
|
<addaction name="menuFile"/> |
||||
|
<addaction name="menuEdit"/> |
||||
|
<addaction name="menuView"/> |
||||
|
<addaction name="menuSettings"/> |
||||
|
<addaction name="menuHelp"/> |
||||
|
</widget> |
||||
|
<widget class="QStatusBar" name="statusbar"/> |
||||
|
<widget class="QToolBar" name="toolBar"> |
||||
|
<property name="windowTitle"> |
||||
|
<string>toolBar</string> |
||||
|
</property> |
||||
|
<property name="movable"> |
||||
|
<bool>true</bool> |
||||
|
</property> |
||||
|
<property name="iconSize"> |
||||
|
<size> |
||||
|
<width>32</width> |
||||
|
<height>32</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
<property name="toolButtonStyle"> |
||||
|
<enum>Qt::ToolButtonTextUnderIcon</enum> |
||||
|
</property> |
||||
|
<property name="floatable"> |
||||
|
<bool>false</bool> |
||||
|
</property> |
||||
|
<attribute name="toolBarArea"> |
||||
|
<enum>TopToolBarArea</enum> |
||||
|
</attribute> |
||||
|
<attribute name="toolBarBreak"> |
||||
|
<bool>false</bool> |
||||
|
</attribute> |
||||
|
<addaction name="actionNew_Section"/> |
||||
|
<addaction name="actionNew_Section_Group"/> |
||||
|
<addaction name="actionNew_Notebook"/> |
||||
|
<addaction name="actionUnfiled_Notes"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionOpen_Section"/> |
||||
|
<addaction name="actionOpen_Notebook"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionImport_Section"/> |
||||
|
<addaction name="actionExport_Section"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionMove_Item"/> |
||||
|
<addaction name="actionCopy_Item"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionRefresh_Notebook_List"/> |
||||
|
<addaction name="actionItem_Properties"/> |
||||
|
<addaction name="separator"/> |
||||
|
<addaction name="actionSettings"/> |
||||
|
<addaction name="actionHelp"/> |
||||
|
</widget> |
||||
|
<widget class="QToolBar" name="toolBar_2"> |
||||
|
<property name="windowTitle"> |
||||
|
<string>toolBar_2</string> |
||||
|
</property> |
||||
|
<attribute name="toolBarArea"> |
||||
|
<enum>BottomToolBarArea</enum> |
||||
|
</attribute> |
||||
|
<attribute name="toolBarBreak"> |
||||
|
<bool>false</bool> |
||||
|
</attribute> |
||||
|
</widget> |
||||
|
<action name="actionNew_Section"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/NewSectionIcon.png</normaloff>Icons/NewSectionIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>New Section</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Shift+N</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionNew_Section_Group"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/NewSectionGroupIcon.png</normaloff>Icons/NewSectionGroupIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>New Section Group</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Alt+N</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionNew_Notebook"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/NewNotebookIcon.png</normaloff>Icons/NewNotebookIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>New Notebook</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+N</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionOpen_Notebook"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/OpenNotebookIcon.png</normaloff>Icons/OpenNotebookIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Open Notebook</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Shift+O</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionOpen_Section"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/OpenSectionIcon.png</normaloff>Icons/OpenSectionIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Open Section</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+O</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionClose_Notebook"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/CloseNotebookIcon.png</normaloff>Icons/CloseNotebookIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Close Notebook</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Alt+C</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionUnfiled_Notes"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/UnfiledNotesIcon.png</normaloff>Icons/UnfiledNotesIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Unfiled Notes</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Alt+U</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionExit"> |
||||
|
<property name="text"> |
||||
|
<string>Exit</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Shift+X</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionDeleteItem"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/DeleteItemIcon.png</normaloff>Icons/DeleteItemIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Delete Item</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Del</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionImport_Section"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/ImportSectionIcon.png</normaloff>Icons/ImportSectionIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Import Section</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+I</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionExport_Section"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/ExportSectionIcon.png</normaloff>Icons/ExportSectionIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Export Section</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+E</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionSettings"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/SettingsIcon.png</normaloff>Icons/SettingsIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>General Settings</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>F3</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionRefresh_Notebook_List"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/RefreshNotebookListIcon.png</normaloff>Icons/RefreshNotebookListIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Refresh Notebook List</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>F5</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionHelp"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/HelpIcon.png</normaloff>Icons/HelpIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Help</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>F1</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionAbout"> |
||||
|
<property name="text"> |
||||
|
<string>About</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>F2</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionApplication_Launchers"> |
||||
|
<property name="text"> |
||||
|
<string>Application Launchers</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>F4</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionExpand_All_Notebooks"> |
||||
|
<property name="text"> |
||||
|
<string>Expand All Notebooks</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+.</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionExpand_All_Items"> |
||||
|
<property name="text"> |
||||
|
<string>Expand All Items</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Shift+.</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionCollapse_All_Notebooks"> |
||||
|
<property name="text"> |
||||
|
<string>Collapse All Notebooks</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+,</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionClose_All_Notebooks"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/CloseAllNotebooksIcon.png</normaloff>Icons/CloseAllNotebooksIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Close All Notebooks</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+Shift+C</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionMove_Item"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/MoveItemIcon.png</normaloff>Icons/MoveItemIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Move Item</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+M</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionCopy_Item"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/CopyItemIcon.png</normaloff>Icons/CopyItemIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Copy Item</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Ctrl+C</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
<action name="actionItem_Properties"> |
||||
|
<property name="icon"> |
||||
|
<iconset> |
||||
|
<normaloff>Icons/ItemPropertiesIcon.png</normaloff>Icons/ItemPropertiesIcon.png</iconset> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Item Properties</string> |
||||
|
</property> |
||||
|
<property name="shortcut"> |
||||
|
<string>Alt+P</string> |
||||
|
</property> |
||||
|
</action> |
||||
|
</widget> |
||||
|
<resources/> |
||||
|
<connections/> |
||||
|
</ui> |
@ -0,0 +1,87 @@ |
|||||
|
/* DrewTechs
|
||||
|
* Note Binder |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
|
||||
|
#include "newNotebookDialog.h" |
||||
|
#include "ui_newNotebookDialog.h" |
||||
|
|
||||
|
newNotebookDialog::newNotebookDialog(QWidget *parent) : |
||||
|
QDialog(parent), |
||||
|
ui(new Ui::newNotebookDialog) |
||||
|
{ |
||||
|
ui->setupUi(this); |
||||
|
} |
||||
|
|
||||
|
newNotebookDialog::~newNotebookDialog() |
||||
|
{ |
||||
|
delete ui; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
void newNotebookDialog::on_buttonBox_accepted() |
||||
|
{ |
||||
|
if(ui->notebookDirectoryBox->text() != "") |
||||
|
{ |
||||
|
NotebookCreator(); |
||||
|
} |
||||
|
accepted(); |
||||
|
} |
||||
|
|
||||
|
void newNotebookDialog::on_buttonBox_rejected() |
||||
|
{ |
||||
|
rejected(); |
||||
|
} |
||||
|
void newNotebookDialog::NotebookCreator() |
||||
|
{ |
||||
|
QString notebookPath = ui->notebookDirectoryBox->text(); |
||||
|
QDir().mkdir(notebookPath); |
||||
|
QString notebookDirName = QDir(notebookPath).dirName(); |
||||
|
setNbName(notebookDirName); |
||||
|
setNbDirectory(notebookPath); |
||||
|
setNbFileName(notebookDirName + ".noteb"); |
||||
|
setNbColor(ui->notebookColorBox->currentText()); |
||||
|
} |
||||
|
void newNotebookDialog::on_directorySelector_clicked() |
||||
|
{ |
||||
|
QFileDialog dialog(this); |
||||
|
dialog.setFileMode(QFileDialog::DirectoryOnly); |
||||
|
QString notebookPath = dialog.getSaveFileName(this, tr("Save File"), "/home/drew/Documents", tr("Notebook Directory")); |
||||
|
ui->notebookDirectoryBox->setText(notebookPath); |
||||
|
} |
||||
|
|
||||
|
/* Setter Functions */ |
||||
|
void newNotebookDialog::setNbName(QString newNbName) |
||||
|
{ |
||||
|
nbName = newNbName; |
||||
|
} |
||||
|
void newNotebookDialog::setNbDirectory(QString newNbDirectory) |
||||
|
{ |
||||
|
nbDirectory = newNbDirectory; |
||||
|
} |
||||
|
void newNotebookDialog::setNbFileName(QString newNbFileName) |
||||
|
{ |
||||
|
nbFileName = newNbFileName; |
||||
|
} |
||||
|
void newNotebookDialog::setNbColor(QString newNbColor) |
||||
|
{ |
||||
|
nbColor = newNbColor; |
||||
|
} |
||||
|
|
||||
|
/* Getter Functions */ |
||||
|
QString newNotebookDialog::getNbName() |
||||
|
{ |
||||
|
return nbName; |
||||
|
} |
||||
|
QString newNotebookDialog::getNbDirectory() |
||||
|
{ |
||||
|
return nbDirectory; |
||||
|
} |
||||
|
QString newNotebookDialog::getNbFileName() |
||||
|
{ |
||||
|
return nbFileName; |
||||
|
} |
||||
|
QString newNotebookDialog::getNbColor() |
||||
|
{ |
||||
|
return nbColor; |
||||
|
} |
Loading…
Reference in new issue