X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fapplication.hpp;h=bfe4657009ae82407e139261914eb22ff461d2c9;hb=2802b9ec97992323dc797c1b2cd5f9213e3d6932;hp=5a80ec865dd76b22f476efe353b79199745cec48;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329;p=pulseview.git diff --git a/pv/application.hpp b/pv/application.hpp index 5a80ec86..bfe46570 100644 --- a/pv/application.hpp +++ b/pv/application.hpp @@ -14,21 +14,63 @@ * 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_H -#define PULSEVIEW_PV_APPLICATION_H +#ifndef PULSEVIEW_PV_APPLICATION_HPP +#define PULSEVIEW_PV_APPLICATION_HPP + +#include #include +#include +#include + +#include + +#include "devicemanager.hpp" +#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(pv::DeviceManager &device_manager); + 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_H +#endif // PULSEVIEW_PV_APPLICATION_HPP