X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fapplication.hpp;h=75ddbc0603a5b62936caa028def364dd85b38fa7;hb=144e72c9ec677e7df35d37d7de6e8a18bb3f2ba1;hp=8d0ebd4d581e9995495d777b9cb2473dcba991a2;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f;p=pulseview.git diff --git a/pv/application.hpp b/pv/application.hpp index 8d0ebd4d..75ddbc06 100644 --- a/pv/application.hpp +++ b/pv/application.hpp @@ -14,21 +14,62 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #ifndef PULSEVIEW_PV_APPLICATION_HPP #define PULSEVIEW_PV_APPLICATION_HPP +#include + #include +#include +#include + +#include + +#include "globalsettings.hpp" -class Application : public QApplication +using std::shared_ptr; +using std::pair; +using std::vector; + +class Application : public QApplication, public pv::GlobalSettingsInterface { + Q_OBJECT + public: Application(int &argc, char* argv[]); + + const QStringList get_languages() const; + const QString get_language_editors(const QString& language) const; + void switch_language(const QString& language); + + void on_setting_changed(const QString &key, const QVariant &value); + + void collect_version_info(shared_ptr context); + void print_version_info(); + + vector< pair > get_version_info() const; + vector get_fw_path_list() const; + vector get_pd_path_list() const; + vector< pair > get_driver_list() const; + vector< pair > get_input_format_list() const; + vector< pair > get_output_format_list() const; + vector< pair > get_pd_list() const; + private: bool notify(QObject *receiver, QEvent *event); + + vector< pair > version_info_; + vector fw_path_list_; + vector pd_path_list_; + vector< pair > driver_list_; + vector< pair > input_format_list_; + vector< pair > output_format_list_; + vector< pair > pd_list_; + + QTranslator app_translator_, qt_translator_, qtbase_translator_; }; #endif // PULSEVIEW_PV_APPLICATION_HPP