1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
/**
* @licence app begin@
* Copyright (C) 2015 Advanced Driver Information Technology
*
* This code is developed by Advanced Driver Information Technology.
* Copyright of Advanced Driver Information Technology, Bosch and DENSO.
*
* This file is part of COVESA Project Dlt Viewer.
*
*
* \copyright
* This Source Code Form is subject to the terms of the
* Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
* this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* \author Christoph Lipka <clipka@jp.adit-jv.com> ADIT 2015
*
* \file dltlogstorageconfigcreatorplugin.h
* For further information see http://www.covesa.global/.
* @licence end@
*/
#ifndef LOGSTORAGECONFIGCREATORFORM_H
#define LOGSTORAGECONFIGCREATORFORM_H
#include <QWidget>
#include <QFile>
#include <QTextStream>
#include <QMessageBox>
#include <QFileInfo>
#include <QFileDialog>
#include <QSettings>
#include "logstoragefilter.h"
namespace Ui {
class LogstorageConfigCreatorForm;
}
class LogstorageConfigCreatorForm : public QWidget
{
Q_OBJECT
public:
explicit LogstorageConfigCreatorForm(QWidget *parent = 0);
~LogstorageConfigCreatorForm();
protected:
/* set default filter configuration */
void setFilterDefaults();
/* validate a certain filter configuration, will be called before added to filters list */
bool validateFilter();
/* remove a filter */
void remove_filter(bool update);
private slots:
void on_pushButton_New_clicked();
void on_pushButton_Add_clicked();
void on_pushButton_Delete_clicked();
void on_pushButton_SaveFile_clicked();
void on_pushButton_LoadFile_clicked();
void set_button_text_Add_to_Update(int idx);
void set_button_text_Update_to_Add();
void load_filter(int idx);
private:
Ui::LogstorageConfigCreatorForm *ui;
QString filterToText(QString filter) { return QString("[" + filter + "]"); }
/* handle to store filter configurations */
QHash<QString, LogstorageFilter> *filters;
int currentFilter;
};
#endif // LOGSTORAGECONFIGCREATORFORM_H
|