??Manger class created
first working menuItem created
This commit is contained in:
parent
20cea86b01
commit
019c5237a6
@ -19,6 +19,8 @@ set(PROJECT_SOURCES
|
||||
mainwindow.cpp
|
||||
mainwindow.h
|
||||
mainwindow.ui
|
||||
manager.h
|
||||
manager.cpp
|
||||
)
|
||||
|
||||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
|
||||
@ -1,11 +1,19 @@
|
||||
#include "mainwindow.h"
|
||||
#include "./ui_mainwindow.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCreateNewDatabase_triggered(){
|
||||
std::cout << "clicked" << std::endl;
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
||||
@ -17,5 +17,8 @@ public:
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
private slots:
|
||||
void on_actionCreateNewDatabase_triggered();
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
@ -11,12 +11,70 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
<string>Оконное приложение, управляющее БД</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QTableView" name="tableViewEmployees">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>10</y>
|
||||
<width>541</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar"/>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<widget class="QTableView" name="tableView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>231</width>
|
||||
<height>561</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>Файл</string>
|
||||
</property>
|
||||
<addaction name="actionCreateNewDatabase"/>
|
||||
<addaction name="actionOpenDatabase"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionExit"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
</widget>
|
||||
<action name="actionCreateNewDatabase">
|
||||
<property name="text">
|
||||
<string>Создать новую базу данных…</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenDatabase">
|
||||
<property name="text">
|
||||
<string>Открыть созданную ранее базу данных…</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExit">
|
||||
<property name="text">
|
||||
<string>Выход</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
6
PasswordManager/manager.cpp
Normal file
6
PasswordManager/manager.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "manager.h"
|
||||
|
||||
Manager::Manager()
|
||||
{
|
||||
|
||||
}
|
||||
17
PasswordManager/manager.h
Normal file
17
PasswordManager/manager.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef MANAGER_H
|
||||
#define MANAGER_H
|
||||
|
||||
//#include <QtSql>
|
||||
|
||||
|
||||
class Manager
|
||||
{
|
||||
public:
|
||||
Manager();
|
||||
private:
|
||||
// QSqlDatabase m_db; // объект базы данных.
|
||||
// QSqlQuery *query; // указатель на запрос.
|
||||
// QSqlTableModel *model; // указатель на таблицу данных в приложении.
|
||||
};
|
||||
|
||||
#endif // MANAGER_H
|
||||
Loading…
Reference in New Issue
Block a user