Skip to content

Commit

Permalink
Update Project Structure;
Browse files Browse the repository at this point in the history
Update Version;
Add FilePage;
  • Loading branch information
saturneric committed Jun 25, 2021
1 parent d4229be commit 6f5d467
Show file tree
Hide file tree
Showing 27 changed files with 2,272 additions and 2,032 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)

project(GpgFrontend VERSION 1.0.5 LANGUAGES CXX)
project(GpgFrontend VERSION 1.1.0 LANGUAGES CXX)

message(STATUS "GPGFrontend Build Configuration Started CMAKE Version ${CMAKE_VERSION}")

Expand Down
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ in one of these ways:
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
dirModel, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
Expand Down
10 changes: 8 additions & 2 deletions include/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#define __GPGWIN_H__

#include "gpg/GpgConstants.h"
#include "ui/Attachments.h"
#include "ui/widgets/Attachments.h"
#include "ui/KeyMgmt.h"
#include "ui/TextEdit.h"
#include "ui/widgets/TextEdit.h"
#include "ui/FileEncryptionDialog.h"
#include "ui/SettingsDialog.h"
#include "ui/AboutDialog.h"
Expand Down Expand Up @@ -175,6 +175,11 @@ private slots:
*/
void slotFileVerify();

/**
* @details Open File Opera Tab
*/
void slotOpenFileTab();

/**
* @details Open settings-dialog.
*/
Expand Down Expand Up @@ -339,6 +344,7 @@ private slots:
GpgME::GpgContext *mCtx; /**< TODO */
KeyMgmt *keyMgmt; /**< TODO */
KeyServerImportDialog *importDialog; /**< TODO */

bool attachmentDockCreated;
bool restartNeeded;
};
Expand Down
2 changes: 1 addition & 1 deletion include/ui/FindWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef FINDWIDGET_H
#define FINDWIDGET_H

#include "EditorPage.h"
#include "ui/widgets/EditorPage.h"

/**
* @brief Class for handling the find widget shown at buttom of a textedit-page
Expand Down
2 changes: 1 addition & 1 deletion include/ui/VerifyDetailsDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __VERIFYDETAILSDIALOG_H__
#define __VERIFYDETAILSDIALOG_H__

#include "ui/EditorPage.h"
#include "ui/widgets/EditorPage.h"
#include "ui/widgets/VerifyKeyDetailBox.h"

class VerifyDetailsDialog : public QDialog {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __ATTACHMENTS_H__
#define __ATTACHMENTS_H__

#include "AttachmentTableModel.h"
#include "ui/AttachmentTableModel.h"

class Attachments : public QWidget {
Q_OBJECT
Expand Down
File renamed without changes.
56 changes: 56 additions & 0 deletions include/ui/widgets/FilePage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* This file is part of GPGFrontend.
*
* GPGFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Foobar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <https://www.gnu.org/licenses/>.
*
* The initial version of the source code is inherited from gpg4usb-team.
* Their source code version also complies with GNU General Public License.
*
* The source code version of this software was modified and released
* by Saturneric<[email protected]> starting on May 12, 2021.
*
*/

#ifndef GPGFRONTEND_FILEPAGE_H
#define GPGFRONTEND_FILEPAGE_H

#include <GpgFrontend.h>

class FilePage : public QWidget {
Q_OBJECT
public:

explicit FilePage(QWidget* parent = nullptr);

void getSelected(QString &path);


private slots:

void fileTreeViewItemClicked(const QModelIndex &index);
void fileTreeViewItemDoubleClicked(const QModelIndex &index);

void slotUpLevel();

private:
QFileSystemModel *dirModel;
QTreeView *dirTreeView;
QString mPath;

QPushButton *upLevelButton;

};


#endif //GPGFRONTEND_FILEPAGE_H
File renamed without changes.
2 changes: 1 addition & 1 deletion include/ui/widgets/InfoBoardWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef __VERIFYNOTIFICATION_H__
#define __VERIFYNOTIFICATION_H__

#include "ui/EditorPage.h"
#include "EditorPage.h"
#include "ui/VerifyDetailsDialog.h"
#include "gpg/result_analyse/VerifyResultAnalyse.h"

Expand Down
25 changes: 15 additions & 10 deletions include/ui/TextEdit.h → include/ui/widgets/TextEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
#ifndef __TEXTEDIT_H__
#define __TEXTEDIT_H__

#include "ui/EditorPage.h"
#include "ui/HelpPage.h"
#include "QuitDialog.h"
#include "ui/widgets/EditorPage.h"
#include "ui/widgets/HelpPage.h"
#include "ui/widgets/FilePage.h"
#include "ui/QuitDialog.h"


/**
Expand Down Expand Up @@ -59,22 +60,22 @@ Q_OBJECT
*/
bool maybeSaveAnyTab();

int tabCount() const;
[[nodiscard]] int tabCount() const;

/**
* @details textpage of the currently activated tab
* @return \li reference to QTextEdit if tab has one
* \li 0 otherwise (e.g. if helppage)
*/
QTextEdit *curTextPage() const;
[[nodiscard]] QTextEdit *curTextPage() const;

QTextBrowser *curHelpPage() const;
[[nodiscard]] QTextBrowser *curHelpPage() const;

/**
* @details List of currently unsaved tabs.
* @returns QHash<int, QString> Hash of tabindexes and title of unsaved tabs.
*/
QHash<int, QString> unsavedDocuments() const;
[[nodiscard]] QHash<int, QString> unsavedDocuments() const;

QTabWidget *tabWidget; /** Widget containing the tabs of the editor */

Expand All @@ -84,7 +85,7 @@ public slots:
* @details Return pointer to the currently activated tabpage.
*
*/
EditorPage *slotCurPage() const;
[[nodiscard]] EditorPage *slotCurPage() const;

/**
* @details Insert a ">" at the begining of every line of current textedit.
Expand Down Expand Up @@ -136,6 +137,11 @@ public slots:
*/
void slotNewHelpTab(const QString& title, const QString& path) const;

/**
* New File Tab to do file operation
*/
void slotNewFileTab() const;

/**
* @details put a * in front of current tabs title, if current textedit is modified
*/
Expand Down Expand Up @@ -240,8 +246,7 @@ private slots:
void slotSelectAll() const;

protected:
// void dragEnterEvent(QDragEnterEvent *event);
// void dropEvent(QDropEvent* event);

/****************************************************************************************
* Name: saveFile
* Description: Saves the content of currentTab to the file filename
Expand Down
2 changes: 1 addition & 1 deletion resource/COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ in one of these ways:
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
dirModel, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
Expand Down
Loading

0 comments on commit 6f5d467

Please sign in to comment.