Files
flameshot/src/config/filenameeditor.h
lupoDharkael 924d467c53 general cleanup
-use of the override keyword
-delete unused code
-const correctness
-more uniform code style
-for each with const references when possible
-getters no longer use the word 'get'
-others
2017-08-09 13:20:07 +02:00

61 lines
1.6 KiB
C++

// Copyright 2017 Alejandro Sirgo Rica
//
// This file is part of Flameshot.
//
// Flameshot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Flameshot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Flameshot. If not, see <http://www.gnu.org/licenses/>.
#ifndef FILENAMEEDITOR_H
#define FILENAMEEDITOR_H
#include <QGroupBox>
#include <QPointer>
class QVBoxLayout;
class QLineEdit;
class FileNameHandler;
class QPushButton;
class StrftimeChooserWidget;
class FileNameEditor : public QGroupBox
{
Q_OBJECT
public:
explicit FileNameEditor(QWidget *parent = nullptr);
private:
QVBoxLayout *m_layout;
QLineEdit *m_outputLabel;
QLineEdit *m_nameEditor;
FileNameHandler *m_nameHandler;
StrftimeChooserWidget *m_helperButtons;
QPushButton *m_saveButton;
QPushButton *m_resetButton;
QPushButton *m_clearButton;
void initLayout();
void initWidgets();
public slots:
void addToNameEditor(QString s);
void updateComponents();
private slots:
void savePattern();
void showParsedPattern(const QString &);
void resetName();
};
#endif // FILENAMEEDITOR_H