Cppcheck
librarydialog.h
Go to the documentation of this file.
1 /*
2  * Cppcheck - A tool for static C/C++ code analysis
3  * Copyright (C) 2007-2023 Cppcheck team.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef LIBRARYDIALOG_H
20 #define LIBRARYDIALOG_H
21 
22 #include "cppchecklibrarydata.h"
23 
24 #include <QDialog>
25 #include <QObject>
26 #include <QString>
27 
28 class QListWidgetItem;
29 class QWidget;
30 namespace Ui {
31  class LibraryDialog;
32 }
33 
34 class LibraryDialog : public QDialog {
35  Q_OBJECT
36 
37 public:
38  explicit LibraryDialog(QWidget *parent = nullptr);
39  LibraryDialog(const LibraryDialog &) = delete;
40  ~LibraryDialog() override;
42 
43 private slots:
44  void openCfg();
45  void saveCfg();
46  void saveCfgAs();
47  void addFunction();
48  void changeFunction();
49  void editArg();
50  void editFunctionName(QListWidgetItem* /*item*/);
51  void filterFunctions(const QString& /*filter*/);
52  void selectFunction();
53  void sortFunctions(bool /*sort*/);
54 
55 private:
56  Ui::LibraryDialog *mUi;
58  QString mFileName;
60 
61  static QString getArgText(const CppcheckLibraryData::Function::Arg &arg);
63  void updateArguments(const CppcheckLibraryData::Function &function);
64 };
65 
66 #endif // LIBRARYDIALOG_H
LibraryDialog(const LibraryDialog &)=delete
static QString getArgText(const CppcheckLibraryData::Function::Arg &arg)
~LibraryDialog() override
QString mFileName
Definition: librarydialog.h:58
CppcheckLibraryData::Function * currentFunction()
CppcheckLibraryData mData
Definition: librarydialog.h:57
void editFunctionName(QListWidgetItem *)
LibraryDialog & operator=(const LibraryDialog &)=delete
Ui::LibraryDialog * mUi
Definition: librarydialog.h:56
void sortFunctions(bool)
void updateArguments(const CppcheckLibraryData::Function &function)
LibraryDialog(QWidget *parent=nullptr)
void filterFunctions(const QString &)
Definition: aboutdialog.h:27