mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Dynamic element text item, can have for source of text a composite text, a text composed both by user typed text and element info.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5021 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
42
sources/ui/compositetexteditdialog.h
Normal file
42
sources/ui/compositetexteditdialog.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef COMPOSITETEXTEDITDIALOG_H
|
||||
#define COMPOSITETEXTEDITDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CompositeTextEditDialog;
|
||||
}
|
||||
|
||||
class DynamicElementTextItem;
|
||||
|
||||
/**
|
||||
* @brief The CompositeTextEditDialog class
|
||||
* CompositeTextEditDialog display a dialog use to write the complex text
|
||||
* of a dynamic element text item.
|
||||
* This dialog provide a QComboBox to quickly add an information of the element
|
||||
* in the composite text.
|
||||
*/
|
||||
class CompositeTextEditDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CompositeTextEditDialog(DynamicElementTextItem *text, QWidget *parent = nullptr);
|
||||
~CompositeTextEditDialog() override;
|
||||
|
||||
QString plainText() const;
|
||||
|
||||
private slots:
|
||||
void on_m_info_cb_activated(const QString &arg1);
|
||||
|
||||
private :
|
||||
void setUpComboBox();
|
||||
QString infoToVar(const QString& info) const;
|
||||
|
||||
private:
|
||||
Ui::CompositeTextEditDialog *ui;
|
||||
QString m_default_text;
|
||||
DynamicElementTextItem *m_text = nullptr;
|
||||
};
|
||||
|
||||
#endif // COMPOSITETEXTEDITDIALOG_H
|
||||
Reference in New Issue
Block a user