"Each line of text in your code should be at most 120 characters long. "
-----------------------
For test targets, the convention we use is "testFoo", not "testfoo".
Therefore I think the test should be called "testVerticalJournal", not "testverticaljournal".
-----------------------
I see that the vertical journal is not used anywhere yet. So there's no place to play with it. Would it be too much to ask for a "make tryVerticalJournal" target that brings up an interactive manual test so one could play with the VerticalJournal? I envision a window with a vertical journal on its left side and some controls on its right side. One could use those controls to manually add an item with a given size and see how the vertical journal places it. And click on a placed item to remove it and see now the vertical journal reorganizes itself. Similar to what we have with "make tryResponsiveGridView" and "make tryStage".
What do you think?
----------------------
In VerticalJournal::setModel(QAbstractItemModel *model):
Could we use the QObject::connect version that checks signal-slot compatibility at compile time (as opposed to runtime)? Since we're not checking the connect() results here, which can fail with this runtime-check version, we are making room for sneaky bugs to slip through.
How have you come to this formula? My question also comes from the fact that I don't know what's your definition of horizontalSpacing, which should probably documented.
For instance, I don't know is there's horizontalSpacing to the left of the left-most column and to the right of the right-most column.
Or if the spacing applies exclusively *between* two columns.
I would help if you used the same nomenclature as the existing Grid component. i.e., s/horizontalSpacing/columnSpacing and s/verticalSpacing/rowSpacing.
So, considering horizontalSpacing has the same meaning as Grid's columnSpacing, I would expect this expression to be:
> Q_PROPERTY(qreal horizontalSpacing READ horizontalSpacing WRITE setHorizontalSp acing NOTIFY horizontalSpaci ngChanged) nBegin READ delegateCreatio nBegin WRITE setDelegateCrea tionBegin NOTIFY delegateCreatio nBeginChanged RESET resetDelegateCr eationBegin) tionEnd NOTIFY delegateCreatio nEndChanged RESET resetDelegateCr eationEnd)
> [...]
> Q_PROPERTY(qreal delegateCreatio
> Q_PROPERTY(qreal delegateCreationEnd READ delegateCreationEnd WRITE setDelegateCrea
"Each line of text in your code should be at most 120 characters long. "
------- ------- ------- --
For test targets, the convention we use is "testFoo", not "testfoo".
Therefore I think the test should be called "testVerticalJo urnal", not "testverticaljo urnal".
------- ------- ------- --
I see that the vertical journal is not used anywhere yet. So there's no place to play with it. Would it be too much to ask for a "make tryVerticalJournal" target that brings up an interactive manual test so one could play with the VerticalJournal? I envision a window with a vertical journal on its left side and some controls on its right side. One could use those controls to manually add an item with a given size and see how the vertical journal places it. And click on a placed item to remove it and see now the vertical journal reorganizes itself. Similar to what we have with "make tryResponsiveGr idView" and "make tryStage".
What do you think?
------- ------- ------- -
In VerticalJournal ::setModel( QAbstractItemMo del *model):
"""
m_delegateMode l->setModel( QVariant: :fromValue< QAbstractItemMo del *>(model));
m_delegateMode l->setModel( QVariant: :fromValue< QAbstractItemMo del *>(model));
#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
#else
#endif
"""
Played "spot the difference" here and lost.
------- ------- ------- ------
void VerticalJournal ::createDelegat eModel( ) aModel( qmlContext( this), this); m_delegateModel , SIGNAL( createdItem( int,QQuickItem* )), this, SLOT(itemCreate d(int,QQuickIte m*))); el(qmlContext( this), this); m_delegateModel , SIGNAL( createdItem( int,QObject* )), this, SLOT(itemCreate d(int,QObject* )));
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
m_delegateModel = new QQuickVisualDat
connect(
#else
m_delegateModel = new QQmlDelegateMod
connect(
#endif
Could we use the QObject::connect version that checks signal-slot compatibility at compile time (as opposed to runtime)? Since we're not checking the connect() results here, which can fail with this runtime-check version, we are making room for sneaky bugs to slip through.
------- ------- ------- ------- ---
const int nColumns = ceil((double) (width( ) - m_horizontalSpa cing) / (m_columnWidth + m_horizontalSpa cing));
How have you come to this formula? My question also comes from the fact that I don't know what's your definition of horizontalSpacing, which should probably documented.
For instance, I don't know is there's horizontalSpacing to the left of the left-most column and to the right of the right-most column.
Or if the spacing applies exclusively *between* two columns.
I would help if you used the same nomenclature as the existing Grid component. i.e., s/horizontalSpa cing/columnSpac ing and s/verticalSpaci ng/rowSpacing.
So, considering horizontalSpacing has the same meaning as Grid's columnSpacing, I would expect this expression to be:
nColumns = floor(( width+columnSpa cing) / (columnWidth+ columnSpacing) )
------- ------- ------- -------
PS: Still going through the code