commit 69db97d70e0829713829274e056479d219e92a91 Author: Dober Date: Sun Dec 17 12:00:23 2017 +0300 все с чистого листа diff --git a/Passgen.pro b/Passgen.pro new file mode 100644 index 0000000..2ca7720 --- /dev/null +++ b/Passgen.pro @@ -0,0 +1,35 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2017-12-17T11:28:21 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = Passgen +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which as been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + + +SOURCES += main.cpp\ + boss.cpp + +HEADERS += boss.h + +DISTFILES += \ + README.md + +RESOURCES += \ + res.qrc diff --git a/Passgen.pro.user b/Passgen.pro.user new file mode 100644 index 0000000..7b54fbe --- /dev/null +++ b/Passgen.pro.user @@ -0,0 +1,318 @@ + + + + + + EnvironmentId + {1eb977fe-0ce0-4504-b617-7bce6e61f3b2} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.7.1 MSVC2015_64bit + Desktop Qt 5.7.1 MSVC2015_64bit + qt.57.win64_msvc2015_64_kit + 0 + 0 + 0 + + D:/GitPrjs/build-Passgen-Desktop_Qt_5_7_1_MSVC2015_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Сборка + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Сборка + + ProjectExplorer.BuildSteps.Build + + + + true + Сборка + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Очистка + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Отладка + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + D:/GitPrjs/build-Passgen-Desktop_Qt_5_7_1_MSVC2015_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Сборка + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Сборка + + ProjectExplorer.BuildSteps.Build + + + + true + Сборка + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Очистка + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Выпуск + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + D:/GitPrjs/build-Passgen-Desktop_Qt_5_7_1_MSVC2015_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Сборка + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Сборка + + ProjectExplorer.BuildSteps.Build + + + + true + Сборка + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Очистка + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Профилирование + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Установка + + ProjectExplorer.BuildSteps.Deploy + + 1 + Локальная установка + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Passgen + + Qt4ProjectManager.Qt4RunConfiguration:D:/GitPrjs/Passgen/Passgen.pro + true + + Passgen.pro + false + + + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b64025 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Попытка переписать дубль over 99999 diff --git a/boss.cpp b/boss.cpp new file mode 100644 index 0000000..33625df --- /dev/null +++ b/boss.cpp @@ -0,0 +1,52 @@ +#include "boss.h" + +boss::boss(QWidget *parent) + : QMainWindow(parent) +{ + trayIco = new QSystemTrayIcon(this); + connect(trayIco, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(ia(QSystemTrayIcon::ActivationReason))); + QIcon temp = QIcon(":/lock.png"); + trayIco->setIcon(temp); + + trayIco->show(); +} +/** + подмена внешнего вида контекс меню + * @brief boss::ttt + */ +void boss::ttt() +{ + +} + +/** + Обработка действий с менюхой + * @brief boss::ia + * @param reason + */ +void boss::ia(QSystemTrayIcon::ActivationReason reason) +{ + switch(reason) + { + case QSystemTrayIcon::Context: + ttt(); + break; + default: + break; + } +} + +boss::~boss() +{ + +} + +/** + * @brief boss::mcm + * @return позицию иконки в трее (x,y,width,height) + */ +QRect boss::mcm() +{ + QRect *temp; + return temp +} diff --git a/boss.h b/boss.h new file mode 100644 index 0000000..884ceba --- /dev/null +++ b/boss.h @@ -0,0 +1,22 @@ +#ifndef BOSS_H +#define BOSS_H + +#include +#include + +class boss : public QMainWindow +{ + Q_OBJECT + +public: + boss(QWidget *parent = 0); + ~boss(); +private: + QSystemTrayIcon *trayIco; + QRect *mcm(); +private slots; + void ttt(); + void ia(QSystemTrayIcon::ActivationReason reason); +}; + +#endif // BOSS_H diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..ba89707 --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +#include "boss.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + boss w; + //w.show(); это нам нах ненужно + + return a.exec(); +} diff --git a/pgi.ico b/pgi.ico new file mode 100644 index 0000000..0611140 Binary files /dev/null and b/pgi.ico differ diff --git a/res.qrc b/res.qrc new file mode 100644 index 0000000..9944716 --- /dev/null +++ b/res.qrc @@ -0,0 +1,5 @@ + + + pgi.ico + +