File indexing completed on 2024-05-12 05:46:33
0001 /* 0002 This file is part of the KDE File Manager 0003 0004 Copyright (C) 1998- Waldo Bastian (bastian@kde.org) 0005 Copyright (C) 2000- Dawit Alemayehu (adawit@kde.org) 0006 0007 This library is free software; you can redistribute it and/or 0008 modify it under the terms of the GNU General Public License 0009 as published by the Free Software Foundation; either version 2 0010 of the License, or (at your option) any later version. 0011 0012 This software is distributed in the hope that it will be useful, 0013 but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 General Public License for more details. 0016 0017 You should have received a copy of the GNU General Public License 0018 along with this library; see the file COPYING. If not, write to 0019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 Boston, MA 02110-1301, USA. 0021 */ 0022 //---------------------------------------------------------------------------- 0023 // 0024 // KDE File Manager -- HTTP Cookie Dialogs 0025 0026 #ifndef KCOOKIEWIN_H 0027 #define KCOOKIEWIN_H 0028 0029 #include <QGroupBox> 0030 #include <QRadioButton> 0031 #include <QDialog> 0032 #include "kcookiejar.h" 0033 0034 class QLineEdit; 0035 class QPushButton; 0036 0037 class KCookieDetail : public QGroupBox 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 KCookieDetail(const KHttpCookieList &cookieList, int cookieCount, QWidget *parent = nullptr); 0043 ~KCookieDetail(); 0044 0045 private Q_SLOTS: 0046 void slotNextCookie(); 0047 0048 private: 0049 void displayCookieDetails(); 0050 0051 QLineEdit *m_name; 0052 QLineEdit *m_value; 0053 QLineEdit *m_expires; 0054 QLineEdit *m_domain; 0055 QLineEdit *m_path; 0056 QLineEdit *m_secure; 0057 0058 KHttpCookieList m_cookieList; 0059 int m_cookieNumber; 0060 }; 0061 0062 class KCookieWin : public QDialog 0063 { 0064 Q_OBJECT 0065 0066 public : 0067 KCookieWin(QWidget *parent, KHttpCookieList cookieList, int defaultButton = 0, 0068 bool showDetails = false); 0069 ~KCookieWin(); 0070 0071 KCookieAdvice advice(KCookieJar *cookiejar, const KHttpCookie &cookie); 0072 0073 private Q_SLOTS: 0074 void slotSessionOnlyClicked(); 0075 void slotToggleDetails(); 0076 0077 private : 0078 QPushButton *m_detailsButton; 0079 QRadioButton *m_onlyCookies, *m_allCookies, *m_allCookiesDomain; 0080 KCookieDetail *m_detailView; 0081 }; 0082 0083 #endif