mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-30 15:39:59 +01:00
TitleBlockPropertiesWidget: replace widget made with c++ by widget made with ui file
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3204 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
72
sources/ui/titleblockpropertieswidget.h
Normal file
72
sources/ui/titleblockpropertieswidget.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright 2006-2014 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
QElectroTech 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 QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef TITLEBLOCKPROPERTIESWIDGET_H
|
||||
#define TITLEBLOCKPROPERTIESWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "titleblockproperties.h"
|
||||
#include "diagramcontextwidget.h"
|
||||
|
||||
class QMenu;
|
||||
class TitleBlockTemplatesCollection;
|
||||
|
||||
namespace Ui {
|
||||
class TitleBlockPropertiesWidget;
|
||||
}
|
||||
|
||||
class TitleBlockPropertiesWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TitleBlockPropertiesWidget(const TitleBlockProperties &titleblock = TitleBlockProperties(), bool current_date = false, QWidget *parent = 0);
|
||||
~TitleBlockPropertiesWidget();
|
||||
|
||||
void setProperties(const TitleBlockProperties &properties);
|
||||
TitleBlockProperties properties() const;
|
||||
|
||||
void setTitleBlockTemplatesVisible(const bool &visible);
|
||||
void setReadOnly (const bool &ro);
|
||||
void setTitleBlockTemplatesCollection(TitleBlockTemplatesCollection *tbt_collection);
|
||||
|
||||
private:
|
||||
QString currentTitleBlockTemplateName () const;
|
||||
void setCurrentTitleBlockTemplateName (const QString &name);
|
||||
void setTitleBlockTemplatesList(const QStringList &tbt);
|
||||
void initDialog(const bool ¤t_date);
|
||||
|
||||
private slots:
|
||||
void editCurrentTitleBlockTemplate();
|
||||
void duplicateCurrentTitleBlockTemplate();
|
||||
void updateTemplateList();
|
||||
void changeCurrentTitleBlockTemplate(QString name);
|
||||
void on_m_date_now_pb_clicked();
|
||||
void on_m_fixed_date_rb_toggled(bool checked);
|
||||
|
||||
signals:
|
||||
void editTitleBlockTemplate(const QString &, bool);
|
||||
|
||||
private:
|
||||
Ui::TitleBlockPropertiesWidget *ui;
|
||||
DiagramContextWidget *m_dcw;
|
||||
TitleBlockTemplatesCollection *m_tbt_collection;
|
||||
QAction *m_tbt_edit, *m_tbt_duplicate;
|
||||
QMenu *m_tbt_menu;
|
||||
};
|
||||
|
||||
#endif // TITLEBLOCKPROPERTIESWIDGET_H
|
||||
Reference in New Issue
Block a user