"Fossies" - the Fresh Open Source Software Archive

Member "zuluCrypt-5.7.1/plugins/mainwindow.h" (30 Jan 2020, 2573 Bytes) of package /linux/misc/zuluCrypt-5.7.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mainwindow.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 5.7.0_vs_5.7.1.

    1 /*
    2  *
    3  *  Copyright (c) 2012
    4  *  name : Francis Banyikwa
    5  *  email: mhogomchungu@gmail.com
    6  *  This program is free software: you can redistribute it and/or modify
    7  *  it under the terms of the GNU General Public License as published by
    8  *  the Free Software Foundation, either version 2 of the License, or
    9  *  (at your option) any later version.
   10  *
   11  *  This program is distributed in the hope that it will be useful,
   12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14  *  GNU General Public License for more details.
   15  *
   16  *  You should have received a copy of the GNU General Public License
   17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
   18  */
   19 
   20 #ifndef MAINWINDOW_H
   21 #define MAINWINDOW_H
   22 
   23 #include <QWidget>
   24 #include <QAction>
   25 #include <QMessageBox>
   26 #include <QObject>
   27 #include <QString>
   28 #include <QByteArray>
   29 #include <QFileDialog>
   30 #include <QFile>
   31 #include <QVector>
   32 #include <QDir>
   33 #include <QProcess>
   34 #include <QCloseEvent>
   35 #include "../zuluCrypt-gui/dialogmsg.h"
   36 #include <functional>
   37 #include <memory>
   38 
   39 namespace Ui {
   40 class MainWindow ;
   41 }
   42 
   43 class MainWindow : public QWidget
   44 {
   45     Q_OBJECT
   46 public:
   47     using function_t = std::function<QByteArray( const QVector<QString>&,const QString& keyFile,const QString& password )> ;
   48 
   49     MainWindow( MainWindow::function_t,QWidget * parent = 0 ) ;
   50     void setToken( char * const * ) ;
   51     void setApplicationName( const QString& ) ;
   52     void setkeyLabel( const QString& ) ;
   53     void setheaderPath( const QString& ) ;
   54     void setkeyFileLabel( const QString& ) ;
   55     void setButtonIcon( const QString& ) ;
   56     void setRequireKey( bool = true ) ;
   57     void setRequireKeyFile( bool = true ) ;
   58     void setKeyFileAsKey( void ) ;
   59     void Show( void ) ;
   60     void setExe( const QVector<QString>& exe ) ;
   61     void setfindExeFunction( std::function<QString( QVector<QString>&,const QVector<QString>& )> ) ;
   62     ~MainWindow() ;
   63 private slots:
   64     void defaultButton( void ) ;
   65     void pbOpen( void ) ;
   66     void pbCancel( void ) ;
   67     void pbKeyFile( void ) ;
   68 private:
   69     void closeEvent( QCloseEvent * ) ;
   70     void disableAll( void ) ;
   71     void enableAlll( void ) ;
   72     void SetFocus( void ) ;
   73     void Exit( int ) ;
   74     void cancelled( void ) ;
   75     Ui::MainWindow * m_ui ;
   76     QString m_appName ;
   77     bool m_printToStdOut ;
   78     bool m_working ;
   79     bool m_requireKey ;
   80     bool m_requireKeyFile ;
   81     bool m_keyfileAsKey = false ;
   82     QVector<QString> m_exe ;
   83     void * m_handle ;
   84     MainWindow::function_t m_function ;
   85     std::function<QString( QVector<QString>&,const QVector<QString>& )> m_findExecutable ;
   86 };
   87 
   88 #endif // MAINWINDOW_H