diff options
Diffstat (limited to 'quanta/components/csseditor/percentageeditor.cpp')
-rw-r--r-- | quanta/components/csseditor/percentageeditor.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/quanta/components/csseditor/percentageeditor.cpp b/quanta/components/csseditor/percentageeditor.cpp new file mode 100644 index 00000000..0c8a9d6c --- /dev/null +++ b/quanta/components/csseditor/percentageeditor.cpp @@ -0,0 +1,38 @@ +/*************************************************************************** + percentageeditor.cpp - description + ------------------- + begin : lun ago 9 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program 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. * + * * + ***************************************************************************/ +#include "percentageeditor.h" +#include "propertysetter.h" + +percentageEditor::percentageEditor(const QString& initialValue, QWidget *parent, const char *name) : miniEditor(parent,name) +{ + QString temp(initialValue); + m_sb = new mySpinBox(0,9999,1,this); + m_sb->setValue(temp.remove("%").toInt()); + m_sb->setSuffix("%"); + connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SIGNAL(valueChanged(const QString&))); +} + +percentageEditor::~percentageEditor() +{ + delete m_sb; +} + +void percentageEditor::connectToPropertySetter(propertySetter* p){ + connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); +} + +#include "percentageeditor.moc" |