Skip to content

Commit

Permalink
UI completed
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Oct 6, 2024
1 parent fc7e8ff commit 5a602a1
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 15 deletions.
26 changes: 13 additions & 13 deletions CMakeLists.txt.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 14.0.1, 2024-10-04T22:04:12. -->
<!-- Written by QtCreator 14.0.1, 2024-10-06T22:30:56. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -102,14 +102,14 @@
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Debug
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_GENERATOR:STRING=Ninja</value>
<value type="QString" key="CMake.Source.Directory">/data/Code/Qt/Notepad--</value>
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Code/Qt/Notepad--/build/Desktop-Debug</value>
Expand Down Expand Up @@ -160,14 +160,14 @@
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE:STRING=Release
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
-DCMAKE_GENERATOR:STRING=Ninja
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
-DCMAKE_GENERATOR:STRING=Ninja</value>
<value type="QString" key="CMake.Source.Directory">/data/Code/Qt/Notepad--</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/data/Code/Qt/Notepad--/build/Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
Expand Down
23 changes: 23 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow) {
ui->setupUi(this);

QMenu *menuLanguage = ui->menu_Language;
QMenu *menuZ = new QMenu("z", this);
QAction *actionZ80 = new QAction("Z80", this);
menuZ->addAction(actionZ80);
menuLanguage->addMenu(menuZ);
connect(actionZ80, &QAction::triggered, this, &MainWindow::onActionZ80Triggered);

QActionGroup *group = new QActionGroup(this);
group->setExclusive(true); // Ensure only one action is checked at a time

Expand Down Expand Up @@ -305,3 +312,19 @@ void MainWindow::on_action_Word_wrap_triggered()
// TODO: Word Wrap
}

void MainWindow::onActionZ80Triggered()
{
qDebug() << "Z80 action triggered!";
}

void MainWindow::on_actionAbout_Qt_triggered()
{
QApplication::aboutQt();
}


void MainWindow::on_action_About_Notepad_triggered()
{
// TODO: About Remisa Yousefvand
}

5 changes: 5 additions & 0 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ private slots:
void on_actionC_lose_all_triggered();
void on_actionC_3_triggered();
void on_actionPython_triggered();
void onActionZ80Triggered();

void on_actionSav_e_all_triggered();

Expand All @@ -57,6 +58,10 @@ private slots:

void on_action_Word_wrap_triggered();

void on_actionAbout_Qt_triggered();

void on_action_About_Notepad_triggered();

private:
Ui::MainWindow *ui;
void initialize();
Expand Down
22 changes: 20 additions & 2 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@
<addaction name="actionInterpret_as_UTF_16BE_UCS_2_Big_Endian"/>
<addaction name="actionInterpret_As"/>
<addaction name="separator"/>
<addaction name="separator"/>
<addaction name="action_Reload_file_interpreted_as"/>
<addaction name="actionConvert_to_UTF_8"/>
<addaction name="actionConvert_to_UTF_8_without_BOM"/>
Expand Down Expand Up @@ -519,6 +518,7 @@
<string>Settin&amp;gs</string>
</property>
<addaction name="action_Prefrences"/>
<addaction name="separator"/>
<addaction name="action_Show_menu_bar"/>
<addaction name="actionS_how_Toolbar"/>
</widget>
Expand Down Expand Up @@ -834,6 +834,9 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset theme="media-playlist-repeat"/>
</property>
<property name="text">
<string>&amp;Word wrap</string>
</property>
Expand Down Expand Up @@ -900,7 +903,7 @@
</action>
<action name="actionConvert_to_UTF_8">
<property name="text">
<string>Convert to UTF-8</string>
<string>&amp;Convert to UTF-8</string>
</property>
</action>
<action name="actionConvert_to_UTF_8_without_BOM">
Expand Down Expand Up @@ -929,11 +932,23 @@
</property>
</action>
<action name="action_Show_menu_bar">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>&amp;Show Menubar</string>
</property>
</action>
<action name="actionS_how_Toolbar">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="text">
<string>S&amp;how Toolbar</string>
</property>
Expand All @@ -949,6 +964,9 @@
</property>
</action>
<action name="action_Open_a_new_window">
<property name="icon">
<iconset theme="window-new"/>
</property>
<property name="text">
<string>&amp;Open a new window</string>
</property>
Expand Down

0 comments on commit 5a602a1

Please sign in to comment.