tomb.h (1869B)
1 /* Tomb - encrypted storage undertaker 2 * 3 * (c) Copyright 2015 Gianluca Montecchi <gian@grys.it> 4 * 5 * This source code is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Public License as published 7 * by the Free Software Foundation; either version 3 of the License, 8 * or (at your option) any later version. 9 * 10 * This source code is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * Please refer to the GNU Public License for more details. 14 * 15 * You should have received a copy of the GNU Public License along with 16 * this source code; if not, write to: 17 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 20 #ifndef DIALOG_H 21 #define DIALOG_H 22 23 #include <QDialog> 24 #include <QWidget> 25 #include <QIcon> 26 #include <QSystemTrayIcon> 27 #include <QMenu> 28 #include <QAction> 29 #include <QDebug> 30 #include <QCoreApplication> 31 #include <QApplication> 32 #include <QDir> 33 #include <QDesktopServices> 34 #include <QUrl> 35 #include <QProcess> 36 37 class Tomb : public QDialog 38 { 39 Q_OBJECT 40 41 public: 42 Tomb(QWidget *parent = 0); 43 ~Tomb(); 44 45 46 QIcon icon; 47 QSystemTrayIcon *trayIcon; 48 QMenu *trayIconMenu; 49 QAction *menu_tombExplore; 50 QAction *menu_tombClose; 51 QAction *menu_tombSlam; 52 53 private: 54 void tombBuildMenu(); 55 56 QString tombPath; 57 QString tombName; 58 QFileInfo info; 59 QString tombMountPoint; 60 61 private slots: 62 virtual void closeEvent(QCloseEvent *event); 63 64 public slots: 65 void tombExplore(); 66 void tombClose(); 67 void tombSlam(); 68 void tombCheckCmdRet(int exitCode, QProcess::ExitStatus); 69 void tombStartError(QProcess::ProcessError err); 70 }; 71 72 #endif // DIALOG_H