Browse Source

[EVO] Mise en form du source

master
Ulrich Van Den Hekke 11 years ago
parent
commit
e100149352
  1. 82
      components/directoryedit.cpp
  2. 2
      components/directoryedit.h
  3. 48
      components/pluginselector.cpp
  4. 2
      framework/actions/actioninterface.cpp
  5. 70
      framework/actions/actionmanager.cpp
  6. 66
      framework/application/aboutdialogimpl.cpp
  7. 2
      framework/application/customdialog/customdialogimpl.cpp
  8. 6
      framework/application/customdialog/customeditorimpl.cpp
  9. 2
      framework/application/customdialog/customgeneralimpl.cpp
  10. 132
      framework/application/customdialog/custommodulesimpl.cpp
  11. 120
      framework/application/mainformimpl.cpp
  12. 2
      framework/application/mainformimpl.h
  13. 6
      framework/application/newversionwizardimpl.cpp
  14. 2
      framework/application/newversionwizardimpl.h
  15. 10
      framework/application/xinxprojectwizard/projectwizard.cpp
  16. 66
      framework/codecompletion/completer.cpp
  17. 7
      framework/codecompletion/completer.h
  18. 13
      framework/codecompletion/context.cpp
  19. 7
      framework/codecompletion/context.h
  20. 6
      framework/codecompletion/itemmodelfactory.cpp
  21. 3
      framework/codecompletion/itemmodelfactory.h
  22. 92
      framework/codecompletion/model.cpp
  23. 3
      framework/codecompletion/model.h
  24. 62
      framework/codecompletion/pool.cpp
  25. 3
      framework/codecompletion/snipets/snipetcontextparser.h
  26. 11
      framework/codecompletion/snipets/snipetcontexttype.cpp
  27. 13
      framework/codecompletion/snipets/snipetcontexttype.h
  28. 4
      framework/codecompletion/snipets/snipetitem.cpp
  29. 11
      framework/codecompletion/snipets/snipetitem.h
  30. 2
      framework/codecompletion/snipets/snipetitemmodelfactory.cpp
  31. 11
      framework/codecompletion/snipets/snipetitemmodelfactory.h
  32. 24
      framework/contentview3/cache.cpp
  33. 5
      framework/contentview3/cache.h
  34. 8
      framework/contentview3/dockwidget.cpp
  35. 3
      framework/contentview3/dockwidget.h
  36. 16
      framework/contentview3/file.cpp
  37. 7
      framework/contentview3/file.h
  38. 14
      framework/contentview3/filenode.cpp
  39. 3
      framework/contentview3/filenode.h
  40. 6
      framework/contentview3/node.cpp
  41. 3
      framework/contentview3/node.h
  42. 36
      framework/contentview3/parser.cpp
  43. 5
      framework/contentview3/parser.h
  44. 100
      framework/contentview3/treemodel.cpp
  45. 15
      framework/contentview3/treemodel.h
  46. 4
      framework/contentview3/treemodel_p.h
  47. 6
      framework/core/abstractmesssagedockwidget.h
  48. 24
      framework/core/appsettings.cpp
  49. 8
      framework/core/exceptions.cpp
  50. 12
      framework/core/filewatcher.cpp
  51. 2
      framework/core/filewatcher.h
  52. 6
      framework/core/p_filewatcher.h
  53. 2
      framework/core/uniqueapplication.cpp
  54. 30
      framework/editors/abstracteditor.cpp
  55. 6
      framework/editors/editorchoicedlg.cpp
  56. 3
      framework/editors/editorchoicedlg.h
  57. 10
      framework/editors/editorfactory.cpp
  58. 2
      framework/editors/editorfactory.h
  59. 62
      framework/editors/editormanager.cpp
  60. 2
      framework/editors/editormanager.h
  61. 4
      framework/editors/editormanager_p.h
  62. 18
      framework/editors/filetypeselector.cpp
  63. 32
      framework/editors/newfilewizardimpl.cpp
  64. 4
      framework/editors/newfilewizardimpl.h
  65. 30
      framework/editors/savingdialog.cpp
  66. 6
      framework/editors/savingdialog.h
  67. 49
      framework/editors/textfileeditor.cpp
  68. 4
      framework/editors/textfileeditor.h
  69. 4
      framework/editors/xinxcodeedit.cpp
  70. 2
      framework/jobs/xinxjob.cpp
  71. 4
      framework/jobs/xinxjob.h
  72. 34
      framework/jobs/xinxjobmanager.cpp
  73. 7
      framework/plugins/interfaces/codecompletion.h
  74. 6
      framework/plugins/interfaces/files.h
  75. 4
      framework/plugins/interfaces/gui.h
  76. 4
      framework/plugins/xinxpluginsloader.cpp
  77. 2
      framework/project/externalfileresolver.cpp
  78. 6
      framework/project/externalfileresolver.h
  79. 124
      framework/project/projectdirectorywidgetimpl.cpp
  80. 4
      framework/project/projectdirectorywidgetimpl_p.h
  81. 255
      framework/project/projectlistmodel.cpp
  82. 17
      framework/project/projectlistmodel.h
  83. 2
      framework/project/projectlistmodel_p.h
  84. 39
      framework/project/xinxprojectmanager.cpp
  85. 3
      framework/project/xinxprojectmanager.h
  86. 11
      framework/project/xinxprojectmanager_p.h
  87. 15
      framework/project/xinxprojectproject.cpp
  88. 11
      framework/project/xinxprojectproject.h
  89. 3
      framework/project/xinxprojectprojectexception.cpp
  90. 3
      framework/project/xinxprojectprojectexception.h
  91. 16
      framework/scripts/scriptmanager.cpp
  92. 151
      framework/session/session.cpp
  93. 2
      framework/session/session.h
  94. 3
      framework/session/session_p.h
  95. 5
      framework/session/sessioneditor.cpp
  96. 4
      framework/session/sessioneditor.h
  97. 29
      framework/session/sessionmanager.cpp
  98. 2
      framework/session/sessionmanager.h
  99. 12
      framework/snipets/basesnipetitemmodel.cpp
  100. 6
      framework/snipets/categoryitemmodel.cpp

82
components/directoryedit.cpp

@ -244,22 +244,22 @@ bool DirectoryEdit::isError() const
*/
void DirectoryEdit::setText(const QString & value)
{
if (value.startsWith (m_prefix))
if (value.startsWith(m_prefix))
{
QLineEdit::setText (value);
QLineEdit::setText(value);
}
else
{
QLineEdit::setText (m_prefix + value);
QLineEdit::setText(m_prefix + value);
}
}
/*!
* \reimp
*/
void DirectoryEdit::selectAll ()
void DirectoryEdit::selectAll()
{
setSelection (m_prefix.size (), text ().size () - m_prefix.size ());
setSelection(m_prefix.size(), text().size() - m_prefix.size());
}
/*!
@ -267,8 +267,8 @@ void DirectoryEdit::selectAll ()
*/
void DirectoryEdit::clear()
{
setText (m_prefix);
setCursorPosition (m_prefix.size ());
setText(m_prefix);
setCursorPosition(m_prefix.size());
}
/*!
@ -279,22 +279,33 @@ void DirectoryEdit::keyPressEvent(QKeyEvent *event)
if (!event->text().isEmpty() && cursorPosition() < m_prefix.size())
setCursorPosition(m_prefix.size());
switch (event->key()) {
switch (event->key())
{
case Qt::Key_End:
case Qt::Key_Home:
if (event->modifiers() & Qt::ShiftModifier) {
if (event->modifiers() & Qt::ShiftModifier)
{
int currentPos = cursorPosition();
const QString text = displayText();
if (event->key() == Qt::Key_End) {
if (currentPos == 0 && !m_prefix.isEmpty()) {
if (event->key() == Qt::Key_End)
{
if (currentPos == 0 && !m_prefix.isEmpty())
{
break; // let lineedit handle this
} else {
}
else
{
setSelection(currentPos, text.size() - currentPos);
}
} else {
if (currentPos <= m_prefix.size()) {
}
else
{
if (currentPos <= m_prefix.size())
{
break; // let lineedit handle this
} else {
}
else
{
setSelection(currentPos, m_prefix.size() - currentPos);
}
}
@ -311,7 +322,8 @@ void DirectoryEdit::keyPressEvent(QKeyEvent *event)
break;
#ifdef Q_WS_X11 // only X11
case Qt::Key_U:
if (event->modifiers() & Qt::ControlModifier) {
if (event->modifiers() & Qt::ControlModifier)
{
event->accept();
if (!isReadOnly())
clear();
@ -321,7 +333,8 @@ void DirectoryEdit::keyPressEvent(QKeyEvent *event)
#endif
default:
if (event == QKeySequence::SelectAll) {
if (event == QKeySequence::SelectAll)
{
selectAll();
event->accept();
return;
@ -329,7 +342,7 @@ void DirectoryEdit::keyPressEvent(QKeyEvent *event)
break;
}
QLineEdit::keyPressEvent (event);
QLineEdit::keyPressEvent(event);
}
/*!
@ -337,29 +350,38 @@ void DirectoryEdit::keyPressEvent(QKeyEvent *event)
*/
void DirectoryEdit::slotEditorCursorPositionChanged(int oldpos, int newpos)
{
if (!hasSelectedText() && !m_ignoreCursorPositionChanged) {
if (!hasSelectedText() && !m_ignoreCursorPositionChanged)
{
m_ignoreCursorPositionChanged = true;
bool allowSelection = true;
int pos = -1;
if (newpos < m_prefix.size() && newpos != 0) {
if (oldpos == 0) {
if (newpos < m_prefix.size() && newpos != 0)
{
if (oldpos == 0)
{
allowSelection = false;
pos = m_prefix.size();
} else {
}
else
{
pos = oldpos;
}
}
if (pos != -1) {
if (pos != -1)
{
const int selSize = selectionStart() >= 0 && allowSelection
? (selectedText().size() * (newpos < pos ? -1 : 1)) - newpos + pos
: 0;
: 0;
const bool wasBlocked = blockSignals(true);
if (selSize != 0) {
if (selSize != 0)
{
setSelection(pos - selSize, selSize);
} else {
}
else
{
setCursorPosition(pos);
}
blockSignals(wasBlocked);
@ -380,7 +402,7 @@ void DirectoryEdit::slotTextChanged(QString text)
QFile file(text);
QPalette palette(this->palette());
m_error = (m_directory != fileInfo.isDir ()) || (m_fileMustExist && !file.exists ());
m_error = (m_directory != fileInfo.isDir()) || (m_fileMustExist && !file.exists());
if (!m_error)
{
@ -468,7 +490,7 @@ PrivateDirectoryEditWidget::PrivateDirectoryEditWidget(QWidget * o)
DirectoryEditWidget::DirectoryEditWidget(bool isDirectory, QWidget * parent) : QWidget(parent)
{
d = new PrivateDirectoryEditWidget(this);
d->m_lineEdit->setDirectory (isDirectory);
d->m_lineEdit->setDirectory(isDirectory);
connect(d->m_button, SIGNAL(clicked()), this, SLOT(changePath()));
}
@ -497,7 +519,7 @@ DirectoryEditWidget::~DirectoryEditWidget()
*/
bool DirectoryEditWidget::isDirectory() const
{
return d->m_lineEdit->isDirectory ();
return d->m_lineEdit->isDirectory();
}
/*!
@ -507,7 +529,7 @@ bool DirectoryEditWidget::isDirectory() const
*/
void DirectoryEditWidget::setDirectory(bool value)
{
d->m_lineEdit->setDirectory (value);
d->m_lineEdit->setDirectory(value);
}
/*!

2
components/directoryedit.h

@ -70,7 +70,7 @@ protected:
void keyPressEvent(QKeyEvent *event);
public slots:
void setText(const QString & value);
void selectAll ();
void selectAll();
void clear();
void changePath(QWidget * parent = NULL, const QString & defaultValue = QString());
private slots:

48
components/pluginselector.cpp

@ -274,8 +274,8 @@ void PluginDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option
QPixmap iconPixmap = index.model()->data(index, PluginModel::PLG_ICON).value<QPixmap>();
iconPixmap = iconPixmap.scaled(iconSize());
int pixmapLeftPosition = myOption.direction == Qt::LeftToRight ?
checkRect.right() + m_separatorPixels
: checkRect.left() - m_separatorPixels - iconPixmap.width();
checkRect.right() + m_separatorPixels
: checkRect.left() - m_separatorPixels - iconPixmap.width();
painter->drawPixmap(pixmapLeftPosition, (myOption.rect.height() - iconPixmap.height()) / 2 + myOption.rect.top(), iconPixmap);
@ -304,22 +304,22 @@ void PluginDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option
painter->setFont(titleFont);
display = titleOpt.fontMetrics.elidedText(display, Qt::ElideRight, maxTextLength);
painter->drawText(
LeftPosition(display, titleOpt.fontMetrics),
m_separatorPixels + myOption.rect.top(),
titleOpt.fontMetrics.width(display),
titleOpt.fontMetrics.height(),
Qt::AlignLeft,
display);
LeftPosition(display, titleOpt.fontMetrics),
m_separatorPixels + myOption.rect.top(),
titleOpt.fontMetrics.width(display),
titleOpt.fontMetrics.height(),
Qt::AlignLeft,
display);
painter->setFont(descFont);
description = metrics.elidedText(description, Qt::ElideRight, maxTextLength);
painter->drawText(
LeftPosition(description, metrics),
myOption.rect.height() - m_separatorPixels - metrics.height() + myOption.rect.top(),
metrics.width(description),
metrics.height(),
Qt::AlignLeft,
description);
LeftPosition(description, metrics),
myOption.rect.height() - m_separatorPixels - metrics.height() + myOption.rect.top(),
metrics.width(description),
metrics.height(),
Qt::AlignLeft,
description);
painter->restore();
}
@ -361,12 +361,12 @@ QStyleOptionButton PluginDelegate::calculateButton(const QIcon & icon, const QSt
o.fontMetrics = option.fontMetrics;
buttonSize = QApplication::style()->sizeFromContents(
QStyle::CT_PushButton,
&option,
QSize(o.fontMetrics.width(caption) + o.iconSize.width() + m_separatorPixels * 3,
qMax(o.fontMetrics.height(), o.iconSize.height()) + m_separatorPixels
)
);
QStyle::CT_PushButton,
&option,
QSize(o.fontMetrics.width(caption) + o.iconSize.width() + m_separatorPixels * 3,
qMax(o.fontMetrics.height(), o.iconSize.height()) + m_separatorPixels
)
);
o.rect.setTop((option.rect.height() - buttonSize.height()) / 2 + option.rect.top());
o.rect.setSize(buttonSize);
@ -399,10 +399,10 @@ QStyleOptionViewItem PluginDelegate::calculateCheckbox(const QStyleOptionViewIte
rect = QApplication::style()->subElementRect(QStyle::SE_CheckBoxIndicator, &option);
QSize checkSize = rect.size();
rect.setTopLeft(QPoint(
option.direction == Qt::LeftToRight ? option.rect.left() + m_leftMargin + m_separatorPixels + decalage
: option.rect.right() - m_rightMargin - m_separatorPixels - checkSize.width() - decalage,
(option.rect.height() - checkSize.height()) / 2 + option.rect.top()
));
option.direction == Qt::LeftToRight ? option.rect.left() + m_leftMargin + m_separatorPixels + decalage
: option.rect.right() - m_rightMargin - m_separatorPixels - checkSize.width() - decalage,
(option.rect.height() - checkSize.height()) / 2 + option.rect.top()
));
rect.setSize(checkSize);
return checkOpt;
}

2
framework/actions/actioninterface.cpp

@ -115,7 +115,7 @@ bool MenuItem::isVisible() const
Separator::Separator() : _visible(true)
{
m_action = new QAction(this);
m_action->setSeparator (true);
m_action->setSeparator(true);
}
//! Destroy the separator

70
framework/actions/actionmanager.cpp

@ -68,18 +68,18 @@ void PrivateActionManager::updateSeparatorState(const QList<MenuItem*> & items)
if (separator && isPreviousSeparator)
{
separator->setVisible(false);
separator->updateActionState ();
separator->updateActionState();
}
else if (separator)
{
separator->setVisible (true);
separator->updateActionState ();
separator->setVisible(true);
separator->updateActionState();
isPreviousSeparator = true;
}
else
{
Action * action = dynamic_cast<Action*>(item);
if (action->action ()->isVisible ()) // The result is previously stored
if (action->action()->isVisible()) // The result is previously stored
{
isPreviousSeparator = false;
}
@ -92,7 +92,7 @@ void PrivateActionManager::updateSeparatorState(const QList<MenuItem*> & items)
ActionManager::ActionManager()
{
d = new PrivateActionManager;
connect(EditorManager::self (), SIGNAL(currentChanged(int)), this, SLOT(currentEditorChanged(int)));
connect(EditorManager::self(), SIGNAL(currentChanged(int)), this, SLOT(currentEditorChanged(int)));
}
ActionManager::~ActionManager()
@ -102,56 +102,56 @@ ActionManager::~ActionManager()
const QString ActionManager::nameOfMenu(const QString & menu) const
{
return d->_libelles.value (menu);
return d->_libelles.value(menu);
}
void ActionManager::insertNameOfMenu(const QString & menu, const QString & name)
{
d->_libelles.insert (menu, name);
d->_libelles.insert(menu, name);
}
QStringList ActionManager::menus() const
{
return d->_menus.uniqueKeys ();
return d->_menus.uniqueKeys();
}
void ActionManager::addMenuItem(const QString& menu, MenuItem* item)
{
d->_menus.insert (menu, item);
d->_items.insert (item);
d->_menus.insert(menu, item);
d->_items.insert(item);
}
void ActionManager::addMenuSeparator(const QString& menu)
{
Separator * separator = new Separator;
addMenuItem (menu, separator);
addMenuItem(menu, separator);
}
QList< MenuItem* > ActionManager::menu(const QString& menu) const
{
return d->_menus.values (menu);
return d->_menus.values(menu);
}
QStringList ActionManager::toolBars() const
{
return d->_toolBars.uniqueKeys ();
return d->_toolBars.uniqueKeys();
}
void ActionManager::addToolBarItem(const QString& toolbar, MenuItem* item)
{
d->_toolBars.insert (toolbar, item);
d->_items.insert (item);
d->_toolBars.insert(toolbar, item);
d->_items.insert(item);
}
void ActionManager::addToolBarSeparator(const QString& toolbar)
{
Separator * separator = new Separator;
addToolBarItem (toolbar, separator);
addToolBarItem(toolbar, separator);
}
QList< MenuItem* > ActionManager::toolBar(const QString& toolbar) const
{
return d->_toolBars.values (toolbar);
return d->_toolBars.values(toolbar);
}
const QList< MenuItem* >& ActionManager::popup() const
@ -161,14 +161,14 @@ const QList< MenuItem* >& ActionManager::popup() const
void ActionManager::addPopupItem(MenuItem* item)
{
d->_popups.append (item);
d->_items.insert (item);
d->_popups.append(item);
d->_items.insert(item);
}
void ActionManager::addPopupSeparator()
{
Separator * separator = new Separator;
addPopupItem (separator);
addPopupItem(separator);
}
void ActionManager::currentEditorChanged(int index)
@ -176,28 +176,28 @@ void ActionManager::currentEditorChanged(int index)
AbstractEditor * editor = index >= 0 ? EditorManager::self()->editor(index) : NULL;
foreach(MenuItem * item, d->_items)
{
Action * action = dynamic_cast<Action*> (item);
Action * action = dynamic_cast<Action*>(item);
if (action)
{
action->setCurrentEditor(editor);
}
}
updateMenuItemState ();
updateMenuItemState();
}
void ActionManager::generateMenu()
{
QSet<MenuItem*> backupItem = d->_items;
d->_libelles.clear ();
d->_menus.clear ();
d->_popups.clear ();
d->_items.clear ();
d->_libelles.clear();
d->_menus.clear();
d->_popups.clear();
d->_items.clear();
foreach(XinxPluginElement * element, XinxPluginsLoader::self ()->plugins ())
foreach(XinxPluginElement * element, XinxPluginsLoader::self()->plugins())
{
IXinxPlugin * pluginAction = qobject_cast<IXinxPlugin*> (element->plugin ());
if (element->isActivated () && pluginAction)
IXinxPlugin * pluginAction = qobject_cast<IXinxPlugin*> (element->plugin());
if (element->isActivated() && pluginAction)
{
pluginAction->generateActionMenu();
}
@ -207,7 +207,7 @@ void ActionManager::generateMenu()
qDeleteAll(backupItem);
updateMenuItemState ();
updateMenuItemState();
}
void ActionManager::updateMenuItemState()
@ -215,7 +215,7 @@ void ActionManager::updateMenuItemState()
// Mise à jours des statuts des actions
foreach(MenuItem * item, d->_items)
{
Action * action = dynamic_cast<Action*> (item);
Action * action = dynamic_cast<Action*>(item);
if (action)
{
action->updateActionState();
@ -223,14 +223,14 @@ void ActionManager::updateMenuItemState()
}
// Browse menu to update separator state.
foreach (const QString & key, d->_menus.uniqueKeys ())
foreach(const QString & key, d->_menus.uniqueKeys())
{
d->updateSeparatorState(d->_menus.values (key));
d->updateSeparatorState(d->_menus.values(key));
}
// Browse toolbar to update separator state
foreach (const QString & key, d->_toolBars.uniqueKeys ())
foreach(const QString & key, d->_toolBars.uniqueKeys())
{
d->updateSeparatorState(d->_menus.values (key));
d->updateSeparatorState(d->_menus.values(key));
}
// Browse popup menu to update separator state
d->updateSeparatorState(d->_popups);

66
framework/application/aboutdialogimpl.cpp

@ -34,43 +34,43 @@ AboutDialogImpl::AboutDialogImpl(QWidget * parent, Qt::WFlags f)
m_labelVersion->setText(tr("<b>XINX %1 (use Qt %2)</b>").arg(LONG_VERSION_STRING).arg(qVersion()));
m_aboutLabel->setText("<b>XINX</b> Is Not only XML<br/>"
"(c) 2006-2011, Ulrich Van Den Hekke<br/>"
"<a href=\"http://xinx.shadoware.org/\">http://xinx.shadoware.org/</a><br/>"
"<br/>"
"<i>This software is cover by the GPL Public Licence v3. <br/>"
"Please read the software licence before use it. <br/><br/>"
"Icon and Logo are under the GPL Public Licence and comes from <br/>"
"K-Desktop Environment, KDevelop.<br/><br/>"
"<b>XINX</b> use internally a modified version of QCodeEdit written <br/>"
"by fullmetalcoder. This software is cover by the <br/>"
"GPL Public Licence too.</i>"
);
"(c) 2006-2011, Ulrich Van Den Hekke<br/>"
"<a href=\"http://xinx.shadoware.org/\">http://xinx.shadoware.org/</a><br/>"
"<br/>"
"<i>This software is cover by the GPL Public Licence v3. <br/>"
"Please read the software licence before use it. <br/><br/>"
"Icon and Logo are under the GPL Public Licence and comes from <br/>"
"K-Desktop Environment, KDevelop.<br/><br/>"
"<b>XINX</b> use internally a modified version of QCodeEdit written <br/>"
"by fullmetalcoder. This software is cover by the <br/>"
"GPL Public Licence too.</i>"
);
m_authorText->setHtml("Please use <a href=\"http://xinx.shadoware.org/\" target=\"_new\">http://xinx.shadoware.org/</a> to report bug<br/>"
"<br/>"
"<b>Ulrich Van Den Hekke</b><br/>"
"Mail: <a href=\"mailto:ulrich.vdh@free.fr\">ulrich.vdh@free.fr</a><br/>"
"Home page: <a href=\"http://www.shadoware.org/\" target=\"_new\">http://www.shadoware.org/</a><br/>"
"Project leader"
);
"<br/>"
"<b>Ulrich Van Den Hekke</b><br/>"
"Mail: <a href=\"mailto:ulrich.vdh@free.fr\">ulrich.vdh@free.fr</a><br/>"
"Home page: <a href=\"http://www.shadoware.org/\" target=\"_new\">http://www.shadoware.org/</a><br/>"
"Project leader"
);
m_thanksText->setHtml("<b>Mickael BERTELOOT</b><br/>"
"For ideas and bug reports and more<br/>"
"<b>Kamal B. </b><br/>"
"For ideas and bug reports and more<br/>"
"<b>Alexandre ROCHER</b><br/>"
"For ideas and bug reports, some snipets, some scripts and more<br/>"
"<b>Matthieu DUBOUT</b><br/>"
"For ideas, bug reports, some snipets, and more<br/>"
"<b>Cathy VANDENHEKKE</b><br/>"
"For translations<br/>"
"<br/>"
"<b>Luc Briant</b><br/>"
"Home page: <a href=\"http://qcodeedit.edyuk.org/\" target=\"_new\">http://qcodeedit.edyuk.org/</a><br/>"
"Author of the QCodeEdit editor used by <b>XINX</b><br/>"
"<br/>"
"And all people who help me in some ways and i have forgotten to mention"
);
"For ideas and bug reports and more<br/>"
"<b>Kamal B. </b><br/>"
"For ideas and bug reports and more<br/>"
"<b>Alexandre ROCHER</b><br/>"
"For ideas and bug reports, some snipets, some scripts and more<br/>"
"<b>Matthieu DUBOUT</b><br/>"
"For ideas, bug reports, some snipets, and more<br/>"
"<b>Cathy VANDENHEKKE</b><br/>"
"For translations<br/>"
"<br/>"
"<b>Luc Briant</b><br/>"
"Home page: <a href=\"http://qcodeedit.edyuk.org/\" target=\"_new\">http://qcodeedit.edyuk.org/</a><br/>"
"Author of the QCodeEdit editor used by <b>XINX</b><br/>"
"<br/>"
"And all people who help me in some ways and i have forgotten to mention"
);
QFile licenceFile(":/document/licence.html");
if (licenceFile.open(QIODevice::ReadOnly))

2
framework/application/customdialog/customdialogimpl.cpp

@ -99,7 +99,7 @@ void CustomDialogImpl::loadConfig()
void CustomDialogImpl::saveConfig()
{
foreach(IXinxPluginConfigurationPage * page, m_pages)
page->saveSettingsDialog();
page->saveSettingsDialog();
}
void CustomDialogImpl::updateOkButton()

6
framework/application/customdialog/customeditorimpl.cpp

@ -110,15 +110,15 @@ bool CustomEditorImpl::saveSettingsDialog()
XINXConfig::self()->config().editor.popupWhenFileModified = m_popupWhenFileModifiedCheckBox->isChecked();
// Pretty print on saving
if(m_prettyPrintNeverRadioButton->isChecked())
if (m_prettyPrintNeverRadioButton->isChecked())
{
XINXConfig::self()->config().editor.autoindentOnSaving = "false";
}
else if(m_prettyPrintOnSavingRadioButton->isChecked())
else if (m_prettyPrintOnSavingRadioButton->isChecked())
{
XINXConfig::self()->config().editor.autoindentOnSaving = "true";
}
else if(m_prettyPrintOnClosingRadioButton->isChecked())
else if (m_prettyPrintOnClosingRadioButton->isChecked())
{
XINXConfig::self()->config().editor.autoindentOnSaving = "closing";
}

2
framework/application/customdialog/customgeneralimpl.cpp

@ -30,7 +30,7 @@ CustomGeneralImpl::CustomGeneralImpl(QWidget * parent) : QWidget(parent)
{
setupUi(this);
m_traceLogWidget->lineEdit ()->setFileMustExist (false);
m_traceLogWidget->lineEdit()->setFileMustExist(false);
// Style
m_styleComboBox->addItem(QString());

132
framework/application/customdialog/custommodulesimpl.cpp

@ -136,47 +136,47 @@ void CustomModulesImpl::aboutPlugin(PluginElement * plugin)
informations->setWordWrap(true);
informations->setOpenExternalLinks(true);
informations->setText(
tr("<table>"
"<tr>"
"<td colspan=\"3\"><b>%1</b></td>"
"</tr>"
"<tr>"
"<td colspan=\"3\">%2</td>"
"</tr>"
"<tr><td colspan=\"3\"><hr/></td></tr>"
"<tr>"
"<td><b>Author</b></td>"
"<td width=\"0\">:</td>"
"<td>%3</td>"
"</tr>"
"<tr>"
"<td><b>E-Mail</b></td>"
"<td width=\"0\">:</td>"
"<td><a href=\"mailto:%4\">%4</a></td>"
"</tr>"
"<tr>"
"<td><b>Web site</b></td>"
"<td width=\"0\">:</td>"
"<td><a href=\"%5\">%5</a></td>"
"</tr>"
"<tr>"
"<td><b>Version</b></td>"
"<td width=\"0\">:</td>"
"<td>%6</td>"
"</tr>"
"<tr>"
"<td><b>Licence</b></td>"
"<td width=\"0\">:</td>"
"<td>%7</td>"
"</tr>"
"</table>")
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_NAME).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_DESCRIPTION).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_AUTHOR).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_EMAIL).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_WEBSITE).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_VERSION).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_LICENCE).toString())
tr("<table>"
"<tr>"
"<td colspan=\"3\"><b>%1</b></td>"
"</tr>"
"<tr>"
"<td colspan=\"3\">%2</td>"
"</tr>"
"<tr><td colspan=\"3\"><hr/></td></tr>"
"<tr>"
"<td><b>Author</b></td>"
"<td width=\"0\">:</td>"
"<td>%3</td>"
"</tr>"
"<tr>"
"<td><b>E-Mail</b></td>"
"<td width=\"0\">:</td>"
"<td><a href=\"mailto:%4\">%4</a></td>"
"</tr>"
"<tr>"
"<td><b>Web site</b></td>"
"<td width=\"0\">:</td>"
"<td><a href=\"%5\">%5</a></td>"
"</tr>"
"<tr>"
"<td><b>Version</b></td>"
"<td width=\"0\">:</td>"
"<td>%6</td>"
"</tr>"
"<tr>"
"<td><b>Licence</b></td>"
"<td width=\"0\">:</td>"
"<td>%7</td>"
"</tr>"
"</table>")
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_NAME).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_DESCRIPTION).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_AUTHOR).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_EMAIL).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_WEBSITE).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_VERSION).toString())
.arg(qobject_cast<IXinxPlugin*>(xinxPlugin->plugin())->getPluginAttribute(IXinxPlugin::PLG_LICENCE).toString())
);
QVBoxLayout * labelLayout = new QVBoxLayout;
@ -214,31 +214,31 @@ void CustomModulesImpl::aboutScript(PluginElement * plugin)
informations->setWordWrap(true);
informations->setOpenExternalLinks(true);
informations->setText(
tr("<table>"
"<tr>"
"<td colspan=\"3\"><b>%1</b></td>"
"</tr>"
"<tr><td colspan=\"3\"><hr/></td></tr>"
"<tr>"
"<td><b>Author</b></td>"
"<td width=\"0\">:</td>"
"<td>%2</td>"
"</tr>"
"<tr>"
"<td><b>Version</b></td>"
"<td width=\"0\">:</td>"
"<td>%3</td>"
"</tr>"
"<tr>"
"<td><b>Licence</b></td>"
"<td width=\"0\">:</td>"
"<td>%4</td>"
"</tr>"
"</table>")
.arg(script->name())
.arg(script->author())
.arg(script->version())
.arg(script->licence())
tr("<table>"
"<tr>"
"<td colspan=\"3\"><b>%1</b></td>"
"</tr>"
"<tr><td colspan=\"3\"><hr/></td></tr>"
"<tr>"
"<td><b>Author</b></td>"
"<td width=\"0\">:</td>"
"<td>%2</td>"
"</tr>"
"<tr>"
"<td><b>Version</b></td>"
"<td width=\"0\">:</td>"
"<td>%3</td>"
"</tr>"
"<tr>"
"<td><b>Licence</b></td>"
"<td width=\"0\">:</td>"
"<td>%4</td>"
"</tr>"
"</table>")
.arg(script->name())
.arg(script->author())
.arg(script->version())
.arg(script->licence())
);
QVBoxLayout * labelLayout = new QVBoxLayout;

120
framework/application/mainformimpl.cpp

@ -154,48 +154,48 @@ void MainformImpl::createMenus()
m_menuBar->addAction(sessionMenu->menuAction());
m_menuBar->addAction(projectMenu->menuAction());
m_menuBar->addSeparator ();
m_menuBar->addSeparator();
m_menuBar->addAction(fileMenu->menuAction());
m_menuBar->addAction(editMenu->menuAction());
m_menuBar->addAction(searchMenu->menuAction());
m_menuBar->addAction(bookmarkMenu->menuAction());
m_menuBar->addSeparator ();
m_menuBar->addSeparator();
m_menuBar->addAction(toolsMenu->menuAction());
m_menuBar->addAction(windowsMenu->menuAction());
m_menuBar->addAction(helpMenu->menuAction());
sessionMenu->addAction (XinxSession::SessionManager::self ()->newSessionAction());
sessionMenu->addAction(XinxSession::SessionManager::self()->newSessionAction());
sessionMenu->addSeparator();
XinxSession::SessionManager::self ()->sessionActions()->setMenu(sessionMenu);
XinxSession::SessionManager::self ()->sessionActions()->setMenuSeparator(sessionMenu->addSeparator());
sessionMenu->addAction (XinxSession::SessionManager::self ()->removeSessionAction());
sessionMenu->addAction (XinxSession::SessionManager::self ()->renameSessionAction());
XinxSession::SessionManager::self()->sessionActions()->setMenu(sessionMenu);
XinxSession::SessionManager::self()->sessionActions()->setMenuSeparator(sessionMenu->addSeparator());
sessionMenu->addAction(XinxSession::SessionManager::self()->removeSessionAction());
sessionMenu->addAction(XinxSession::SessionManager::self()->renameSessionAction());
sessionMenu->addSeparator();
sessionMenu->addAction(m_exitAct);
fileMenu->addAction(EditorManager::self ()->newAction());
fileMenu->addAction(EditorManager::self ()->openAction());
fileMenu->addAction(EditorManager::self ()->saveAction());
fileMenu->addAction(EditorManager::self ()->saveAsAction());
fileMenu->addAction(EditorManager::self ()->saveAllAction());
fileMenu->addAction(EditorManager::self()->newAction());
fileMenu->addAction(EditorManager::self()->openAction());
fileMenu->addAction(EditorManager::self()->saveAction());
fileMenu->addAction(EditorManager::self()->saveAsAction());
fileMenu->addAction(EditorManager::self()->saveAllAction());
fileMenu->addSeparator();
fileMenu->addAction(EditorManager::self ()->closeAction());
fileMenu->addAction(EditorManager::self ()->closeAllAction());
fileMenu->addAction(EditorManager::self()->closeAction());
fileMenu->addAction(EditorManager::self()->closeAllAction());
fileMenu->addSeparator();
fileMenu->addAction(EditorManager::self ()->printAction());
fileMenu->addAction(EditorManager::self()->printAction());
projectMenu->addAction(XinxProject::Manager::self ()->newProjectAction());
projectMenu->addAction(XinxProject::Manager::self ()->openProjectAction());
projectMenu->addAction(XinxProject::Manager::self ()->closeProjectAction());
projectMenu->addAction(XinxProject::Manager::self ()->customizeProjectAction());
projectMenu->addAction(XinxProject::Manager::self()->newProjectAction());
projectMenu->addAction(XinxProject::Manager::self()->openProjectAction());
projectMenu->addAction(XinxProject::Manager::self()->closeProjectAction());
projectMenu->addAction(XinxProject::Manager::self()->customizeProjectAction());
projectMenu->addSeparator();
projectMenu->addAction(VersionControl::Manager::self()->updateAllAction());
projectMenu->addAction(VersionControl::Manager::self()->commitAllAction());
projectMenu->addAction(VersionControl::Manager::self()->abortAction());
windowsMenu->addAction(EditorManager::self ()->nextEditorAction());
windowsMenu->addAction(EditorManager::self ()->previousEditorAction());
windowsMenu->addAction(EditorManager::self()->nextEditorAction());
windowsMenu->addAction(EditorManager::self()->previousEditorAction());
windowsMenu->addSeparator();
windowsMenu->addAction(m_alwaysShowRunDialog);
windowsMenu->addSeparator();
@ -218,8 +218,8 @@ void MainformImpl::createMenus()
searchMenu->addSeparator();
searchMenu->addAction(m_replaceAct);
fileToolBar->addAction(EditorManager::self ()->newAction());
fileToolBar->addAction(EditorManager::self ()->openAction());
fileToolBar->addAction(EditorManager::self()->newAction());
fileToolBar->addAction(EditorManager::self()->openAction());
fileToolBar->addAction(EditorManager::self()->saveAction());
fileToolBar->addAction(EditorManager::self()->saveAllAction());
fileToolBar->addSeparator();
@ -231,7 +231,7 @@ void MainformImpl::createMenus()
editToolBar->setObjectName("editToolBar");
addToolBar(Qt::TopToolBarArea, editToolBar);
QToolButton * btn = qobject_cast<QToolButton*>(fileToolBar->widgetForAction(EditorManager::self ()->openAction()));
QToolButton * btn = qobject_cast<QToolButton*>(fileToolBar->widgetForAction(EditorManager::self()->openAction()));
if (btn) btn->setPopupMode(QToolButton::MenuButtonPopup);
searchToolBar->addAction(m_searchAct);
@ -240,8 +240,8 @@ void MainformImpl::createMenus()
addToolBar(Qt::TopToolBarArea, searchToolBar);
connect(XinxAction::ActionManager::self (), SIGNAL(changed()), this, SLOT(createPluginsActions()));
XinxAction::ActionManager::self ()->generateMenu();
connect(XinxAction::ActionManager::self(), SIGNAL(changed()), this, SLOT(createPluginsActions()));
XinxAction::ActionManager::self()->generateMenu();
}
void MainformImpl::createActions()
@ -325,45 +325,45 @@ void MainformImpl::createActions()
void MainformImpl::connectSignals()
{
connect(EditorManager::self (), SIGNAL(fileOpened(QString)), this, SLOT(sOpenedFile(QString)));
connect(EditorManager::self (), SIGNAL(filePrinted(QString)), this, SLOT(sPrintedFile(QString)));
connect(EditorManager::self (), SIGNAL(fileSaved(QString)), this, SLOT(sSavedFile(QString)));
connect(EditorManager::self (), SIGNAL(fileClosed(QString)), this, SLOT(sClosedFile(QString)));
connect(EditorManager::self (), SIGNAL(positionChanged(QString)), this, SLOT(setEditorPosition(QString)));
connect(EditorManager::self(), SIGNAL(fileOpened(QString)), this, SLOT(sOpenedFile(QString)));
connect(EditorManager::self(), SIGNAL(filePrinted(QString)), this, SLOT(sPrintedFile(QString)));
connect(EditorManager::self(), SIGNAL(fileSaved(QString)), this, SLOT(sSavedFile(QString)));
connect(EditorManager::self(), SIGNAL(fileClosed(QString)), this, SLOT(sClosedFile(QString)));
connect(EditorManager::self(), SIGNAL(positionChanged(QString)), this, SLOT(setEditorPosition(QString)));
connect(XinxJobManager::self (), SIGNAL(allJobEnded()), m_indexingBar, SLOT(hide()));
connect(XinxJobManager::self (), SIGNAL(progressRangeChanged(int,int)), m_indexingBar, SLOT(setRange(int,int)));
connect(XinxJobManager::self (), SIGNAL(progressValueChanged(int)), m_indexingBar, SLOT(setValue(int)));
connect(XinxJobManager::self (), SIGNAL(progressValueChanged(int)), m_indexingBar, SLOT(show()));
connect(XinxJobManager::self(), SIGNAL(allJobEnded()), m_indexingBar, SLOT(hide()));
connect(XinxJobManager::self(), SIGNAL(progressRangeChanged(int,int)), m_indexingBar, SLOT(setRange(int,int)));
connect(XinxJobManager::self(), SIGNAL(progressValueChanged(int)), m_indexingBar, SLOT(setValue(int)));
connect(XinxJobManager::self(), SIGNAL(progressValueChanged(int)), m_indexingBar, SLOT(show()));
connect(XinxJobManager::self (), SIGNAL(progressRangeChanged(int,int)), this, SLOT(updateProgressBar()));
connect(XinxJobManager::self (), SIGNAL(progressValueChanged(int)), this, SLOT(updateProgressBar()));
connect(XinxJobManager::self (), SIGNAL(progressValueChanged(int)), this, SLOT(updateProgressBar()));
connect(XinxJobManager::self(), SIGNAL(progressRangeChanged(int,int)), this, SLOT(updateProgressBar()));
connect(XinxJobManager::self(), SIGNAL(progressValueChanged(int)), this, SLOT(updateProgressBar()));
connect(XinxJobManager::self(), SIGNAL(progressValueChanged(int)), this, SLOT(updateProgressBar()));
}
void MainformImpl::createPluginsActions()
{
foreach(const QString & menuId, XinxAction::ActionManager::self ()->menus())
foreach(const QString & menuId, XinxAction::ActionManager::self()->menus())
{
if (! m_menus.value(menuId))
{
QMenu * newMenu = new QMenu(XinxAction::ActionManager::self ()->nameOfMenu(menuId), m_menuBar);
QMenu * newMenu = new QMenu(XinxAction::ActionManager::self()->nameOfMenu(menuId), m_menuBar);
m_menuBar->insertMenu(m_menus[ "tools" ]->menuAction(), newMenu);
m_menus[ menuId ] = newMenu;
}
foreach(XinxAction::MenuItem * item, XinxAction::ActionManager::self()->menu(menuId))
{
m_menus[ menuId ]->addAction(item->action ());
m_menus[ menuId ]->addAction(item->action());
}
}
foreach(const QString & menuId, XinxAction::ActionManager::self ()->toolBars())
foreach(const QString & menuId, XinxAction::ActionManager::self()->toolBars())
{
if (! m_toolBars.value(menuId))
{
QToolBar * newToolBar = new QToolBar(this);
newToolBar->setWindowTitle(XinxAction::ActionManager::self ()->nameOfMenu(menuId));
newToolBar->setWindowTitle(XinxAction::ActionManager::self()->nameOfMenu(menuId));
newToolBar->setObjectName(menuId);
addToolBar(Qt::TopToolBarArea, newToolBar);
m_toolBars[ menuId ] = newToolBar;
@ -371,7 +371,7 @@ void MainformImpl::createPluginsActions()
foreach(XinxAction::MenuItem * item, XinxAction::ActionManager::self()->toolBar(menuId))
{
m_toolBars[ menuId ]->addAction(item->action ());
m_toolBars[ menuId ]->addAction(item->action());
}
}
}
@ -387,7 +387,7 @@ void MainformImpl::createDockWidget()
QAction * action = view->toggleViewAction();
action->setShortcut(QKeySequence("Alt+1"));
m_menus["windows"]->addAction(action);
connect(m_projectDock, SIGNAL(open(QString,IFileTypePlugin*,XinxProject::ProjectPtr)), EditorManager::self (), SLOT(openFile(QString,IFileTypePlugin*,XinxProject::ProjectPtr)));
connect(m_projectDock, SIGNAL(open(QString,IFileTypePlugin*,XinxProject::ProjectPtr)), EditorManager::self(), SLOT(openFile(QString,IFileTypePlugin*,XinxProject::ProjectPtr)));
/* Content */
m_contentDock = new ContentView3::DockWidget(this);
@ -396,7 +396,7 @@ void MainformImpl::createDockWidget()
action = view->toggleViewAction();
action->setShortcut(QKeySequence("Alt+2"));
m_menus["windows"]->addAction(action);
connect(m_contentDock, SIGNAL(open(QString,int,IFileTypePlugin*,XinxProject::ProjectPtr)), EditorManager::self (), SLOT(openFile(QString,int,IFileTypePlugin*,XinxProject::ProjectPtr)));
connect(m_contentDock, SIGNAL(open(QString,int,IFileTypePlugin*,XinxProject::ProjectPtr)), EditorManager::self(), SLOT(openFile(QString,int,IFileTypePlugin*,XinxProject::ProjectPtr)));
/* Snipets */
m_snipetsDock = new SnipetDockWidget(this);
@ -460,7 +460,7 @@ void MainformImpl::createStatusBar()
m_indexingBar = new QProgressBar(this);
m_indexingBar->setMaximumWidth(150);
m_indexingBar->hide ();
m_indexingBar->hide();
m_codecLabel = new QLabel(tr("Unknown"));
m_lineFeedLabel = new QLabel(tr("Unknown"));
@ -565,7 +565,7 @@ void MainformImpl::updateEditorInformations()
void MainformImpl::updateProgressBar()
{
m_indexingBar->setToolTip (XinxJobManager::self ()->descriptions().join("\n"));
m_indexingBar->setToolTip(XinxJobManager::self()->descriptions().join("\n"));
}
void MainformImpl::about()
@ -750,16 +750,16 @@ void MainformImpl::findNext()
if (m_yesToAllReplace && ! m_replaceExpression.isNull())
{
QMessageBox::information(this,
tr("Search/Replace"),
tr("%1 occurences of '%2' replaced.").arg(m_nbFindedText).arg(m_findExpression),
QMessageBox::Ok);
tr("Search/Replace"),
tr("%1 occurences of '%2' replaced.").arg(m_nbFindedText).arg(m_findExpression),
QMessageBox::Ok);
}
else
{
QMessageBox::StandardButton ret = QMessageBox::warning(this,
tr("Search/Replace"),
tr("%1 occurences of '%2' %3. Return to the beginning of the document ?").arg(m_nbFindedText).arg(m_findExpression).arg(! m_replaceExpression.isNull() ? tr("replaced") : tr("finded")),
QMessageBox::Yes | QMessageBox::No);
tr("Search/Replace"),
tr("%1 occurences of '%2' %3. Return to the beginning of the document ?").arg(m_nbFindedText).arg(m_findExpression).arg(! m_replaceExpression.isNull() ? tr("replaced") : tr("finded")),
QMessageBox::Yes | QMessageBox::No);
if (ret == QMessageBox::Yes)
{
@ -816,10 +816,10 @@ void MainformImpl::replace()
void MainformImpl::updateActions()
{
m_searchAct->setEnabled(EditorManager::self ()->editorsCount());
m_searchNextAct->setEnabled(EditorManager::self ()->editorsCount());
m_replaceAct->setEnabled(EditorManager::self ()->editorsCount());
m_searchPreviousAct->setEnabled(EditorManager::self ()->editorsCount());
m_searchAct->setEnabled(EditorManager::self()->editorsCount());
m_searchNextAct->setEnabled(EditorManager::self()->editorsCount());
m_replaceAct->setEnabled(EditorManager::self()->editorsCount());
m_searchPreviousAct->setEnabled(EditorManager::self()->editorsCount());
}
void MainformImpl::updateTitle()
@ -851,8 +851,8 @@ void MainformImpl::closeEvent(QCloseEvent *event)
emit aboutToClose();
storeWindowSettings(); // Store before the project is closed
XinxSession::SessionManager::self ()->currentSession()->saveSession();
XinxSession::SessionManager::self ()->setApplicationStopping(true);
XinxSession::SessionManager::self()->currentSession()->saveSession();
XinxSession::SessionManager::self()->setApplicationStopping(true);
if (! EditorManager::self()->closeAllFile())
{

2
framework/application/mainformimpl.h

@ -41,7 +41,7 @@
namespace ContentView3
{
class DockWidget;
class DockWidget;
};
class ProjectDirectoryWidgetImpl;

6
framework/application/newversionwizardimpl.cpp

@ -212,18 +212,18 @@ void NewVersionWizardImpl::on_m_listSlider_valueChanged(int value)
}
}
void NewVersionWizardImpl::slotCurrentIdChanged ( int id )
void NewVersionWizardImpl::slotCurrentIdChanged(int id)
{
if (page(id) == d->_ui->licencePage)
{
d->_ui->_refuseRadioButton->setChecked(true);
button (QWizard::NextButton)->setEnabled (false);
button(QWizard::NextButton)->setEnabled(false);
}
}
void NewVersionWizardImpl::on__acceptRadioButton_toggled(bool value)
{
button (QWizard::NextButton)->setEnabled (value);
button(QWizard::NextButton)->setEnabled(value);
}
void NewVersionWizardImpl::accept()

2
framework/application/newversionwizardimpl.h

@ -43,7 +43,7 @@ public slots:
private slots:
void on_m_listSlider_valueChanged(int value);
void on__acceptRadioButton_toggled(bool value);
void slotCurrentIdChanged ( int id );
void slotCurrentIdChanged(int id);
private:
PrivateNewVersionWizardImpl * d;
friend class PrivateNewVersionWizardImpl;

10
framework/application/xinxprojectwizard/projectwizard.cpp

@ -76,7 +76,7 @@ FileWizardPage::FileWizardPage(QString filename, QWidget * parent) : QWizardPage
{
setTitle(tr("Project file selection"));
setSubTitle(tr("This wizard will help you to migrate your project file to "
"the current version of XINX. Please fill all fields."));
"the current version of XINX. Please fill all fields."));
QLabel * directoryLabel;
QVBoxLayout * layout = new QVBoxLayout(this);
@ -129,10 +129,10 @@ void VersionWizardPage::initializePage()
if (dynamic_cast<ProjectWizard*>(wizard())->converter())
{
m_resume->setText(
tr("You want convert a %1 (version %2).\nThis wizard will convert the project to the last version of XINX. Wizard must convert %3 opened file.")
.arg(dynamic_cast<ProjectWizard*>(wizard())->converter()->type())
.arg(dynamic_cast<ProjectWizard*>(wizard())->converter()->version())
.arg(dynamic_cast<ProjectWizard*>(wizard())->converter()->nbSession())
tr("You want convert a %1 (version %2).\nThis wizard will convert the project to the last version of XINX. Wizard must convert %3 opened file.")
.arg(dynamic_cast<ProjectWizard*>(wizard())->converter()->type())
.arg(dynamic_cast<ProjectWizard*>(wizard())->converter()->version())
.arg(dynamic_cast<ProjectWizard*>(wizard())->converter()->nbSession())
);
}

66
framework/codecompletion/completer.cpp

@ -45,7 +45,7 @@ public:
TextFileEditor * _editor;
Model* _model;
Context _context;
QTreeView* _treeView;
QTreeView* _treeView;
};
PrivateCompleter::PrivateCompleter() : _editor(0), _model(0), _treeView(0)
@ -86,7 +86,8 @@ QModelIndex PrivateCompleter::findNextSelectableIndex(QModelIndex index, bool up
{
break;
}
} while (! curIndex.flags().testFlag(Qt::ItemIsSelectable));
}
while (! curIndex.flags().testFlag(Qt::ItemIsSelectable));
return curIndex;
}
@ -102,19 +103,19 @@ Completer::Completer(TextFileEditor* parent): QCompleter(parent), d(new PrivateC
d->_treeView->setHeaderHidden(true);
d->_treeView->setAllColumnsShowFocus (true);
d->_treeView->setAllColumnsShowFocus(true);
d->_treeView->setRootIsDecorated(false);
d->_treeView->setSelectionMode (QAbstractItemView::SingleSelection);
d->_treeView->setSelectionBehavior (QAbstractItemView::SelectRows);
d->_treeView->setSelectionMode(QAbstractItemView::SingleSelection);
d->_treeView->setSelectionBehavior(QAbstractItemView::SelectRows);
d->_treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
d->_treeView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
connect(d->_treeView->header (), SIGNAL(sectionCountChanged(int,int)), this, SLOT(resizeColumns(int,int)));
connect(d->_treeView->header(), SIGNAL(sectionCountChanged(int,int)), this, SLOT(resizeColumns(int,int)));
setEditor(parent);
setCompletionMode(QCompleter::UnfilteredPopupCompletion);
setCaseSensitivity(Qt::CaseInsensitive);
setCompletionRole (Qt::UserRole + 1);
setCompletionColumn (1);
setCompletionRole(Qt::UserRole + 1);
setCompletionColumn(1);
}
Completer::~Completer()
@ -139,9 +140,9 @@ void Completer::complete(bool automaticCall, const QString & prefix)
if (d->_model)
{
if (! prefix.isEmpty ())
if (! prefix.isEmpty())
{
d->_context.setPrefix (prefix);
d->_context.setPrefix(prefix);
setCompletionPrefix(prefix);
}
else
@ -149,7 +150,7 @@ void Completer::complete(bool automaticCall, const QString & prefix)
setCompletionPrefix(d->_context.prefix());
}
d->_model->updateModel ();
d->_model->updateModel();
// Call made by the user (using shortcut or not)
if ((!automaticCall) && (completionModel()->rowCount() == 1))
@ -168,9 +169,9 @@ void Completer::complete(bool automaticCall, const QString & prefix)
QCompleter::complete(cr);
QModelIndex index = d->findNextSelectableIndex(d->_model->index(0, completionColumn ()), false);
setCurrentRow (index.row ());
popup()->setCurrentIndex (index);
QModelIndex index = d->findNextSelectableIndex(d->_model->index(0, completionColumn()), false);
setCurrentRow(index.row());
popup()->setCurrentIndex(index);
}
qDebug() << "Complete in " << _complete_timer.elapsed() << " ms";
@ -215,14 +216,14 @@ void Completer::complete(Item* item)
d->_editor->textEdit()->textUnderCursor(tc, true);
item->execute (d->_context, editor());
item->execute(d->_context, editor());
}
}
void Completer::setContext(Context context)
{
d->_context = context;
d->_model->setContext (context);
d->_model->setContext(context);
}
Context Completer::context() const
@ -251,7 +252,7 @@ TextFileEditor* Completer::editor() const
void Completer::setModel(Model* model)
{
d->_model = model;
QCompleter::setModel (model);
QCompleter