File indexing completed on 2024-04-28 16:26:26
0001 /***************************************************************************************** 0002 userhelpdialog.h 0003 ---------------------------------------------------------------------------- 0004 date : Jul 22 2005 0005 version : 0.20 0006 copyright : (C) 2005 by Holger Danielsson (holger.danielsson@t-online.de) 0007 2008 by Michel Ludwig (michel.ludwig@kdemail.net) 0008 ****************************************************************************************/ 0009 0010 /*************************************************************************** 0011 * * 0012 * This program is free software; you can redistribute it and/or modify * 0013 * it under the terms of the GNU General Public License as published by * 0014 * the Free Software Foundation; either version 2 of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 ***************************************************************************/ 0018 0019 #ifndef USERHELPDIALOG_H 0020 #define USERHELPDIALOG_H 0021 0022 #include <QList> 0023 #include <QStringList> 0024 0025 #include <QDialog> 0026 #include <QLineEdit> 0027 0028 class QListWidget; 0029 class QPushButton; 0030 0031 namespace KileDialog 0032 { 0033 0034 class UserHelpDialog : public QDialog 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 explicit UserHelpDialog(QWidget *parent = Q_NULLPTR, const char *name = Q_NULLPTR); 0040 ~UserHelpDialog() {} 0041 0042 void setParameter(const QStringList &menuentries, const QList<QUrl> &helpfiles); 0043 void getParameter(QStringList &userhelpmenulist, QList<QUrl> &userhelpfilelist); 0044 private: 0045 QListWidget *m_menulistbox; 0046 QLineEdit *m_fileedit; 0047 QPushButton *m_add, *m_remove, *m_addsep, *m_up, *m_down; 0048 0049 QList<QUrl> m_filelist; 0050 0051 void updateButton(); 0052 0053 private Q_SLOTS: 0054 void slotChange(); 0055 void slotAdd(); 0056 void slotRemove(); 0057 void slotAddSep(); 0058 void slotUp(); 0059 void slotDown(); 0060 }; 0061 0062 class UserHelpAddDialog : public QDialog 0063 { 0064 Q_OBJECT 0065 0066 public: 0067 explicit UserHelpAddDialog(QListWidget *menulistbox, QWidget *parent = Q_NULLPTR); 0068 ~UserHelpAddDialog() {} 0069 0070 private: 0071 QLineEdit *m_leMenuEntry, *m_leHelpFile; 0072 QPushButton *m_pbChooseFile; 0073 QListWidget *m_menulistbox; 0074 0075 public: 0076 QString getMenuitem() { 0077 return m_leMenuEntry->text(); 0078 } 0079 QString getHelpfile() { 0080 return m_leHelpFile->text(); 0081 } 0082 0083 private Q_SLOTS: 0084 void onShowLocalFileSelection(); 0085 void onAccepted(); 0086 }; 0087 0088 } 0089 0090 #endif