QtPass  1.2.1
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;
14 class Util {
15 public:
16  static QString findBinaryInPath(QString binary);
17  static QString findPasswordStore();
18  static QString normalizeFolderPath(QString path);
19  static bool checkConfig();
20  static void qSleep(int ms);
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:77
The QSortFilterProxyModel for handling filesystem searches.
Definition: storemodel.h:16
static void copyDir(const QString src, const QString dest)
Definition: util.cpp:164
static QString getDir(const QModelIndex &index, bool forPass, const QFileSystemModel &model, const StoreModel &storeModel)
Util::getDir get selectd folder path.
Definition: util.cpp:148
static void qSleep(int ms)
Util::qSleep because . . windows sleep.
Definition: util.cpp:131
Some static utilities to be used elsewhere.
Definition: util.h:14
static QString findPasswordStore()
Util::findPasswordStore look for common .password-store folder location.
Definition: util.cpp:43
static bool checkConfig()
Util::checkConfig do we have prequisite settings?
Definition: util.cpp:120
static QString normalizeFolderPath(QString path)
Util::normalizeFolderPath let&#39;s always end folders with a QDir::separator()
Definition: util.cpp:66