1
0
mirror of https://github.com/altlinux/admc.git synced 2025-04-02 10:50:15 +03:00

Created ADMC (QApplication) wrapper

This commit is contained in:
Игорь Чудов 2020-06-03 21:06:40 +04:00
parent 5432fee5a6
commit 3aaaa9d0d4
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC
2 changed files with 70 additions and 0 deletions

32
src/Application.cpp Normal file
View File

@ -0,0 +1,32 @@
/*
* ADMC - AD Management Center
*
* Copyright (C) 2020 BaseALT Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "Application.h"
ADMC::ADMC(int& argc, char** argv) : QApplication(argc, argv) {
this->connection = new adldap::AdConnection();
}
adldap::AdConnection*
ADMC::get_connection() {
return this->connection;
}

38
src/Application.h Normal file
View File

@ -0,0 +1,38 @@
/*
* ADMC - AD Management Center
*
* Copyright (C) 2020 BaseALT Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(__ADMC_APPLICATION_H)
#define __ADMC_APPLICATION_H 1
#include "ad_connection.h"
#include <QApplication>
class ADMC final: public QApplication {
Q_OBJECT
adldap::AdConnection* connection;
public:
ADMC(int& argc, char** argv);
adldap::AdConnection* get_connection();
};
#endif /* __ADMC_APPLICATION_H */