pqUsageLoggingBehavior.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqUsageLoggingBehavior_h
5 #define pqUsageLoggingBehavior_h
6 
7 #include "pqApplicationComponentsModule.h" // for exports
8 #include <QObject>
9 
10 class QJsonObject;
11 
64 {
65  Q_OBJECT
66  typedef QObject Superclass;
67 
68 public:
69  pqUsageLoggingBehavior(QObject* parent = nullptr);
70  ~pqUsageLoggingBehavior() override;
71 
73 
77  static void setConfigFileName(const QString& fname);
78  static const QString& configFileName() { return pqUsageLoggingBehavior::ConfigFileName; }
80 private:
81  Q_DISABLE_COPY(pqUsageLoggingBehavior);
82 
86  QString configurationFile() const;
87 
88  void logUsage(const QJsonObject& config);
89  static QString substitute(const QString&);
90  static QString ConfigFileName;
91 };
92 
93 #endif
static const QString & configFileName()
Get/set the name of the configuration file.
#define PQAPPLICATIONCOMPONENTS_EXPORT
behavior to log usage on application startup.