Browse Source

Merge from dev of contentview2 branche

v0.9.0
Ulrich Van Den Hekke 12 years ago
parent
commit
0645c2fcfc
  1. 95
      components/borderlayout.cpp
  2. 32
      components/borderlayout.h
  3. 190
      components/customschemeimpl.cpp
  4. 39
      components/customschemeimpl.h
  5. 40
      components/designer/customschemeplugin.cpp
  6. 33
      components/designer/customschemeplugin.h
  7. 40
      components/designer/directoryeditplugin.cpp
  8. 29
      components/designer/directoryeditplugin.h
  9. 40
      components/designer/directoryeditwidgetplugin.cpp
  10. 29
      components/designer/directoryeditwidgetplugin.h
  11. 40
      components/designer/pluginselectorplugin.cpp
  12. 29
      components/designer/pluginselectorplugin.h
  13. 40
      components/designer/xinxcolorcomboplugin.cpp
  14. 33
      components/designer/xinxcolorcomboplugin.h
  15. 18
      components/designer/xinxdesignerplugin.cpp
  16. 5
      components/designer/xinxdesignerplugin.h
  17. 40
      components/designer/xinxlistwidgetplugin.cpp
  18. 29
      components/designer/xinxlistwidgetplugin.h
  19. 168
      components/directoryedit.cpp
  20. 39
      components/directoryedit.h
  21. 124
      components/p_pluginselector.h
  22. 22
      components/pluginelement.cpp
  23. 7
      components/pluginelement.h
  24. 418
      components/pluginselector.cpp
  25. 11
      components/pluginselector.h
  26. 114
      components/qmenuview.cpp
  27. 21
      components/qmenuview.h
  28. 14
      components/stringcombobox.cpp
  29. 9
      components/stringcombobox.h
  30. 287
      components/xinxcolorcombo.cpp
  31. 19
      components/xinxcolorcombo.h
  32. 195
      components/xinxlineedit.cpp
  33. 98
      components/xinxlineedit.h
  34. 205
      components/xinxlistwidgetimpl.cpp
  35. 35
      components/xinxlistwidgetimpl.h
  36. 342
      ext/qmodeltest/LICENSE.GPL
  37. 30
      ext/qmodeltest/README
  38. 523
      ext/qmodeltest/modeltest.cpp
  39. 76
      ext/qmodeltest/modeltest.h
  40. 4
      ext/qmodeltest/modeltest.pri
  41. 82
      framework/actions/actioninterface.cpp
  42. 28
      framework/actions/actioninterface.h
  43. 76
      framework/contentview/abstractcontentviewmodel.h
  44. 269
      framework/contentview/completionnodemodel.cpp
  45. 117
      framework/contentview/completionnodemodel.h
  46. 219
      framework/contentview/contentviewcache.cpp
  47. 100
      framework/contentview/contentviewcache.h
  48. 257
      framework/contentview/contentviewmodel.cpp
  49. 115
      framework/contentview/contentviewmodel.h
  50. 428
      framework/contentview/contentviewnode.cpp
  51. 233
      framework/contentview/contentviewnode.h
  52. 338
      framework/contentview/contentviewparser.cpp
  53. 171
      framework/contentview/contentviewparser.h
  54. 643
      framework/contentview2/contentview2cache.cpp
  55. 53
      framework/contentview2/contentview2cache.h
  56. 156
      framework/contentview2/contentview2completionmodel.cpp
  57. 28
      framework/contentview2/contentview2completionmodel.h
  58. 547
      framework/contentview2/contentview2file.cpp
  59. 155
      framework/contentview2/contentview2file.h
  60. 174
      framework/contentview2/contentview2manager.cpp
  61. 66
      framework/contentview2/contentview2manager.h
  62. 559
      framework/contentview2/contentview2node.cpp
  63. 81
      framework/contentview2/contentview2node.h
  64. 148
      framework/contentview2/contentview2parser.cpp
  65. 43
      framework/contentview2/contentview2parser.h
  66. 149
      framework/contentview2/contentview2parserfactory.cpp
  67. 26
      framework/contentview2/contentview2parserfactory.h
  68. 248
      framework/contentview2/contentview2project.cpp
  69. 103
      framework/contentview2/contentview2project.h
  70. 205
      framework/contentview2/contentview2treemodel.cpp
  71. 39
      framework/contentview2/contentview2treemodel.h
  72. 420
      framework/core/appsettings.cpp
  73. 68
      framework/core/appsettings.h
  74. 117
      framework/core/exceptions.cpp
  75. 10
      framework/core/exceptions.h
  76. 133
      framework/core/filewatcher.cpp
  77. 5
      framework/core/filewatcher.h
  78. 12
      framework/core/lib-config.h
  79. 47
      framework/core/p_filewatcher.h
  80. 110
      framework/core/xinxconfig.cpp
  81. 20
      framework/core/xinxconfig.h
  82. 12
      framework/core/xinxcore.cpp
  83. 21
      framework/core/xinxcore.h
  84. 39
      framework/core/xinxthread.cpp
  85. 8
      framework/core/xinxthread.h
  86. 277
      framework/editors/abstracteditor.cpp
  87. 65
      framework/editors/abstracteditor.h
  88. 17
      framework/editors/bookmarkeditorinterface.cpp
  89. 11
      framework/editors/bookmarkeditorinterface.h
  90. 60
      framework/editors/bookmarktexteditorinterface.cpp
  91. 15
      framework/editors/bookmarktexteditorinterface.h
  92. 130
      framework/editors/contentviewtexteditor.cpp
  93. 105
      framework/editors/contentviewtexteditor.h
  94. 58
      framework/editors/editorfactory.cpp
  95. 9
      framework/editors/editorfactory.h
  96. 15
      framework/editors/editormanager.cpp
  97. 9
      framework/editors/editormanager.h
  98. 528
      framework/editors/textfileeditor.cpp
  99. 95
      framework/editors/textfileeditor.h
  100. 803
      framework/editors/xinxcodeedit.cpp

95
components/borderlayout.cpp

@ -46,42 +46,51 @@
#include "borderlayout.h"
BorderLayout::BorderLayout(QWidget *parent, int margin, int spacing) :
QLayout(parent) {
QLayout(parent)
{
setMargin(margin);
setSpacing(spacing);
}
BorderLayout::BorderLayout(int spacing) {
BorderLayout::BorderLayout(int spacing)
{
setSpacing(spacing);
}
BorderLayout::~BorderLayout() {
BorderLayout::~BorderLayout()
{
QLayoutItem *l;
while ((l = takeAt(0)))
delete l;
}
void BorderLayout::addItem(QLayoutItem *item) {
void BorderLayout::addItem(QLayoutItem *item)
{
add(item, West);
}
void BorderLayout::addWidget(QWidget *widget, Position position) {
void BorderLayout::addWidget(QWidget *widget, Position position)
{
add(new QWidgetItem(widget), position);
}
Qt::Orientations BorderLayout::expandingDirections() const {
Qt::Orientations BorderLayout::expandingDirections() const
{
return Qt::Horizontal | Qt::Vertical;
}
bool BorderLayout::hasHeightForWidth() const {
bool BorderLayout::hasHeightForWidth() const
{
return false;
}
int BorderLayout::count() const {
int BorderLayout::count() const
{
return list.size();
}
QLayoutItem *BorderLayout::itemAt(int index) const {
QLayoutItem *BorderLayout::itemAt(int index) const
{
ItemWrapper *wrapper = list.value(index);
if (wrapper)
return wrapper->item;
@ -89,11 +98,13 @@ QLayoutItem *BorderLayout::itemAt(int index) const {
return 0;
}
QSize BorderLayout::minimumSize() const {
QSize BorderLayout::minimumSize() const
{
return calculateSize(MinimumSize);
}
void BorderLayout::setGeometry(const QRect &rect) {
void BorderLayout::setGeometry(const QRect &rect)
{
ItemWrapper *center = 0;
int eastWidth = 0;
int westWidth = 0;
@ -104,84 +115,100 @@ void BorderLayout::setGeometry(const QRect &rect) {
QLayout::setGeometry(rect);
for (i = 0; i < list.size(); ++i) {
for (i = 0; i < list.size(); ++i)
{
ItemWrapper *wrapper = list.at(i);
QLayoutItem *item = wrapper->item;
Position position = wrapper->position;
if( item->isEmpty() ) continue;
if (position == North) {
if (item->isEmpty()) continue;
if (position == North)
{
item->setGeometry(QRect(rect.x(), northHeight, rect.width(),
item->sizeHint().height()));
item->sizeHint().height()));
northHeight += item->geometry().height() + spacing();
} else if (position == South) {
}
else if (position == South)
{
item->setGeometry(QRect(item->geometry().x(), item->geometry().y(), rect.width(), item->sizeHint().height()));
southHeight += item->geometry().height() + spacing();
item->setGeometry(QRect(rect.x(), rect.y() + rect.height()
- southHeight + spacing(), item->geometry().width(), item->geometry().height()));
} else if (position == Center) {
- southHeight + spacing(), item->geometry().width(), item->geometry().height()));
}
else if (position == Center)
{
center = wrapper;
}
}
centerHeight = rect.height() - northHeight - southHeight;
for (i = 0; i < list.size(); ++i) {
for (i = 0; i < list.size(); ++i)
{
ItemWrapper *wrapper = list.at(i);
QLayoutItem *item = wrapper->item;
Position position = wrapper->position;
if( item->isEmpty() ) continue;
if (item->isEmpty()) continue;
if (position == West) {
if (position == West)
{
item->setGeometry(QRect(rect.x() + westWidth, northHeight,
item->sizeHint().width(), centerHeight));
item->sizeHint().width(), centerHeight));
westWidth += item->geometry().width() + spacing();
} else if (position == East) {
}
else if (position == East)
{
item->setGeometry(QRect(item->geometry().x(), item->geometry().y(), item->sizeHint().width(), centerHeight));
eastWidth += item->geometry().width() + spacing();
item->setGeometry(QRect(rect.x() + rect.width() - eastWidth
+ spacing(), northHeight, item->geometry().width(), item->geometry().height()));
+ spacing(), northHeight, item->geometry().width(), item->geometry().height()));
}
}
if (center)
center->item->setGeometry(QRect(westWidth, northHeight, rect.width()
- eastWidth - westWidth, centerHeight));
- eastWidth - westWidth, centerHeight));
}
QSize BorderLayout::sizeHint() const {
QSize BorderLayout::sizeHint() const
{
return calculateSize(SizeHint);
}
QLayoutItem *BorderLayout::takeAt(int index) {
if (index >= 0 && index < list.size()) {
QLayoutItem *BorderLayout::takeAt(int index)
{
if (index >= 0 && index < list.size())
{
ItemWrapper *layoutStruct = list.takeAt(index);
return layoutStruct->item;
}
return 0;
}
void BorderLayout::add(QLayoutItem *item, Position position) {
void BorderLayout::add(QLayoutItem *item, Position position)
{
list.append(new ItemWrapper(item, position));
}
QSize BorderLayout::calculateSize(SizeType sizeType) const {
QSize BorderLayout::calculateSize(SizeType sizeType) const
{
QSize totalSize;
for (int i = 0; i < list.size(); ++i) {
for (int i = 0; i < list.size(); ++i)
{
ItemWrapper *wrapper = list.at(i);
Position position = wrapper->position;
QSize itemSize;
if( wrapper->item->isEmpty() ) continue;
if (wrapper->item->isEmpty()) continue;
if (sizeType == MinimumSize)
itemSize = wrapper->item->minimumSize();

32
components/borderlayout.h

@ -66,10 +66,12 @@
*
* Please read the doc of trolltech for the example.
*/
class BorderLayout : public QLayout {
class BorderLayout : public QLayout
{
public:
/*! Position of the widget */
enum Position {
enum Position
{
West, //!< The widget is placed at left
North, //!< The widget is placed in top
South, //!< The widget is placed in bottom
@ -83,30 +85,32 @@ public:
* \param margin The marge arround the layout
* \param spacing The space between the widget
*/
BorderLayout( QWidget *parent, int margin = 0, int spacing = -1 );
BorderLayout(QWidget *parent, int margin = 0, int spacing = -1);
/*!
* Create the \e BorderLayout
* \param spacing The space between the widget
*/
BorderLayout( int spacing = -1 );
BorderLayout(int spacing = -1);
//! Destroy the layout
~BorderLayout();
void addItem( QLayoutItem *item );
void addWidget( QWidget *widget, Position position );
void addItem(QLayoutItem *item);
void addWidget(QWidget *widget, Position position);
Qt::Orientations expandingDirections() const;
bool hasHeightForWidth() const;
int count() const;
QLayoutItem *itemAt( int index ) const;
QLayoutItem *itemAt(int index) const;
QSize minimumSize() const;
void setGeometry( const QRect &rect );
void setGeometry(const QRect &rect);
QSize sizeHint() const;
QLayoutItem *takeAt( int index );
QLayoutItem *takeAt(int index);
void add( QLayoutItem *item, Position position );
void add(QLayoutItem *item, Position position);
private:
struct ItemWrapper {
ItemWrapper(QLayoutItem *i, Position p) {
struct ItemWrapper
{
ItemWrapper(QLayoutItem *i, Position p)
{
item = i;
position = p;
}
@ -119,6 +123,6 @@ private:
QSize calculateSize(SizeType sizeType) const;
QList<ItemWrapper *> list;
};
};
#endif
#endif

190
components/customschemeimpl.cpp

@ -32,168 +32,198 @@
// Qt header
#include <QHBoxLayout>
CustomSchemeImpl::CustomSchemeImpl( QWidget * parent, Qt::WindowFlags f ) : QWidget( parent, f ), m_languageFactory( 0 ), m_formats( 0 ), m_currentFormat( 0 ), m_currentItem( 0 ) {
setupUi( this );
CustomSchemeImpl::CustomSchemeImpl(QWidget * parent, Qt::WindowFlags f) : QWidget(parent, f), m_languageFactory(0), m_formats(0), m_currentFormat(0), m_currentItem(0)
{
setupUi(this);
m_exampleEditor = new QCodeEdit( false, this );
m_exampleEditor = new QCodeEdit(false, this);
QHBoxLayout * hb = new QHBoxLayout;
hb->addWidget( m_exampleEditor->editor() );
m_exampleGroupBox->setLayout( hb );
m_exampleGroupBox->setVisible( false );
hb->addWidget(m_exampleEditor->editor());
m_exampleGroupBox->setLayout(hb);
m_exampleGroupBox->setVisible(false);
}
CustomSchemeImpl::~CustomSchemeImpl() {
CustomSchemeImpl::~CustomSchemeImpl()
{
}
void CustomSchemeImpl::updateFormatList() {
void CustomSchemeImpl::updateFormatList()
{
m_formatsListView->clear();
if( m_formats )
foreach( const QString & f, m_formats->formats() ) {
QFormat format = m_formats->format( f );
QListWidgetItem * item = new QListWidgetItem( f, m_formatsListView );
if( format.background.isValid() ) item->setBackground( format.background );
if( format.foreground.isValid() ) item->setForeground( format.foreground );
item->setFont( format.toTextCharFormat().font() );
item->setHidden( m_hiddenFormat.contains( f ) );
}
if (m_formats)
foreach(const QString & f, m_formats->formats())
{
QFormat format = m_formats->format(f);
QListWidgetItem * item = new QListWidgetItem(f, m_formatsListView);
if (format.background.isValid()) item->setBackground(format.background);
if (format.foreground.isValid()) item->setForeground(format.foreground);
item->setFont(format.toTextCharFormat().font());
item->setHidden(m_hiddenFormat.contains(f));
}
if( m_formatsListView->count() )
m_formatsListView->setCurrentRow( 0 );
if (m_formatsListView->count())
m_formatsListView->setCurrentRow(0);
}
void CustomSchemeImpl::setFormatScheme( QFormatScheme * formats ) {
if( formats != m_formats ) {
void CustomSchemeImpl::setFormatScheme(QFormatScheme * formats)
{
if (formats != m_formats)
{
m_formats = formats;
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
updateFormatList();
}
}
QFormatScheme * CustomSchemeImpl::formatScheme() const {
QFormatScheme * CustomSchemeImpl::formatScheme() const
{
return m_formats;
}
void CustomSchemeImpl::setExample( const QString & value ) {
if( m_example != value ) {
void CustomSchemeImpl::setExample(const QString & value)
{
if (m_example != value)
{
m_example = value;
m_exampleEditor->editor()->setText( m_example );
m_exampleGroupBox->setVisible( ! m_example.isEmpty() );
m_exampleEditor->editor()->setText(m_example);
m_exampleGroupBox->setVisible(! m_example.isEmpty());
}
}
const QString & CustomSchemeImpl::example() const {
const QString & CustomSchemeImpl::example() const
{
return m_example;
}
void CustomSchemeImpl::setLanguageFactory( QLanguageFactory * value ) {
if( value != m_languageFactory ) {
void CustomSchemeImpl::setLanguageFactory(QLanguageFactory * value)
{
if (value != m_languageFactory)
{
m_languageFactory = value;
}
}
QLanguageFactory * CustomSchemeImpl::languageFactory() const {
QLanguageFactory * CustomSchemeImpl::languageFactory() const
{
return m_languageFactory;
}
void CustomSchemeImpl::setLanguageDefinition( const QString & value ) {
if( m_languageFactory ) {
m_languageFactory->setLanguage( m_exampleEditor->editor(), value );
void CustomSchemeImpl::setLanguageDefinition(const QString & value)
{
if (m_languageFactory)
{
m_languageFactory->setLanguage(m_exampleEditor->editor(), value);
}
}
QString CustomSchemeImpl::languageDefinition() const {
if( m_exampleEditor->editor()->languageDefinition() )
QString CustomSchemeImpl::languageDefinition() const
{
if (m_exampleEditor->editor()->languageDefinition())
return m_exampleEditor->editor()->languageDefinition()->language();
else
return QString();
}
void CustomSchemeImpl::setHiddenFormat( const QStringList & value ) {
if( m_hiddenFormat != value ) {
void CustomSchemeImpl::setHiddenFormat(const QStringList & value)
{
if (m_hiddenFormat != value)
{
m_hiddenFormat = value;
updateFormatList();
}
}
const QStringList & CustomSchemeImpl::hiddenFormat() const {
const QStringList & CustomSchemeImpl::hiddenFormat() const
{
return m_hiddenFormat;
}
void CustomSchemeImpl::on_m_formatsListView_currentItemChanged( QListWidgetItem * current, QListWidgetItem * previous ) {
if( current != m_currentItem ) {
void CustomSchemeImpl::on_m_formatsListView_currentItemChanged(QListWidgetItem * current, QListWidgetItem * previous)
{
if (current != m_currentItem)
{
m_currentItem = current;
if( m_currentItem && m_formats ) {
m_currentFormat = &(m_formats->formatRef( m_currentItem->text() ));
m_boldCheckBox->setChecked( m_currentFormat->weight != QFont::Normal );
m_overLineCheckBox->setChecked( m_currentFormat->overline );
m_strikeOutCheckBox->setChecked( m_currentFormat->strikeout );
m_italicCheckBox->setChecked( m_currentFormat->italic );
m_underLineCheckBox->setChecked( m_currentFormat->underline || m_currentFormat->waveUnderline );
m_waveUnderLineCheckBox->setChecked( m_currentFormat->waveUnderline );
m_foreGroundComboBox->setColor( m_currentFormat->foreground );
m_backGroundComboBox->setColor( m_currentFormat->background );
if (m_currentItem && m_formats)
{
m_currentFormat = &(m_formats->formatRef(m_currentItem->text()));
m_boldCheckBox->setChecked(m_currentFormat->weight != QFont::Normal);
m_overLineCheckBox->setChecked(m_currentFormat->overline);
m_strikeOutCheckBox->setChecked(m_currentFormat->strikeout);
m_italicCheckBox->setChecked(m_currentFormat->italic);
m_underLineCheckBox->setChecked(m_currentFormat->underline || m_currentFormat->waveUnderline);
m_waveUnderLineCheckBox->setChecked(m_currentFormat->waveUnderline);
m_foreGroundComboBox->setColor(m_currentFormat->foreground);
m_backGroundComboBox->setColor(m_currentFormat->background);
}
m_formatGroupBox->setEnabled( m_currentItem );
m_colorGroupBox->setEnabled( m_currentItem );
m_exampleGroupBox->setEnabled( m_currentItem );
m_formatGroupBox->setEnabled(m_currentItem);
m_colorGroupBox->setEnabled(m_currentItem);
m_exampleGroupBox->setEnabled(m_currentItem);
}
}
void CustomSchemeImpl::on_m_boldCheckBox_stateChanged( int state ) {
if( state == Qt::Checked )
void CustomSchemeImpl::on_m_boldCheckBox_stateChanged(int state)
{
if (state == Qt::Checked)
m_currentFormat->weight = QFont::Bold;
else
m_currentFormat->weight = QFont::Normal;
m_currentItem->setFont( m_currentFormat->toTextCharFormat().font() );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_currentItem->setFont(m_currentFormat->toTextCharFormat().font());
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_overLineCheckBox_stateChanged( int state ) {
void CustomSchemeImpl::on_m_overLineCheckBox_stateChanged(int state)
{
m_currentFormat->overline = state == Qt::Checked;
m_currentItem->setFont( m_currentFormat->toTextCharFormat().font() );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_currentItem->setFont(m_currentFormat->toTextCharFormat().font());
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_strikeOutCheckBox_stateChanged( int state ) {
void CustomSchemeImpl::on_m_strikeOutCheckBox_stateChanged(int state)
{
m_currentFormat->strikeout = state == Qt::Checked;
m_currentItem->setFont( m_currentFormat->toTextCharFormat().font() );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_currentItem->setFont(m_currentFormat->toTextCharFormat().font());
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_italicCheckBox_stateChanged( int state ) {
void CustomSchemeImpl::on_m_italicCheckBox_stateChanged(int state)
{
m_currentFormat->italic = state == Qt::Checked;
m_currentItem->setFont( m_currentFormat->toTextCharFormat().font() );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_currentItem->setFont(m_currentFormat->toTextCharFormat().font());
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_underLineCheckBox_stateChanged( int state ) {
void CustomSchemeImpl::on_m_underLineCheckBox_stateChanged(int state)
{
m_currentFormat->underline = (state == Qt::Checked) && (m_waveUnderLineCheckBox->isChecked() == Qt::Unchecked);
m_currentFormat->waveUnderline = (state == Qt::Checked) && (m_waveUnderLineCheckBox->isChecked() == Qt::Checked);
m_currentItem->setFont( m_currentFormat->toTextCharFormat().font() );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_currentItem->setFont(m_currentFormat->toTextCharFormat().font());
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_waveUnderLineCheckBox_stateChanged( int state ) {
void CustomSchemeImpl::on_m_waveUnderLineCheckBox_stateChanged(int state)
{
m_currentFormat->underline = m_underLineCheckBox->isChecked() && (state == Qt::Unchecked);
m_currentFormat->waveUnderline = m_underLineCheckBox->isChecked() && (state == Qt::Checked);
m_currentItem->setFont( m_currentFormat->toTextCharFormat().font() );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
m_currentItem->setFont(m_currentFormat->toTextCharFormat().font());
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_foreGroundComboBox_activated( const QColor &col ) {
void CustomSchemeImpl::on_m_foreGroundComboBox_activated(const QColor &col)
{
m_currentFormat->foreground = col;
if( m_currentFormat->background.isValid() ) m_currentItem->setBackground( m_currentFormat->background );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
if (m_currentFormat->background.isValid()) m_currentItem->setBackground(m_currentFormat->background);
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}
void CustomSchemeImpl::on_m_backGroundComboBox_activated( const QColor &col ) {
void CustomSchemeImpl::on_m_backGroundComboBox_activated(const QColor &col)
{
m_currentFormat->background = col;
if( m_currentFormat->foreground.isValid() ) m_currentItem->setForeground( m_currentFormat->foreground );
m_exampleEditor->editor()->document()->setFormatScheme( m_formats );
if (m_currentFormat->foreground.isValid()) m_currentItem->setForeground(m_currentFormat->foreground);
m_exampleEditor->editor()->document()->setFormatScheme(m_formats);
}

39
components/customschemeimpl.h

@ -32,60 +32,61 @@ class QLanguageFactory;
/*!
* Create a widget that permit to personalize the editor.
*/
class CustomSchemeImpl : public QWidget, public Ui::CustomScheme {
class CustomSchemeImpl : public QWidget, public Ui::CustomScheme
{
Q_OBJECT
Q_CLASSINFO("Author", "Ulrich Van Den Hekke")
Q_CLASSINFO("URL", "http://xinx.shadoware.org")
Q_CLASSINFO("Licence", "GPL v3 or later")
Q_PROPERTY( QString example READ example WRITE setExample )
Q_PROPERTY( QString languageDefinition READ languageDefinition WRITE setLanguageDefinition )
Q_PROPERTY( QStringList hiddenFormat READ hiddenFormat WRITE setHiddenFormat )
Q_PROPERTY(QString example READ example WRITE setExample)
Q_PROPERTY(QString languageDefinition READ languageDefinition WRITE setLanguageDefinition)
Q_PROPERTY(QStringList hiddenFormat READ hiddenFormat WRITE setHiddenFormat)
public:
/*!
* Construct the widget.
* \param parent The parent widget
* \param f Flags for the widget
*/
CustomSchemeImpl( QWidget * parent = 0, Qt::WindowFlags f = 0 );
CustomSchemeImpl(QWidget * parent = 0, Qt::WindowFlags f = 0);
//! Destroy the widget
virtual ~CustomSchemeImpl();
//! Set a new format scheme in the widget and configure it.
void setFormatScheme( QFormatScheme * formats );
void setFormatScheme(QFormatScheme * formats);
//! Return the current format scheme.
QFormatScheme * formatScheme() const;
//! Set the exemple in the custom widget \e value
void setExample( const QString & value );
void setExample(const QString & value);
//! Return the exemple set
const QString & example() const;
//! Set the language definition to \e value
void setLanguageDefinition( const QString & value );
void setLanguageDefinition(const QString & value);
//! Return the language definition set.
QString languageDefinition() const;
//! Set the language factory used in the custom editor \e value
void setLanguageFactory( QLanguageFactory * value );
void setLanguageFactory(QLanguageFactory * value);
//! Return the language factory set.
QLanguageFactory * languageFactory() const;
//! Set the list of format that the widget musn't be show.
void setHiddenFormat( const QStringList & value );
void setHiddenFormat(const QStringList & value);
//! Return the list of format to hide.
const QStringList & hiddenFormat() const;
private slots:
void on_m_formatsListView_currentItemChanged( QListWidgetItem * current, QListWidgetItem * previous );
void on_m_boldCheckBox_stateChanged( int state );
void on_m_overLineCheckBox_stateChanged( int state );
void on_m_strikeOutCheckBox_stateChanged( int state );
void on_m_italicCheckBox_stateChanged( int state );
void on_m_underLineCheckBox_stateChanged( int state );
void on_m_waveUnderLineCheckBox_stateChanged( int state );
void on_m_foreGroundComboBox_activated( const QColor &col );
void on_m_backGroundComboBox_activated( const QColor &col );
void on_m_formatsListView_currentItemChanged(QListWidgetItem * current, QListWidgetItem * previous);
void on_m_boldCheckBox_stateChanged(int state);
void on_m_overLineCheckBox_stateChanged(int state);
void on_m_strikeOutCheckBox_stateChanged(int state);
void on_m_italicCheckBox_stateChanged(int state);
void on_m_underLineCheckBox_stateChanged(int state);
void on_m_waveUnderLineCheckBox_stateChanged(int state);
void on_m_foreGroundComboBox_activated(const QColor &col);
void on_m_backGroundComboBox_activated(const QColor &col);
private:
void updateFormatList();

40
components/designer/customschemeplugin.cpp

@ -26,54 +26,66 @@
/* CustomSchemeWidgetPlugin */
CustomSchemeWidgetPlugin::CustomSchemeWidgetPlugin( QObject *parent ) : QObject( parent ) {
CustomSchemeWidgetPlugin::CustomSchemeWidgetPlugin(QObject *parent) : QObject(parent)
{
m_initialized = false;
}
void CustomSchemeWidgetPlugin::initialize( QDesignerFormEditorInterface *core ) {
if( m_initialized )
void CustomSchemeWidgetPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
m_initialized = true;
}
bool CustomSchemeWidgetPlugin::isInitialized() const {
bool CustomSchemeWidgetPlugin::isInitialized() const
{
return m_initialized;
}
bool CustomSchemeWidgetPlugin::isContainer() const {
bool CustomSchemeWidgetPlugin::isContainer() const
{
return false;
}
QIcon CustomSchemeWidgetPlugin::icon() const {
QIcon CustomSchemeWidgetPlugin::icon() const
{
return QIcon();
}
QString CustomSchemeWidgetPlugin::toolTip() const {
QString CustomSchemeWidgetPlugin::toolTip() const
{
return "";
}
QString CustomSchemeWidgetPlugin::whatsThis() const {
QString CustomSchemeWidgetPlugin::whatsThis() const
{
return "";
}
QString CustomSchemeWidgetPlugin::group() const {
QString CustomSchemeWidgetPlugin::group() const
{
return "XINX Widget";
}
QString CustomSchemeWidgetPlugin::name() const {
QString CustomSchemeWidgetPlugin::name() const
{
return "CustomSchemeImpl";
}
QString CustomSchemeWidgetPlugin::includeFile() const {
QString CustomSchemeWidgetPlugin::includeFile() const
{
return "customschemeimpl.h";
}
QString CustomSchemeWidgetPlugin::domXml() const {
QString CustomSchemeWidgetPlugin::domXml() const
{
return "<widget class=\"CustomSchemeImpl\" name=\"customScheme\"/>";
}
QWidget * CustomSchemeWidgetPlugin::createWidget( QWidget *parent ) {
return new CustomSchemeImpl( parent );
QWidget * CustomSchemeWidgetPlugin::createWidget(QWidget *parent)
{
return new CustomSchemeImpl(parent);
}

33
components/designer/customschemeplugin.h

@ -25,25 +25,26 @@
/* XinxListWidgetPlugin */
class CustomSchemeWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface {
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
class CustomSchemeWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
CustomSchemeWidgetPlugin( QObject *parent = 0 );
CustomSchemeWidgetPlugin(QObject *parent = 0);
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget( QWidget *parent );
void initialize( QDesignerFormEditorInterface *core );
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget(QWidget *parent);
void initialize(QDesignerFormEditorInterface *core);
private:
bool m_initialized;
bool m_initialized;
};
#endif /* _CUSTOMSCHEMEWIDGETPLUGIN_H_ */

40
components/designer/directoryeditplugin.cpp

@ -26,54 +26,66 @@
/* DirectoryEditPlugin */
DirectoryEditPlugin::DirectoryEditPlugin( QObject *parent ) : QObject( parent ) {
DirectoryEditPlugin::DirectoryEditPlugin(QObject *parent) : QObject(parent)
{
m_initialized = false;
}
void DirectoryEditPlugin::initialize( QDesignerFormEditorInterface *core ) {
if( m_initialized )
void DirectoryEditPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
m_initialized = true;
}
bool DirectoryEditPlugin::isInitialized() const {
bool DirectoryEditPlugin::isInitialized() const
{
return m_initialized;
}
bool DirectoryEditPlugin::isContainer() const {
bool DirectoryEditPlugin::isContainer() const
{
return false;
}
QIcon DirectoryEditPlugin::icon() const {
QIcon DirectoryEditPlugin::icon() const
{
return QIcon();
}
QString DirectoryEditPlugin::toolTip() const {
QString DirectoryEditPlugin::toolTip() const
{
return "";
}
QString DirectoryEditPlugin::whatsThis() const {
QString DirectoryEditPlugin::whatsThis() const
{
return "";
}
QString DirectoryEditPlugin::group() const {
QString DirectoryEditPlugin::group() const
{
return "XINX Widget";
}
QString DirectoryEditPlugin::name() const {
QString DirectoryEditPlugin::name() const
{
return "DirectoryEdit";
}
QString DirectoryEditPlugin::includeFile() const {
QString DirectoryEditPlugin::includeFile() const
{
return "directoryedit.h";
}
QString DirectoryEditPlugin::domXml() const {
QString DirectoryEditPlugin::domXml() const
{
return "<widget class=\"DirectoryEdit\" name=\"directoryEdit\"/>";
}
QWidget * DirectoryEditPlugin::createWidget( QWidget *parent ) {
return new DirectoryEdit( parent );
QWidget * DirectoryEditPlugin::createWidget(QWidget *parent)
{
return new DirectoryEdit(parent);
}

29
components/designer/directoryeditplugin.h

@ -25,25 +25,26 @@
/* DirectoryEditPlugin */
class DirectoryEditPlugin : public QObject, public QDesignerCustomWidgetInterface {
class DirectoryEditPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
DirectoryEditPlugin( QObject *parent = 0 );
DirectoryEditPlugin(QObject *parent = 0);
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget( QWidget *parent );
void initialize( QDesignerFormEditorInterface *core );
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget(QWidget *parent);
void initialize(QDesignerFormEditorInterface *core);
private:
bool m_initialized;
bool m_initialized;
};
#endif /* DIRECTORYEDITPLUGIN_H_ */

40
components/designer/directoryeditwidgetplugin.cpp

@ -26,54 +26,66 @@
/* DirectoryEditWidgetPlugin */
DirectoryEditWidgetPlugin::DirectoryEditWidgetPlugin( QObject *parent ) : QObject( parent ) {
DirectoryEditWidgetPlugin::DirectoryEditWidgetPlugin(QObject *parent) : QObject(parent)
{
m_initialized = false;
}
void DirectoryEditWidgetPlugin::initialize( QDesignerFormEditorInterface *core ) {
if( m_initialized )
void DirectoryEditWidgetPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
m_initialized = true;
}
bool DirectoryEditWidgetPlugin::isInitialized() const {
bool DirectoryEditWidgetPlugin::isInitialized() const
{
return m_initialized;
}
bool DirectoryEditWidgetPlugin::isContainer() const {
bool DirectoryEditWidgetPlugin::isContainer() const
{
return false;
}
QIcon DirectoryEditWidgetPlugin::icon() const {
QIcon DirectoryEditWidgetPlugin::icon() const
{
return QIcon();
}
QString DirectoryEditWidgetPlugin::toolTip() const {
QString DirectoryEditWidgetPlugin::toolTip() const
{
return "";
}
QString DirectoryEditWidgetPlugin::whatsThis() const {
QString DirectoryEditWidgetPlugin::whatsThis() const
{
return "";
}
QString DirectoryEditWidgetPlugin::group() const {
QString DirectoryEditWidgetPlugin::group() const
{
return "XINX Widget";
}
QString DirectoryEditWidgetPlugin::name() const {
QString DirectoryEditWidgetPlugin::name() const
{
return "DirectoryEditWidget";
}
QString DirectoryEditWidgetPlugin::includeFile() const {
QString DirectoryEditWidgetPlugin::includeFile() const
{
return "directoryedit.h";
}
QString DirectoryEditWidgetPlugin::domXml() const {
QString DirectoryEditWidgetPlugin::domXml() const
{
return "<widget class=\"DirectoryEditWidget\" name=\"directoryEditWidget\"/>";
}
QWidget * DirectoryEditWidgetPlugin::createWidget( QWidget *parent ) {
return new DirectoryEditWidget( parent );
QWidget * DirectoryEditWidgetPlugin::createWidget(QWidget *parent)
{
return new DirectoryEditWidget(parent);
}

29
components/designer/directoryeditwidgetplugin.h

@ -25,25 +25,26 @@
/* DirectoryEditWidgetPlugin */
class DirectoryEditWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface {
class DirectoryEditWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
DirectoryEditWidgetPlugin( QObject *parent = 0 );
DirectoryEditWidgetPlugin(QObject *parent = 0);
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget( QWidget *parent );
void initialize( QDesignerFormEditorInterface *core );
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget(QWidget *parent);
void initialize(QDesignerFormEditorInterface *core);
private:
bool m_initialized;
bool m_initialized;
};
#endif /* DIRECTORYEDITWIDGETPLUGIN_H_ */

40
components/designer/pluginselectorplugin.cpp

@ -26,54 +26,66 @@
/* PluginSelectorPlugin */
PluginSelectorPlugin::PluginSelectorPlugin( QObject *parent ) : QObject( parent ) {
PluginSelectorPlugin::PluginSelectorPlugin(QObject *parent) : QObject(parent)
{
m_initialized = false;
}
void PluginSelectorPlugin::initialize( QDesignerFormEditorInterface *core ) {
if( m_initialized )
void PluginSelectorPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
m_initialized = true;
}
bool PluginSelectorPlugin::isInitialized() const {
bool PluginSelectorPlugin::isInitialized() const
{
return m_initialized;
}
bool PluginSelectorPlugin::isContainer() const {
bool PluginSelectorPlugin::isContainer() const
{
return false;
}
QIcon PluginSelectorPlugin::icon() const {
QIcon PluginSelectorPlugin::icon() const
{
return QIcon();
}
QString PluginSelectorPlugin::toolTip() const {
QString PluginSelectorPlugin::toolTip() const
{
return "";
}
QString PluginSelectorPlugin::whatsThis() const {
QString PluginSelectorPlugin::whatsThis() const
{
return "";
}
QString PluginSelectorPlugin::group() const {
QString PluginSelectorPlugin::group() const
{
return "XINX Widget";
}
QString PluginSelectorPlugin::name() const {
QString PluginSelectorPlugin::name() const
{
return "PluginSelector";
}
QString PluginSelectorPlugin::includeFile() const {
QString PluginSelectorPlugin::includeFile() const
{
return "pluginselector.h";
}
QString PluginSelectorPlugin::domXml() const {
QString PluginSelectorPlugin::domXml() const
{
return "<widget class=\"PluginSelector\" name=\"pluginSelector\"/>";
}
QWidget * PluginSelectorPlugin::createWidget( QWidget *parent ) {
return new PluginSelector( parent );
QWidget * PluginSelectorPlugin::createWidget(QWidget *parent)
{
return new PluginSelector(parent);
}

29
components/designer/pluginselectorplugin.h

@ -25,25 +25,26 @@
/* PluginSelectorPlugin */
class PluginSelectorPlugin : public QObject, public QDesignerCustomWidgetInterface {
class PluginSelectorPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
PluginSelectorPlugin( QObject *parent = 0 );
PluginSelectorPlugin(QObject *parent = 0);
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget( QWidget *parent );
void initialize( QDesignerFormEditorInterface *core );
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget(QWidget *parent);
void initialize(QDesignerFormEditorInterface *core);
private:
bool m_initialized;
bool m_initialized;
};
#endif /* PLUGINSELECTORPLUGIN_H_ */

40
components/designer/xinxcolorcomboplugin.cpp

@ -26,54 +26,66 @@
/* XinxColorComboPlugin */
XinxColorComboPlugin::XinxColorComboPlugin( QObject *parent ) : QObject( parent ) {
XinxColorComboPlugin::XinxColorComboPlugin(QObject *parent) : QObject(parent)
{
m_initialized = false;
}
void XinxColorComboPlugin::initialize( QDesignerFormEditorInterface *core ) {
if( m_initialized )
void XinxColorComboPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
m_initialized = true;
}
bool XinxColorComboPlugin::isInitialized() const {
bool XinxColorComboPlugin::isInitialized() const
{
return m_initialized;
}
bool XinxColorComboPlugin::isContainer() const {
bool XinxColorComboPlugin::isContainer() const
{
return false;
}
QIcon XinxColorComboPlugin::icon() const {
QIcon XinxColorComboPlugin::icon() const
{
return QIcon();
}
QString XinxColorComboPlugin::toolTip() const {
QString XinxColorComboPlugin::toolTip() const
{
return "";
}
QString XinxColorComboPlugin::whatsThis() const {
QString XinxColorComboPlugin::whatsThis() const
{
return "";
}
QString XinxColorComboPlugin::group() const {
QString XinxColorComboPlugin::group() const
{
return "XINX Widget";
}
QString XinxColorComboPlugin::name() const {
QString XinxColorComboPlugin::name() const
{
return "XinxColorCombo";
}
QString XinxColorComboPlugin::includeFile() const {
QString XinxColorComboPlugin::includeFile() const
{
return "xinxcolorcombo.h";
}
QString XinxColorComboPlugin::domXml() const {
QString XinxColorComboPlugin::domXml() const
{
return "<widget class=\"XinxColorCombo\" name=\"xinxColorCombo\"/>";
}
QWidget * XinxColorComboPlugin::createWidget( QWidget *parent ) {
return new XinxColorCombo( parent );
QWidget * XinxColorComboPlugin::createWidget(QWidget *parent)
{
return new XinxColorCombo(parent);
}

33
components/designer/xinxcolorcomboplugin.h

@ -25,25 +25,26 @@
/* KColorComboPlugin */
class XinxColorComboPlugin : public QObject, public QDesignerCustomWidgetInterface {
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
class XinxColorComboPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
XinxColorComboPlugin( QObject *parent = 0 );
XinxColorComboPlugin(QObject *parent = 0);
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget( QWidget *parent );
void initialize( QDesignerFormEditorInterface *core );
bool isContainer() const;
bool isInitialized() const;
QIcon icon() const;
QString domXml() const;
QString group() const;
QString includeFile() const;
QString name() const;
QString toolTip() const;
QString whatsThis() const;
QWidget *createWidget(QWidget *parent);
void initialize(QDesignerFormEditorInterface *core);
private:
bool m_initialized;
bool m_initialized;
};
#endif /* KCOLORCOMBOPLUGIN_H_ */

18
components/designer/xinxdesignerplugin.cpp

@ -26,16 +26,18 @@
#include "xinxlistwidgetplugin.h"
#include "customschemeplugin.h"
XinxDesignerPlugin::XinxDesignerPlugin( QObject *parent ) : QObject( parent ) {
widgets.append( new DirectoryEditPlugin( this ) );
widgets.append( new DirectoryEditWidgetPlugin( this ) );
widgets.append( new XinxColorComboPlugin( this ) );
widgets.append( new PluginSelectorPlugin( this ) );
widgets.append( new XinxListWidgetPlugin( this ) );
widgets.append( new CustomSchemeWidgetPlugin( this ) );
XinxDesignerPlugin::XinxDesignerPlugin(QObject *parent) : QObject(parent)
{
widgets.append(new DirectoryEditPlugin(this));
widgets.append(new DirectoryEditWidgetPlugin(this));
widgets.append(new XinxColorComboPlugin(this));
widgets.append(new PluginSelectorPlugin(this));
widgets.append(new XinxListWidgetPlugin(this));
widgets.append(new CustomSchemeWidgetPlugin(this));
}
QList<QDesignerCustomWidgetInterface*> XinxDesignerPlugin::customWidgets() const {
QList<QDesignerCustomWidgetInterface*> XinxDesignerPlugin::customWidgets() const
{
return widgets;
}

5
components/designer/xinxdesignerplugin.h

@ -23,11 +23,12 @@
#include <QtDesigner/QtDesigner>
#include <QtCore/qplugin.h>
class XinxDesignerPlugin: public QObject, public QDesignerCustomWidgetCollectionInterface {
class XinxDesignerPlugin: public QObject, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
public:
XinxDesignerPlugin( QObject *parent = 0 );
XinxDesignerPlugin(QObject *parent = 0);
virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
private:

40
components/designer/xinxlistwidgetplugin.cpp

@ -26,54 +26,66 @@
/* XinxListWidgetPlugin */
XinxListWidgetPlugin::XinxListWidgetPlugin( QObject *parent ) : QObject( parent ) {
XinxListWidgetPlugin::XinxListWidgetPlugin(QObject *parent) : QObject(parent)
{
m_initialized = false;
}
void XinxListWidgetPlugin::initialize( QDesignerFormEditorInterface *core ) {
if( m_initialized )
void XinxListWidgetPlugin::initialize(QDesignerFormEditorInterface *core)
{
if (m_initialized)
return;
m_initialized = true;
}
bool XinxListWidgetPlugin::isInitialized() const {
bool XinxListWidgetPlugin::isInitialized() const
{
return m_initialized;
}
bool XinxListWidgetPlugin::isContainer() const {
bool XinxListWidgetPlugin::isContainer() const
{
return false;
}
QIcon XinxListWidgetPlugin::icon() const {
QIcon XinxListWidgetPlugin::icon() const
{
return QIcon();
}
QString XinxListWidgetPlugin::toolTip() const {
QString XinxListWidgetPlugin::toolTip() const
{
return "";
}
QString XinxListWidgetPlugin::whatsThis() const {
QString XinxListWidgetPlugin::whatsThis() const
{
return "";
}
QString XinxListWidgetPlugin::group() const {
QString XinxListWidgetPlugin::group() const
{
return "XINX Widget";
}
QString XinxListWidgetPlugin::name() const {
QString XinxListWidgetPlugin::name() const
{
return "XinxListWidgetImpl";
}
QString XinxListWidgetPlugin::includeFile() const {
QString XinxListWidgetPlugin::includeFile() const
{
return "xinxlistwidgetimpl.h";
}
QString XinxListWidgetPlugin::domXml() const {
QString XinxListWidgetPlugin::domXml() const
{
return "<widget class=\"XinxListWidgetImpl\" name=\"xinxListWidget\"/>";
}
QWidget * XinxListWidgetPlugin::createWidget( QWidget *parent ) {
return new XinxListWidgetImpl( parent );
QWidget * XinxListWidgetPlugin::createWidget(QWidget *parent)
{
return new XinxListWidgetImpl(parent);
}

29
components/designer/xinxlistwidgetplugin.h

@ -25,25 +25,26 @@
/* XinxListWidgetPlugin */
class XinxListWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface {
class XinxListWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT