File indexing completed on 2024-04-28 09:36:43

0001 /*
0002     This file is part of KCachegrind.
0003 
0004     SPDX-FileCopyrightText: 2002-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
0005 
0006     SPDX-License-Identifier: GPL-2.0-only
0007 */
0008 
0009 /*
0010  * Configuration Dialog for KCachegrind
0011  */
0012 
0013 #ifndef CONFIGDLG_H
0014 #define CONFIGDLG_H
0015 
0016 #include "ui_configdlgbase.h"
0017 
0018 class TraceData;
0019 class GlobalGUIConfig;
0020 class ConfigColorSetting;
0021 
0022 class ConfigDlgBase : public QDialog, public Ui::ConfigDlgBase
0023 {
0024   Q_OBJECT
0025 public:
0026     ConfigDlgBase( QWidget *parent ) : QDialog( parent ) {
0027         setupUi( this );
0028     }
0029 };
0030 
0031 class ConfigDlg : public ConfigDlgBase
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036     ConfigDlg(GlobalGUIConfig*, TraceData*,
0037               QWidget* parent = nullptr);
0038     ~ConfigDlg() override;
0039 
0040     static bool configure(GlobalGUIConfig*, TraceData*, QWidget*);
0041 
0042 protected Q_SLOTS:
0043     void objectActivated(const QString &);
0044     void objectCheckChanged(bool);
0045     void objectColorChanged(const QColor &);
0046     void classActivated(const QString &);
0047     void classCheckChanged(bool);
0048     void classColorChanged(const QColor &);
0049     void fileActivated(const QString &);
0050     void fileCheckChanged(bool);
0051     void fileColorChanged(const QColor &);
0052     void dirsItemChanged();
0053     void dirsDeletePressed();
0054     void dirsAddPressed();
0055 
0056 private:
0057     QTreeWidgetItem *getSelectedDirItem();
0058     GlobalGUIConfig* _config;
0059     TraceData* _data;
0060 
0061     ConfigColorSetting *_objectCS, *_classCS, *_fileCS;
0062 };
0063 
0064 #endif