QtPass  1.2.3
Multi-platform GUI for pass, the standard unix password manager.
util.h
Go to the documentation of this file.
1 #ifndef UTIL_H_
2 #define UTIL_H_
3 
4 #include "storemodel.h"
5 #include <QFileSystemModel>
6 #include <QProcessEnvironment>
7 #include <QString>
8 
9 class StoreModel;
10 
15 class Util {
16 public:
17  static QString findBinaryInPath(QString binary);
18  static QString findPasswordStore();
19  static QString normalizeFolderPath(QString path);
20  static bool checkConfig();
21  static QString getDir(const QModelIndex &index, bool forPass,
22  const QFileSystemModel &model,
23  const StoreModel &storeModel);
24  static void copyDir(const QString src, const QString dest);
25 
26 private:
27  static void initialiseEnvironment();
28  static QProcessEnvironment _env;
29  static bool _envInitialised;
30 };
31 
32 #endif // UTIL_H_
static QString findBinaryInPath(QString binary)
Util::findBinaryInPath search for executables.
Definition: util.cpp:79
The QSortFilterProxyModel for handling filesystem searches.
Definition: storemodel.h:12
static void copyDir(const QString src, const QString dest)
Definition: util.cpp:165
static QString getDir(const QModelIndex &index, bool forPass, const QFileSystemModel &model, const StoreModel &storeModel)
Util::getDir get selectd folder path.
Definition: util.cpp:148
Some static utilities to be used elsewhere.
Definition: util.h:15
static QString findPasswordStore()
Util::findPasswordStore look for common .password-store folder location.
Definition: util.cpp:45
static bool checkConfig()
Util::checkConfig do we have prequisite settings?
Definition: util.cpp:131
static QString normalizeFolderPath(QString path)
Util::normalizeFolderPath let&#39;s always end folders with a QDir::separator()
Definition: util.cpp:68