File indexing completed on 2024-07-21 04:35:17

0001 /*
0002     SPDX-FileCopyrightText: 2004 Thomas Baumgart tbaumgart @kde.org
0003     SPDX-FileCopyrightText: 2018 Ralf Habacker ralf.habacker @freenet.de
0004 
0005     This file is part of libalkimia.
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef ALKONLINEQUOTESWIDGET_H
0011 #define ALKONLINEQUOTESWIDGET_H
0012 
0013 #include <alkimia/alkonlinequote.h>
0014 
0015 #include <QWidget>
0016 
0017 class QListWidgetItem;
0018 
0019 class ALK_EXPORT AlkOnlineQuotesWidget : public QWidget
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit AlkOnlineQuotesWidget(bool showProfiles = false, bool showUpload = false, QWidget *parent = 0);
0024     virtual ~AlkOnlineQuotesWidget();
0025 
0026     void writeConfig();
0027     void readConfig();
0028     void resetConfig();
0029 
0030     QWidget *profilesWidget();
0031     QWidget *profileDetailsWidget();
0032     QWidget *onlineQuotesWidget();
0033     QWidget *quoteDetailsWidget();
0034     QWidget *debugWidget();
0035 
0036     QString acceptLanguage() const;
0037     void setAcceptLanguage(const QString &text);
0038 
0039     /**
0040      * return state if GHNS source is editable
0041      * @return state
0042      */
0043     bool GHNSSourceEditable();
0044 
0045     /**
0046      * Set state that  GHNS source is editable
0047      * @param state state to set
0048      * @note editing of a GHNS source is disabled by default
0049      */
0050     void setGHNSSourceEditable(bool state);
0051 
0052 private:
0053     class Private;
0054     Private *const d;
0055 };
0056 
0057 #endif