File indexing completed on 2024-04-14 05:34:12
0001 /* 0002 SPDX-FileCopyrightText: 2010 Johannes Steffen <johannes.steffen@st.ovgu.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef TAGDIALOG_H 0008 #define TAGDIALOG_H 0009 0010 #include <QDialog> 0011 #include <QSet> 0012 0013 class KTextEdit; 0014 class QComboBox; 0015 class QDialogButtonBox; 0016 class QLineEdit; 0017 class QTextCodec; 0018 class QRadioButton; 0019 0020 class TagDialog : public QDialog 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 explicit TagDialog(QWidget* parent = nullptr); 0026 /** 0027 * Returns the tag message given by the user. 0028 * @returns The tag message. 0029 */ 0030 QByteArray tagMessage() const; 0031 /** 0032 * Returns the tag name given by the user. 0033 * @return The tag name. 0034 */ 0035 QString tagName() const; 0036 /** 0037 * @returns The name of the branch the tag should point to or HEAD if 0038 the tag should point to the current HEAD. 0039 */ 0040 0041 QString baseBranch() const; 0042 private Q_SLOTS: 0043 void setOkButtonState(); 0044 private: 0045 inline void setLineEditErrorModeActive(bool active); 0046 private: 0047 QSet<QString> m_tagNames; 0048 KTextEdit* m_tagMessageTextEdit; 0049 QLineEdit* m_tagNameTextEdit; 0050 QComboBox* m_branchComboBox; 0051 QDialogButtonBox* m_buttonBox; 0052 QRadioButton* branchRadioButton; 0053 QTextCodec* m_localCodec; 0054 QPalette m_errorColors; 0055 }; 0056 0057 #endif // TAGDIALOG_H