Skip to content

Commit

Permalink
Merge pull request #34 from yunusemreyilmazz/dev
Browse files Browse the repository at this point in the history
New Main Menu Screen
  • Loading branch information
ignis-sec authored May 17, 2021
2 parents d62c847 + ccc6b09 commit 3ce219c
Show file tree
Hide file tree
Showing 13 changed files with 513 additions and 4 deletions.
34 changes: 34 additions & 0 deletions MarkovPasswordsGUI/CLI.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "CLI.h"
#include <fstream>
#include <Windows.h>
#include "Train.h"




CLI::CLI(QWidget* parent)
: QMainWindow(parent)
{
ui.setupUi(this);

QObject::connect(ui.startButton, &QPushButton::clicked, this, [this] {start(); });
QObject::connect(ui.commandLinkButton_2, &QPushButton::clicked, this, [this] {statistics(); });
QObject::connect(ui.commandLinkButton, &QPushButton::clicked, this, [this] {about(); });

}

void CLI::start() {
Train* w = new Train;
w->show();
this->close();
}
void CLI::statistics() {
/*
statistic will show
*/
}
void CLI::about() {
/*
about button
*/
}
18 changes: 18 additions & 0 deletions MarkovPasswordsGUI/CLI.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_CLI.h"


class CLI :public QMainWindow {
Q_OBJECT
public:
CLI(QWidget* parent = Q_NULLPTR);

private:
Ui::CLI ui;

public slots:
void start();
void statistics();
void about();
};
138 changes: 138 additions & 0 deletions MarkovPasswordsGUI/CLI.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CLI</class>
<widget class="QWidget" name="CLI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1130</width>
<height>699</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">#Form{
background-image: url(:/back/views/hackback.jpg);

}
QFrame{
background:rgba(0,0,0,0.8);
border-radius:15px;
}

QPushButton{
background:#03a9f4;
color:#fff;
border-radius:15px;
font-size:22px

}
QPushButton:hover{
color: #03a9f4;
background-color:#fff;
}
QLabel{
color:#03a9f4;
background:transparent;
font-size:30px;

}</string>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>60</x>
<y>110</y>
<width>991</width>
<height>511</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#Form{
background :#333;
}
</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QPushButton" name="startButton">
<property name="geometry">
<rect>
<x>380</x>
<y>320</y>
<width>211</width>
<height>51</height>
</rect>
</property>
<property name="text">
<string>START</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>160</x>
<y>90</y>
<width>681</width>
<height>51</height>
</rect>
</property>
<property name="text">
<string>WELCOME TO MARKOV PASSWORD GENERATOR!</string>
</property>
</widget>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton">
<property name="geometry">
<rect>
<x>940</x>
<y>60</y>
<width>121</width>
<height>48</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QCommandLinkButton{
background:#48C9B0;
font-family:Ariel;
font-size:17px;
}</string>
</property>
<property name="text">
<string>About</string>
</property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton_2">
<property name="geometry">
<rect>
<x>810</x>
<y>60</y>
<width>121</width>
<height>48</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QCommandLinkButton{
background:#48C9B0;
font-family:Ariel;
font-size:17px;

}</string>
</property>
<property name="text">
<string>Statistics</string>
</property>
</widget>
</widget>
<resources>
<include location="backimage.qrc"/>
</resources>
<connections/>
</ui>
43 changes: 43 additions & 0 deletions MarkovPasswordsGUI/Comparison.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1130</width>
<height>699</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWebEngineView" name="webEngineView">
<property name="geometry">
<rect>
<x>180</x>
<y>100</y>
<width>821</width>
<height>391</height>
</rect>
</property>
<property name="url">
<url>
<string>about:blank</string>
</url>
</property>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>QWebEngineView</class>
<extends>QWidget</extends>
<header location="global">QtWebEngineWidgets/QWebEngineView</header>
</customwidget>
</customwidgets>
<resources>
<include location="backimage.qrc"/>
</resources>
<connections/>
</ui>
16 changes: 14 additions & 2 deletions MarkovPasswordsGUI/MarkovPasswordsGUI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
<QtModules>core;gui;widgets;webenginewidgets;</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
<QtInstall>msvc2017_64</QtInstall>
<QtInstall>5.15.2_msvc2019_64</QtInstall>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
<QtModules>core;gui;widgets;webenginewidgets;</QtModules>
<QtBuildConfig>release</QtBuildConfig>
<QtInstall>5.15.0_msvc2019_64</QtInstall>
<QtInstall>5.15.2_msvc2019_64</QtInstall>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
Expand Down Expand Up @@ -86,8 +86,11 @@
<ItemGroup>
<QtRcc Include="MarkovPasswordsGUI.qrc" />
<QtUic Include="about.ui" />
<QtUic Include="CLI.ui" />
<QtUic Include="Comparison.ui" />
<QtUic Include="MarkovPasswordsGUI.ui" />
<QtUic Include="menu.ui" />
<QtUic Include="Train.ui" />
</ItemGroup>
<ItemGroup>
<None Include="comparison.htm">
Expand All @@ -103,9 +106,11 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="about.cpp" />
<ClCompile Include="CLI.cpp" />
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\MarkovPasswordsGUI.cpp" />
<ClCompile Include="src\menu.cpp" />
<ClCompile Include="Train.cpp" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="src\MarkovPasswordsGUI.h" />
Expand All @@ -117,8 +122,15 @@
<QtMoc Include="about.h" />
</ItemGroup>
<ItemGroup>
<Image Include="..\..\..\..\Desktop\hackback.jpg" />
<Image Include="views\startup.jpg" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="CLI.h" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="Train.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
Expand Down
24 changes: 24 additions & 0 deletions MarkovPasswordsGUI/MarkovPasswordsGUI.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
<ClCompile Include="about.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CLI.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Train.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<QtMoc Include="src\MarkovPasswordsGUI.h">
Expand All @@ -72,6 +78,12 @@
<QtMoc Include="about.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="CLI.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="Train.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<QtUic Include="menu.ui">
Expand All @@ -80,10 +92,22 @@
<QtUic Include="about.ui">
<Filter>Resource Files</Filter>
</QtUic>
<QtUic Include="CLI.ui">
<Filter>Resource Files</Filter>
</QtUic>
<QtUic Include="Comparison.ui">
<Filter>Resource Files</Filter>
</QtUic>
<QtUic Include="Train.ui">
<Filter>Resource Files</Filter>
</QtUic>
</ItemGroup>
<ItemGroup>
<Image Include="views\startup.jpg">
<Filter>Source Files\views</Filter>
</Image>
<Image Include="..\..\..\..\Desktop\hackback.jpg">
<Filter>Source Files\views</Filter>
</Image>
</ItemGroup>
</Project>
28 changes: 28 additions & 0 deletions MarkovPasswordsGUI/Train.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "Train.h"
#include <fstream>
#include <Windows.h>




Train::Train(QWidget* parent)
: QMainWindow(parent)
{
ui.setupUi(this);

QObject::connect(ui.pushButton, &QPushButton::clicked, this, [this] {open(); });
QObject::connect(ui.pushButton_2, &QPushButton::clicked, this, [this] {train(); });


}

void Train::open() {
// Start* w = new Start;
//w->show();
//this->close();
}
void Train::train() {
/*
train codes;
*/
}
17 changes: 17 additions & 0 deletions MarkovPasswordsGUI/Train.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_Train.h"


class Train :public QMainWindow {
Q_OBJECT
public:
Train(QWidget* parent = Q_NULLPTR);

private:
Ui::Train ui;

public slots:
void open();
void train();
};
Loading

0 comments on commit 3ce219c

Please sign in to comment.