Addressed Issue #10

This commit is contained in:
amazing-username
2018-03-31 15:04:20 -05:00
parent d1662f12fb
commit 30bc1f8245
10 changed files with 67 additions and 65 deletions
-2
View File
@@ -8,7 +8,6 @@
Decryption::Decryption(const string& message) Decryption::Decryption(const string& message)
{ {
this->message = message; this->message = message;
//setupMap();
decryptMessage(); decryptMessage();
} }
Decryption::Decryption(const Password<>& py, const Key<>& ky) Decryption::Decryption(const Password<>& py, const Key<>& ky)
@@ -34,7 +33,6 @@ void Decryption::decryptMessage()
string messageToBeDecrypted{}, decryptedMessage{}; string messageToBeDecrypted{}, decryptedMessage{};
while(ioEvent >> messageToBeDecrypted); while(ioEvent >> messageToBeDecrypted);
//std::cout << messageToBeDecrypted << std::endl;
ioEvent.close(); ioEvent.close();
-1
View File
@@ -10,7 +10,6 @@ Encryption::Encryption(const string& message, const string& keyPath)
this->message = message; this->message = message;
setupMap(keyPath); setupMap(keyPath);
configurePasswordFileName(); configurePasswordFileName();
//encryptMessage();
} }
Encryption::Encryption(const Password<>& pass, const Key<>& ky) Encryption::Encryption(const Password<>& pass, const Key<>& ky)
{ {
-11
View File
@@ -7,17 +7,6 @@ GeneratePasswordFileName::GeneratePasswordFileName()
{ {
generatedFileName(); generatedFileName();
} }
/*
void GeneratePasswordFileName::setupTime()
{
time_t epochTime = time(0);
tm* currentTime = localtime(&epochTime);
year = 1900 + currentTime->tm_year;
month = 1 + currentTime->tm_mon;
dayOfMonth = currentTime->tm_mday;
}
*/
void GeneratePasswordFileName::generatedFileName() void GeneratePasswordFileName::generatedFileName()
{ {
filename.assign(dateString()); filename.assign(dateString());
+1
View File
@@ -9,6 +9,7 @@
#include"ViewingWindow.h" #include"ViewingWindow.h"
class MainWindow; class MainWindow;
class PasswordManagementWindow;
class KeyManagementWindow : public QDialog, public CommonWindow, public ViewingWindow class KeyManagementWindow : public QDialog, public CommonWindow, public ViewingWindow
{ {
+21 -35
View File
@@ -8,6 +8,7 @@
#include"FolderStructure.h" #include"FolderStructure.h"
#include"Key.h" #include"Key.h"
#include"Password.h" #include"Password.h"
#include"SaveFile.h" //Do not know if it is included somewhere
MainWindow::MainWindow() MainWindow::MainWindow()
{ {
@@ -15,7 +16,7 @@ MainWindow::MainWindow()
QWidget* w = 0; QWidget* w = 0;
ph = unique_ptr<PasswordManagementWindow>{new PasswordManagementWindow}; ph = unique_ptr<PasswordManagementWindow>{new PasswordManagementWindow};
kh = unique_ptr<KeyManagementWindow>{new KeyManagementWindow{w, mw, ph.get()}}; kh = unique_ptr<KeyManagementWindow>{new KeyManagementWindow{w, mw, ph.get()}};
sf = unique_ptr<SaveFile>{new SaveFile}; sf = unique_ptr<SaveFile>{new SaveFile{w, mw}};
setupMainWindow(); setupMainWindow();
} }
@@ -115,47 +116,14 @@ void MainWindow::switchControls(const bool enabled)
void MainWindow::requestFilename() void MainWindow::requestFilename()
{ {
std::cout<<"Start"<<std::endl; std::cout<<"Start"<<std::endl;
//sf.get()->show(); sf.get()->show();
SaveFile* sfo = new SaveFile{};
sfo->show();
//sfo->quit();
std::cout<<"End"<<std::endl; std::cout<<"End"<<std::endl;
} }
/*
* February 26, 2018
*
* Work on asking the user to enter a filename
*
* Update: February 27, 2018
*
* Continue working on asking the user for a filename.
* I got it working so the controls that are related to
* passwords are disabled. What needs to be done is
* have it so that the password is not encrypted until
* the button for confirming the password filename is
* clicked. Might have to create a helper function
* for the encryptPassword function
*/
void MainWindow::encryptPassword() void MainWindow::encryptPassword()
{ {
requestFilename(); requestFilename();
switchControlEnabling(); switchControlEnabling();
/**
QString passwordToEncrypt{textForCryption.get()->toPlainText()}, keyForEncryption{selectionBox.get()->currentText()};
auto passwordToEncryptString = passwordToEncrypt.toStdString(), keyForEncryptionString = FolderStructure::keyDirectory+keyForEncryption.toStdString();
std::cout<<"Generated filename that contains encrypted password: "<<passwordToEncryptString<<std::endl;
auto strKeyFilename = keyForEncryption.toStdString();
Password<> pass{};
Key<> k;
pass.setupDecryptedMessage(passwordToEncryptString);
k.setupFilename(strKeyFilename);
Encryption ec2{pass, k};
std::cout<<"Encrypted"<<std::endl;
ph.get()->populatePass();
*/
} }
void MainWindow::keyManagementWindow() { kh.get()->show(); } void MainWindow::keyManagementWindow() { kh.get()->show(); }
void MainWindow::passwordManageWindow() { ph.get()->show(); } void MainWindow::passwordManageWindow() { ph.get()->show(); }
@@ -174,3 +142,21 @@ void MainWindow::activateButton()
if (content.size()>0 && selectionBox.get()->count()>0) actionButton.get()->setEnabled(true); if (content.size()>0 && selectionBox.get()->count()>0) actionButton.get()->setEnabled(true);
else actionButton.get()->setEnabled(false); else actionButton.get()->setEnabled(false);
} }
void MainWindow::processEncryption()
{
QString passwordToEncrypt{textForCryption.get()->toPlainText()}, keyForEncryption{selectionBox.get()->currentText()};
auto passwordToEncryptString = passwordToEncrypt.toStdString(), keyForEncryptionString = FolderStructure::keyDirectory+keyForEncryption.toStdString();
std::cout<<"Generated filename that contains encrypted password: "<<passwordToEncryptString<<std::endl;
auto strKeyFilename = keyForEncryption.toStdString();
Password<> pass{SaveFile::filenameStr};
cout << "Password filename: " << pass.passwordFilename() << endl;
Key<> k;
pass.setupDecryptedMessage(passwordToEncryptString);
k.setupFilename(strKeyFilename);
Encryption ec2{pass, k};
std::cout<<"Encrypted"<<std::endl;
ph.get()->populatePass();
switchControlEnabling();
}
+6 -2
View File
@@ -10,11 +10,14 @@
#include<QAction> #include<QAction>
#include<QDockWidget> #include<QDockWidget>
#include<QWidget> #include<QWidget>
#include"KeyManagementWindow.h"
#include"PasswordManagementWindow.h"
#include"CommonWindow.h" #include"CommonWindow.h"
#include"KeyManagementWindow.h"
#include"SaveFile.h"
#include"PasswordManagementWindow.h"
class KeyManagementWindow; class KeyManagementWindow;
class PasswordManagementWindow;
class SaveFile;
class MainWindow : public QMainWindow, public CommonWindow class MainWindow : public QMainWindow, public CommonWindow
@@ -25,6 +28,7 @@ public:
~MainWindow() = default; ~MainWindow() = default;
void refreshComboBox(); void refreshComboBox();
void processEncryption();
signals: signals:
private slots: private slots:
void encryptPassword(); void encryptPassword();
+7 -10
View File
@@ -15,7 +15,7 @@ CXX = g++
DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC $(DEFINES) CFLAGS = -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS = -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC $(DEFINES) CXXFLAGS = -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC $(DEFINES)
INCPATH = -I. -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -I "/usr/include/boost" INCPATH = -I. -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -I /usr/include/boost
QMAKE = /usr/bin/qmake QMAKE = /usr/bin/qmake
DEL_FILE = rm -f DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d CHK_DIR_EXISTS= test -d
@@ -35,10 +35,10 @@ MOVE = mv -f
TAR = tar -cf TAR = tar -cf
COMPRESS = gzip -9f COMPRESS = gzip -9f
DISTNAME = PasswordEncryption1.0.0 DISTNAME = PasswordEncryption1.0.0
DISTDIR = /home/monde/Programming/C++/PasswordEncryption/.tmp/PasswordEncryption1.0.0 DISTDIR = /home/flueric/Programming/C++/PasswordEncryption/.tmp/PasswordEncryption1.0.0
LINK = g++ LINK = g++
LFLAGS = -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now LFLAGS = -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
LIBS = $(SUBLIBS) -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread -L "/usr/include/boost" -lboost_filesystem -lboost_system LIBS = $(SUBLIBS) -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread -L "/usr/include/boost" -lboost_system -lboost_filesystem
AR = ar cqs AR = ar cqs
RANLIB = RANLIB =
SED = sed SED = sed
@@ -137,7 +137,6 @@ DIST = /usr/lib/qt/mkspecs/features/spec_pre.prf \
/usr/lib/qt/mkspecs/features/qt_config.prf \ /usr/lib/qt/mkspecs/features/qt_config.prf \
/usr/lib/qt/mkspecs/linux-g++/qmake.conf \ /usr/lib/qt/mkspecs/linux-g++/qmake.conf \
/usr/lib/qt/mkspecs/features/spec_post.prf \ /usr/lib/qt/mkspecs/features/spec_post.prf \
.qmake.stash \
/usr/lib/qt/mkspecs/features/exclusive_builds.prf \ /usr/lib/qt/mkspecs/features/exclusive_builds.prf \
/usr/lib/qt/mkspecs/features/toolchain.prf \ /usr/lib/qt/mkspecs/features/toolchain.prf \
/usr/lib/qt/mkspecs/features/default_pre.prf \ /usr/lib/qt/mkspecs/features/default_pre.prf \
@@ -255,7 +254,6 @@ Makefile: PasswordEncryption.pro /usr/lib/qt/mkspecs/linux-g++/qmake.conf /usr/l
/usr/lib/qt/mkspecs/features/qt_config.prf \ /usr/lib/qt/mkspecs/features/qt_config.prf \
/usr/lib/qt/mkspecs/linux-g++/qmake.conf \ /usr/lib/qt/mkspecs/linux-g++/qmake.conf \
/usr/lib/qt/mkspecs/features/spec_post.prf \ /usr/lib/qt/mkspecs/features/spec_post.prf \
.qmake.stash \
/usr/lib/qt/mkspecs/features/exclusive_builds.prf \ /usr/lib/qt/mkspecs/features/exclusive_builds.prf \
/usr/lib/qt/mkspecs/features/toolchain.prf \ /usr/lib/qt/mkspecs/features/toolchain.prf \
/usr/lib/qt/mkspecs/features/default_pre.prf \ /usr/lib/qt/mkspecs/features/default_pre.prf \
@@ -335,7 +333,6 @@ Makefile: PasswordEncryption.pro /usr/lib/qt/mkspecs/linux-g++/qmake.conf /usr/l
/usr/lib/qt/mkspecs/features/qt_config.prf: /usr/lib/qt/mkspecs/features/qt_config.prf:
/usr/lib/qt/mkspecs/linux-g++/qmake.conf: /usr/lib/qt/mkspecs/linux-g++/qmake.conf:
/usr/lib/qt/mkspecs/features/spec_post.prf: /usr/lib/qt/mkspecs/features/spec_post.prf:
.qmake.stash:
/usr/lib/qt/mkspecs/features/exclusive_builds.prf: /usr/lib/qt/mkspecs/features/exclusive_builds.prf:
/usr/lib/qt/mkspecs/features/toolchain.prf: /usr/lib/qt/mkspecs/features/toolchain.prf:
/usr/lib/qt/mkspecs/features/default_pre.prf: /usr/lib/qt/mkspecs/features/default_pre.prf:
@@ -427,7 +424,7 @@ moc_KeyManagementWindow.cpp: CommonWindow.h \
KeyManagementWindow.h \ KeyManagementWindow.h \
moc_predefs.h \ moc_predefs.h \
/usr/bin/moc /usr/bin/moc
/usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Programming/C++/PasswordEncryption -I/home/monde/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include KeyManagementWindow.h -o moc_KeyManagementWindow.cpp /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/flueric/Programming/C++/PasswordEncryption -I/home/flueric/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.1 -I/usr/include/c++/7.3.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed -I/usr/include KeyManagementWindow.h -o moc_KeyManagementWindow.cpp
moc_MainWindow.cpp: KeyManagementWindow.h \ moc_MainWindow.cpp: KeyManagementWindow.h \
CommonWindow.h \ CommonWindow.h \
@@ -447,7 +444,7 @@ moc_MainWindow.cpp: KeyManagementWindow.h \
MainWindow.h \ MainWindow.h \
moc_predefs.h \ moc_predefs.h \
/usr/bin/moc /usr/bin/moc
/usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Programming/C++/PasswordEncryption -I/home/monde/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include MainWindow.h -o moc_MainWindow.cpp /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/flueric/Programming/C++/PasswordEncryption -I/home/flueric/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.1 -I/usr/include/c++/7.3.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed -I/usr/include MainWindow.h -o moc_MainWindow.cpp
moc_PasswordManagementWindow.cpp: CommonWindow.h \ moc_PasswordManagementWindow.cpp: CommonWindow.h \
ViewingWindow.h \ ViewingWindow.h \
@@ -455,14 +452,14 @@ moc_PasswordManagementWindow.cpp: CommonWindow.h \
PasswordManagementWindow.h \ PasswordManagementWindow.h \
moc_predefs.h \ moc_predefs.h \
/usr/bin/moc /usr/bin/moc
/usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Programming/C++/PasswordEncryption -I/home/monde/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include PasswordManagementWindow.h -o moc_PasswordManagementWindow.cpp /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/flueric/Programming/C++/PasswordEncryption -I/home/flueric/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.1 -I/usr/include/c++/7.3.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed -I/usr/include PasswordManagementWindow.h -o moc_PasswordManagementWindow.cpp
moc_SaveFile.cpp: CommonWindow.h \ moc_SaveFile.cpp: CommonWindow.h \
ViewingWindow.h \ ViewingWindow.h \
SaveFile.h \ SaveFile.h \
moc_predefs.h \ moc_predefs.h \
/usr/bin/moc /usr/bin/moc
/usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/monde/Programming/C++/PasswordEncryption -I/home/monde/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.0 -I/usr/include/c++/7.3.0/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.0/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include-fixed -I/usr/include SaveFile.h -o moc_SaveFile.cpp /usr/bin/moc $(DEFINES) --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/flueric/Programming/C++/PasswordEncryption -I/home/flueric/Programming/C++/PasswordEncryption -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/7.3.1 -I/usr/include/c++/7.3.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.3.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed -I/usr/include SaveFile.h -o moc_SaveFile.cpp
compiler_moc_objc_header_make_all: compiler_moc_objc_header_make_all:
compiler_moc_objc_header_clean: compiler_moc_objc_header_clean:
+9
View File
@@ -25,6 +25,7 @@ public:
void setupEncryptedMessage(const S&); void setupEncryptedMessage(const S&);
void setupDecryptedMessage(const S&); void setupDecryptedMessage(const S&);
void setupPasswordFilename(); void setupPasswordFilename();
void setupPasswordFilename(const S&);
void setupDate(); void setupDate();
S retrieveEncryptedMessage() const; S retrieveEncryptedMessage() const;
S retrieveDecryptedMessage() const; S retrieveDecryptedMessage() const;
@@ -59,6 +60,14 @@ void Password<S>::setupPasswordFilename()
} }
} }
template<typename S> template<typename S>
void Password<S>::setupPasswordFilename(const S& fin)
{
for (auto passwordNameDoesNotExist = true; passwordNameDoesNotExist; passwordNameDoesNotExist = repetitive())
{
filename.assign(fin);
}
}
template<typename S>
S Password<S>::retrieveEncryptedMessage() const { return encryptedMessage; } S Password<S>::retrieveEncryptedMessage() const { return encryptedMessage; }
template<typename S> template<typename S>
S Password<S>::retrieveDecryptedMessage() const { return decryptedMessage; } S Password<S>::retrieveDecryptedMessage() const { return decryptedMessage; }
+12 -4
View File
@@ -1,9 +1,11 @@
#include<QString>
#include"SaveFile.h" #include"SaveFile.h"
SaveFile::SaveFile(QWidget* parent) : QDialog(parent) string SaveFile::filenameStr = "default.txt";
{
setupWindow(); SaveFile::SaveFile(QWidget* parent) : QDialog(parent) { setupWindow(); }
} SaveFile::SaveFile(QWidget* parent, MainWindow* mw) : QDialog(parent), mw(mw) { setupWindow(); }
void SaveFile::setupWindow() void SaveFile::setupWindow()
{ {
@@ -34,5 +36,11 @@ void SaveFile::connections()
} }
void SaveFile::saveFileAs() void SaveFile::saveFileAs()
{ {
QString fs = filename.get()->text();
filenameStr.assign(fs.toUtf8().constData());
filenameStr.append(".txt");
mw.get()->processEncryption();
this->hide(); this->hide();
} }
+11
View File
@@ -1,20 +1,31 @@
#ifndef SAVEFILE_H_ #ifndef SAVEFILE_H_
#define SAVEFILE_H_ #define SAVEFILE_H_
#include<iostream>
#include<string>
#include"CommonWindow.h" #include"CommonWindow.h"
#include"MainWindow.h"
#include"ViewingWindow.h" #include"ViewingWindow.h"
class MainWindow;
using namespace std;
class SaveFile : public QDialog, public CommonWindow, public ViewingWindow class SaveFile : public QDialog, public CommonWindow, public ViewingWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
SaveFile(QWidget* parent = 0); SaveFile(QWidget* parent = 0);
explicit SaveFile(QWidget* parent = 0, MainWindow* mw = 0);
static string filenameStr;
private: private:
void setupWindow(); void setupWindow();
void connections(); void connections();
unique_ptr<QLineEdit> filename; unique_ptr<QLineEdit> filename;
unique_ptr<QPushButton> saveIt; unique_ptr<QPushButton> saveIt;
unique_ptr<MainWindow> mw;
private slots: private slots:
void saveFileAs(); void saveFileAs();
}; };