[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [skrooge/Feature] /: New SKGProgressBar
From: Stephane Mankowski <stephane () mankowski ! fr>
Date: 2012-04-30 20:46:22
Message-ID: 20120430204622.8B1755803B () git ! kde ! org
[Download RAW message or body]
Git commit 99eda720171e028c8fadbe254c0d073b398ef4fb by Stephane Mankowski.
Committed on 30/04/2012 at 22:45.
Pushed by smankowski into branch 'Feature'.
New SKGProgressBar
M +1 -1 plugins/generic/skg_bookmark/skgbookmarkplugin.h
M +6 -17 plugins/skrooge/skrooge_operation/skgoperationboardwidget.cpp
M +0 -4 plugins/skrooge/skrooge_operation/skgoperationboardwidget.h
M +6 -6 plugins/skrooge/skrooge_operation/skgoperationpluginwidget_board.ui
M +3 -13 plugins/skrooge/skrooge_search/skgalarmboardwidget.cpp
M +2 -0 skgbasegui/CMakeLists.txt
A +68 -0 skgbasegui/skgprogressbar.cpp [License: GPL (v2+)]
C +27 -35 skgbasegui/skgprogressbar.h [from: \
plugins/skrooge/skrooge_operation/skgoperationboardwidget.h - 055% similarity] A \
+100 -0 skgbasegui/skgprogressbardesignerplugin.cpp [License: GPL (v2+)] A \
+112 -0 skgbasegui/skgprogressbardesignerplugin.h [License: GPL (v2+)] M +2 \
-0 skgbasegui/skgwidgetcollectiondesignerplugin.cpp
http://commits.kde.org/skrooge/99eda720171e028c8fadbe254c0d073b398ef4fb
diff --git a/plugins/generic/skg_bookmark/skgbookmarkplugin.h \
b/plugins/generic/skg_bookmark/skgbookmarkplugin.h index db5b800..bf030cf 100644
--- a/plugins/generic/skg_bookmark/skgbookmarkplugin.h
+++ b/plugins/generic/skg_bookmark/skgbookmarkplugin.h
@@ -88,7 +88,7 @@ public:
* The icon of the plugin.
* @return The icon of the plugin
*/
- virtual QString icon() const;
+ virtual QString icon() const;
/**
* The tips list of the plugin.
diff --git a/plugins/skrooge/skrooge_operation/skgoperationboardwidget.cpp \
b/plugins/skrooge/skrooge_operation/skgoperationboardwidget.cpp index \
a3d7cd7..4ee8098 100644
--- a/plugins/skrooge/skrooge_operation/skgoperationboardwidget.cpp
+++ b/plugins/skrooge/skrooge_operation/skgoperationboardwidget.cpp
@@ -29,7 +29,6 @@
#include <QDomDocument>
#include <kaction.h>
-#include <kcolorscheme.h>
SKGOperationBoardWidget::SKGOperationBoardWidget(SKGDocument* iDocument)
: SKGWidget(iDocument)
@@ -43,16 +42,6 @@ SKGOperationBoardWidget::SKGOperationBoardWidget(SKGDocument* \
iDocument)
ui.kIncome_previousLabel->setText("<a href=\"IP\">" % \
ui.kIncome_previousLabel->text() % "</a>");
ui.kExpense_previousLabel->setText("<a href=\"EP\">" % \
ui.kExpense_previousLabel->text() % "</a>");
- //Define color style
- KColorScheme scheme(QPalette::Normal);
- QString negative = scheme.foreground(KColorScheme::NegativeText).color().name();
- QString neutral = scheme.foreground(KColorScheme::NeutralText).color().name();
- QString positive = scheme.foreground(KColorScheme::PositiveText).color().name();
-
- m_negativeStyleSheet = QString(" QProgressBar { text-align: center; padding: \
0.5px;} QProgressBar::chunk {text-align: center; border-radius:4px; background-color: \
") % negative % ";}" % ui.kIncome->styleSheet();
- m_neutralStyleSheet = QString(" QProgressBar { text-align: center; padding: \
0.5px;} QProgressBar::chunk {text-align: center; border-radius:4px; background-color: \
") % neutral % ";}" % ui.kIncome->styleSheet();
- m_positiveStyleSheet = QString(" QProgressBar { text-align: center; padding: \
0.5px;} QProgressBar::chunk {text-align: center; border-radius:4px; background-color: \
") % positive % ";}" % ui.kIncome->styleSheet();
-
//Create menu
setContextMenuPolicy(Qt::ActionsContextMenu);
@@ -200,12 +189,12 @@ void SKGOperationBoardWidget::dataModified(const QString& \
iTableName, int iIdTra }
//Change colors
- ui.kIncome->setStyleSheet(m_positiveStyleSheet);
- ui.kIncome_previous->setStyleSheet(m_positiveStyleSheet);
- ui.kExpense->setStyleSheet(m_negativeStyleSheet);
- ui.kExpense_previous->setStyleSheet(m_negativeStyleSheet);
- ui.kSaving->setStyleSheet(income_month - expense_month < 0 ? \
m_negativeStyleSheet : income_month - expense_month < 0.1 * income_month ? \
m_neutralStyleSheet : m_positiveStyleSheet);
- ui.kSaving_previous->setStyleSheet(income_previous_month - \
expense_previous_month < 0 ? m_negativeStyleSheet : income_previous_month - \
expense_previous_month < 0.1 * income_previous_month ? m_neutralStyleSheet : \
m_positiveStyleSheet); + ui.kIncome->setLimits(0, 0, max);
+ ui.kIncome_previous->setLimits(0, 0, max);
+ ui.kExpense->setLimits(max, -1, -1);
+ ui.kExpense_previous->setLimits(max, -1, -1);
+ ui.kSaving->setLimits(income_month - expense_month < 0 ? max : 0, \
0.1 * income_month, max); + \
ui.kSaving_previous->setLimits(income_previous_month - expense_previous_month < 0 ? \
max : 0, 0.1 * income_previous_month, max); }
//No widget if no account
diff --git a/plugins/skrooge/skrooge_operation/skgoperationboardwidget.h \
b/plugins/skrooge/skrooge_operation/skgoperationboardwidget.h index c232767..4bba63c \
100644
--- a/plugins/skrooge/skrooge_operation/skgoperationboardwidget.h
+++ b/plugins/skrooge/skrooge_operation/skgoperationboardwidget.h
@@ -69,10 +69,6 @@ private:
Ui::skgoperationplugin_board ui;
KAction* m_menuTransfert;
-
- QString m_negativeStyleSheet;
- QString m_neutralStyleSheet;
- QString m_positiveStyleSheet;
};
#endif // SKGOPERATIONBOARDWIDGET_H
diff --git a/plugins/skrooge/skrooge_operation/skgoperationpluginwidget_board.ui \
b/plugins/skrooge/skrooge_operation/skgoperationpluginwidget_board.ui index \
c47416c..e9bbbc4 100644
--- a/plugins/skrooge/skrooge_operation/skgoperationpluginwidget_board.ui
+++ b/plugins/skrooge/skrooge_operation/skgoperationpluginwidget_board.ui
@@ -38,7 +38,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QProgressBar" name="kIncome">
+ <widget class="SKGProgressBar" name="kIncome">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -70,7 +70,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="QProgressBar" name="kExpense">
+ <widget class="SKGProgressBar" name="kExpense">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -116,7 +116,7 @@
</widget>
</item>
<item row="5" column="1">
- <widget class="QProgressBar" name="kIncome_previous">
+ <widget class="SKGProgressBar" name="kIncome_previous">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -148,7 +148,7 @@
</widget>
</item>
<item row="6" column="1">
- <widget class="QProgressBar" name="kExpense_previous">
+ <widget class="SKGProgressBar" name="kExpense_previous">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -200,7 +200,7 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="QProgressBar" name="kSaving">
+ <widget class="SKGProgressBar" name="kSaving">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -216,7 +216,7 @@
</widget>
</item>
<item row="8" column="1">
- <widget class="QProgressBar" name="kSaving_previous">
+ <widget class="SKGProgressBar" name="kSaving_previous">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
diff --git a/plugins/skrooge/skrooge_search/skgalarmboardwidget.cpp \
b/plugins/skrooge/skrooge_search/skgalarmboardwidget.cpp index 70155ea..7f01cdd \
100644
--- a/plugins/skrooge/skrooge_search/skgalarmboardwidget.cpp
+++ b/plugins/skrooge/skrooge_search/skgalarmboardwidget.cpp
@@ -27,12 +27,11 @@
#include "skgunitobject.h"
#include "skgmainpanel.h"
#include "skgruleobject.h"
+#include "skgprogressbar.h"
#include <kaction.h>
#include <QDomDocument>
-#include <QProgressBar>
-#include <kcolorscheme.h>
SKGAlarmBoardWidget::SKGAlarmBoardWidget(SKGDocument* iDocument)
: SKGWidget(iDocument)
@@ -112,18 +111,12 @@ void SKGAlarmBoardWidget::dataModified(const QString& \
iTableName, int iIdTransac
SKGError err = doc->getObjects("v_rule", wc % " ORDER BY i_ORDER", \
rules); int nb = rules.count();
if (nb) {
- //Get std colors
- KColorScheme scheme(QPalette::Normal);
- QString negative = \
scheme.foreground(KColorScheme::NegativeText).color().name();
- QString neutral = \
scheme.foreground(KColorScheme::NeutralText).color().name();
- QString positive = \
scheme.foreground(KColorScheme::PositiveText).color().name();
-
for (int i = 0; !err && i < nb; ++i) {
SKGRuleObject rule = rules.at(i);
SKGRuleObject::SKGAlarmInfo alarm = rule.getAlarmInfo();
//Create progress bar
- QProgressBar* progressBar = new QProgressBar(ui.kGroup);
+ SKGProgressBar* progressBar = new SKGProgressBar(ui.kGroup);
progressBar->setObjectName(QString::fromUtf8("progressBar"));
progressBar->setMaximum(qMax(alarm.Amount, alarm.Limit));
progressBar->setValue(alarm.Amount);
@@ -143,10 +136,7 @@ void SKGAlarmBoardWidget::dataModified(const QString& \
iTableName, int iIdTransac progressBar->setToolTip(txt);
//Change color
- double percent = 100 * alarm.Amount / alarm.Limit;
- QString st = progressBar->styleSheet();
- st = QString(" QProgressBar { text-align: center; padding: \
0.5px;} QProgressBar::chunk {text-align: center; border-radius:4px; background-color: \
") % (percent < 70 ? positive : (percent > 90 ? negative : neutral)) \
% ";}" % st;
- progressBar->setStyleSheet(st);
+ progressBar->setLimits(qMax(alarm.Amount, alarm.Limit), 0.9 * \
alarm.Limit, 0.7 * alarm.Limit);
//Add progress bar
ui.layout->addWidget(progressBar);
diff --git a/skgbasegui/CMakeLists.txt b/skgbasegui/CMakeLists.txt
index 5002df3..0bdc546 100644
--- a/skgbasegui/CMakeLists.txt
+++ b/skgbasegui/CMakeLists.txt
@@ -45,7 +45,9 @@ SET(skgbasegui_SRCS
skgtablewithgraphdesignerplugin.cpp
skgtablewithgraph.cpp
skgdateeditdesignerplugin.cpp
+ skgprogressbardesignerplugin.cpp
skgdateedit.cpp
+ skgprogressbar.cpp
kdateedit.cpp
kdatepickerpopup.cpp
kdatevalidator.cpp
diff --git a/skgbasegui/skgprogressbar.cpp b/skgbasegui/skgprogressbar.cpp
new file mode 100644
index 0000000..8b56e3e
--- /dev/null
+++ b/skgbasegui/skgprogressbar.cpp
@@ -0,0 +1,68 @@
+/***************************************************************************
+ * Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE support@mankowski.fr *
+ * *
+ * 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. *
+ * *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/> *
+ ***************************************************************************/
+/** @file
+ * A progress bar with colors.
+ *
+ * @author Stephane MANKOWSKI / Guillaume DE BURE
+ */
+#include "skgprogressbar.h"
+
+#include <kcolorscheme.h>
+#include <QStringBuilder>
+
+SKGProgressBar::SKGProgressBar(QWidget* parent)
+ : QProgressBar(parent), m_negative(-1), m_neutral(-1), m_positive(-1)
+{
+ //Define color style
+ KColorScheme scheme(QPalette::Normal);
+ QString negative = scheme.foreground(KColorScheme::NegativeText).color().name();
+ QString neutral = scheme.foreground(KColorScheme::NeutralText).color().name();
+ QString positive = scheme.foreground(KColorScheme::PositiveText).color().name();
+
+ m_negativeStyleSheet = QString(" QProgressBar { text-align: center; padding: \
0.5px;} QProgressBar::chunk {text-align: center; border-radius:4px; background-color: \
") % negative % ";}" % styleSheet(); + m_neutralStyleSheet = QString(" \
QProgressBar { text-align: center; padding: 0.5px;} QProgressBar::chunk {text-align: \
center; border-radius:4px; background-color: ") % neutral % ";}" % styleSheet(); + \
m_positiveStyleSheet = QString(" QProgressBar { text-align: center; padding: 0.5px;} \
QProgressBar::chunk {text-align: center; border-radius:4px; background-color: ") % \
positive % ";}" % styleSheet(); +}
+
+SKGProgressBar::~SKGProgressBar()
+{
+}
+
+void SKGProgressBar::setLimits(int negative, int neutral, int positive)
+{
+ m_negative = negative;
+ m_neutral = neutral;
+ m_positive = positive;
+
+ setValue(value());
+}
+
+void SKGProgressBar::setValue(int value)
+{
+ QProgressBar::setValue(value);
+ if (m_negative < m_positive) {
+ if (value <= m_negative) setStyleSheet(m_negativeStyleSheet);
+ else if (value <= m_neutral) setStyleSheet(m_neutralStyleSheet);
+ else if (value <= m_positive) setStyleSheet(m_positiveStyleSheet);
+ } else {
+ if (value <= m_positive) setStyleSheet(m_positiveStyleSheet);
+ else if (value <= m_neutral) setStyleSheet(m_neutralStyleSheet);
+ else if (value <= m_negative) setStyleSheet(m_negativeStyleSheet);
+ }
+}
+
+#include "skgprogressbar.moc"
diff --git a/plugins/skrooge/skrooge_operation/skgoperationboardwidget.h \
b/skgbasegui/skgprogressbar.h similarity index 55%
copy from plugins/skrooge/skrooge_operation/skgoperationboardwidget.h
copy to skgbasegui/skgprogressbar.h
index c232767..858656b 100644
--- a/plugins/skrooge/skrooge_operation/skgoperationboardwidget.h
+++ b/skgbasegui/skgprogressbar.h
@@ -14,65 +14,57 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/> *
***************************************************************************/
-#ifndef SKGOPERATIONBOARDWIDGET_H
-#define SKGOPERATIONBOARDWIDGET_H
+#ifndef SKGPROGRESSBAR_H
+#define SKGPROGRESSBAR_H
/** @file
-* This file is Skrooge plugin for operation management.
-*
-* @author Stephane MANKOWSKI / Guillaume DE BURE
-*/
-#include "ui_skgoperationpluginwidget_board.h"
-#include "skgwidget.h"
+ * A progress bar with colors
+ *
+ * @author Stephane MANKOWSKI / Guillaume DE BURE
+ */
-class KAction;
+#include "skgbasegui_export.h"
+#include <QProgressBar>
/**
- * This file is Skrooge plugin for operation management
+ * A progress bar with colors
*/
-class SKGOperationBoardWidget : public SKGWidget
+class SKGBASEGUI_EXPORT SKGProgressBar : public QProgressBar
{
Q_OBJECT
-
public:
/**
- * Default Constructor
+ * Constructor
+ * @param parent the parent
*/
- SKGOperationBoardWidget(SKGDocument* iDocument);
+ explicit SKGProgressBar(QWidget* parent = 0);
/**
- * Default Destructor
+ * Destructor
*/
- virtual ~SKGOperationBoardWidget();
+ virtual ~SKGProgressBar();
/**
- * Get the current state
- * MUST BE OVERWRITTEN
- * @return a string containing all information needed to set the same state.
- * Could be an XML stream
+ * Set the limits
+ * @param negative if the value @see setValue is less than @negative the color \
will be negative + * @param neutral if the value @see setValue is less than \
@neutral the color will be neutral + * @param positive if the value @see setValue \
is less than @positive the color will be positive
*/
- virtual QString getState();
+ virtual void setLimits(int negative, int neutral, int positive);
/**
- * Set the current state
- * MUST BE OVERWRITTEN
- * @param iState must be interpreted to set the state of the widget
+ * Set the value
+ * @param value the value
*/
- virtual void setState(const QString& iState);
+ virtual void setValue(int value);
-private Q_SLOTS:
- void dataModified(const QString& iTableName = "", int iIdTransaction = 0);
- void onOpen(const QString& iLink);
private:
- Q_DISABLE_COPY(SKGOperationBoardWidget);
-
- Ui::skgoperationplugin_board ui;
-
- KAction* m_menuTransfert;
-
+ int m_negative;
+ int m_neutral;
+ int m_positive;
QString m_negativeStyleSheet;
QString m_neutralStyleSheet;
QString m_positiveStyleSheet;
};
-#endif // SKGOPERATIONBOARDWIDGET_H
+#endif
diff --git a/skgbasegui/skgprogressbardesignerplugin.cpp \
b/skgbasegui/skgprogressbardesignerplugin.cpp new file mode 100644
index 0000000..a6c6282
--- /dev/null
+++ b/skgbasegui/skgprogressbardesignerplugin.cpp
@@ -0,0 +1,100 @@
+/***************************************************************************
+ * Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE support@mankowski.fr *
+ * *
+ * 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. *
+ * *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/> *
+ ***************************************************************************/
+/** @file
+ * A progress bar with colors
+ *
+ * @author Stephane MANKOWSKI / Guillaume DE BURE
+ */
+#include "skgprogressbardesignerplugin.h"
+#include "skgprogressbar.h"
+
+#include "kicon.h"
+
+#include <QtPlugin>
+
+SKGProgressBarDesignerPlugin::SKGProgressBarDesignerPlugin(QObject* parent)
+ : QObject(parent)
+{
+ m_initialized = false;
+}
+
+void SKGProgressBarDesignerPlugin::initialize(QDesignerFormEditorInterface* /* core \
*/) +{
+ if (m_initialized) return;
+
+ m_initialized = true;
+}
+
+bool SKGProgressBarDesignerPlugin::isInitialized() const
+{
+ return m_initialized;
+}
+
+QWidget* SKGProgressBarDesignerPlugin::createWidget(QWidget* parent)
+{
+ return new SKGProgressBar(parent);
+}
+
+QString SKGProgressBarDesignerPlugin::name() const
+{
+ return "SKGProgressBar";
+}
+
+QString SKGProgressBarDesignerPlugin::group() const
+{
+ return "SKG Widgets";
+}
+
+QIcon SKGProgressBarDesignerPlugin::icon() const
+{
+ return KIcon("skg_open");
+}
+
+QString SKGProgressBarDesignerPlugin::toolTip() const
+{
+ return "A progress bar with colors";
+}
+
+QString SKGProgressBarDesignerPlugin::whatsThis() const
+{
+ return "A progress bar with colors";
+}
+
+bool SKGProgressBarDesignerPlugin::isContainer() const
+{
+ return false;
+}
+
+QString SKGProgressBarDesignerPlugin::domXml() const
+{
+ return "<widget class=\"SKGProgressBar\" name=\"SKGProgressBar\">\n"
+ " <property name=\"geometry\">\n"
+ " <rect>\n"
+ " <x>0</x>\n"
+ " <y>0</y>\n"
+ " <width>100</width>\n"
+ " <height>10</height>\n"
+ " </rect>\n"
+ " </property>\n"
+ "</widget>\n";
+}
+
+QString SKGProgressBarDesignerPlugin::includeFile() const
+{
+ return "skgprogressbar.h";
+}
+
diff --git a/skgbasegui/skgprogressbardesignerplugin.h \
b/skgbasegui/skgprogressbardesignerplugin.h new file mode 100644
index 0000000..f71b9cb
--- /dev/null
+++ b/skgbasegui/skgprogressbardesignerplugin.h
@@ -0,0 +1,112 @@
+/***************************************************************************
+ * Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE support@mankowski.fr *
+ * *
+ * 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. *
+ * *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/> *
+ ***************************************************************************/
+#ifndef SKGPROGRESSBARDESIGNERPLUGIN_H
+#define SKGPROGRESSBARDESIGNERPLUGIN_H
+/** @file
+ * A progress bar with colors
+ *
+ * @author Stephane MANKOWSKI / Guillaume DE BURE
+ */
+#include <QDesignerCustomWidgetInterface>
+
+/**
+ * QDesigner plugin for SKGProgressBar
+ */
+class SKGProgressBarDesignerPlugin : public QObject, public \
QDesignerCustomWidgetInterface +{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface);
+
+public:
+ /**
+ * Constructor
+ * @param parent parent
+ */
+ SKGProgressBarDesignerPlugin(QObject* parent = 0);
+
+ /**
+ * To know if the component is a container
+ * @return true or false
+ */
+ bool isContainer() const;
+
+ /**
+ * To know if the component is initialized
+ * @return true or false
+ */
+ bool isInitialized() const;
+
+ /**
+ * To get the icon for this component
+ * @return the icon
+ */
+ QIcon icon() const;
+
+ /**
+ * To get the icon for this component
+ * @return
+ */
+ QString domXml() const;
+
+ /**
+ * To get the group for this component
+ * @return group
+ */
+ QString group() const;
+
+ /**
+ * To get the include file for this component
+ * @return the include file
+ */
+ QString includeFile() const;
+
+ /**
+ * To get the name for this component
+ * @return name
+ */
+ QString name() const;
+
+ /**
+ * To get the "tool tip" for this component
+ * @return the "tool tip"
+ */
+ QString toolTip() const;
+
+ /**
+ * To get the "whats this" for this component
+ * @return the "whats this"
+ */
+ QString whatsThis() const;
+
+ /**
+ * To get the widget representing the component
+ * @param parent the parent of the widget
+ * @return the widget
+ */
+ QWidget* createWidget(QWidget* parent);
+
+ /**
+ * Initilialize the component
+ * @param core interface
+ */
+ void initialize(QDesignerFormEditorInterface* core);
+
+private:
+ bool m_initialized;
+};
+
+#endif
diff --git a/skgbasegui/skgwidgetcollectiondesignerplugin.cpp \
b/skgbasegui/skgwidgetcollectiondesignerplugin.cpp index 32c3a56..88b1d57 100644
--- a/skgbasegui/skgwidgetcollectiondesignerplugin.cpp
+++ b/skgbasegui/skgwidgetcollectiondesignerplugin.cpp
@@ -36,6 +36,7 @@
#include "skgshowdesignerplugin.h"
#include "skgfilteredtableviewdesignerplugin.h"
#include "skgwidgetselectordesignerplugin.h"
+#include "skgprogressbardesignerplugin.h"
#include <QtPlugin>
@@ -58,6 +59,7 @@ SKGWidgetCollectionDesignerPlugin::SKGWidgetCollectionDesignerPlugin(QObject* \
pa m_widgets.append(new SKGWebViewDesignerPlugin(this));
m_widgets.append(new SKGWidgetSelectorDesignerPlugin(this));
m_widgets.append(new SKGZoomSelectorDesignerPlugin(this));
+ m_widgets.append(new SKGProgressBarDesignerPlugin(this));
}
QList<QDesignerCustomWidgetInterface*> \
SKGWidgetCollectionDesignerPlugin::customWidgets() const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic