summaryrefslogtreecommitdiffstats
path: root/src/util.h
blob: b980edf8a9af1be0d6f4443c976a0867f46670d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef UTIL_H_
#define UTIL_H_

#include "storemodel.h"
#include <QFileSystemModel>
#include <QProcessEnvironment>
#include <QString>

class StoreModel;
/*!
    \class Util
    \brief Some static utilities to be used elsewhere.
 */
class Util {
public:
  static QString findBinaryInPath(QString binary);
  static QString findPasswordStore();
  static QString normalizeFolderPath(QString path);
  static bool checkConfig();
  static void qSleep(int ms);
  static QString getDir(const QModelIndex &index, bool forPass,
                        const QFileSystemModel &model,
                        const StoreModel &storeModel);
  static void copyDir(const QString src, const QString dest);

private:
  static void initialiseEnvironment();
  static QProcessEnvironment _env;
  static bool _envInitialised;
};

#endif // UTIL_H_