Move wx<->Qt alignment conversion functions to the top
No real changes, this is just a refactoring in preparation for the future changes (use "git show --color-moved" to view the diff).
This commit is contained in:
@@ -26,6 +26,39 @@
|
||||
#include "wx/qt/private/winevent.h"
|
||||
#include "wx/qt/private/treeitemfactory.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
Qt::AlignmentFlag wxQtConvertTextAlign(wxListColumnFormat align)
|
||||
{
|
||||
switch (align)
|
||||
{
|
||||
case wxLIST_FORMAT_LEFT:
|
||||
return Qt::AlignLeft;
|
||||
case wxLIST_FORMAT_RIGHT:
|
||||
return Qt::AlignRight;
|
||||
case wxLIST_FORMAT_CENTRE:
|
||||
return Qt::AlignCenter;
|
||||
}
|
||||
return Qt::AlignLeft;
|
||||
}
|
||||
|
||||
wxListColumnFormat wxQtConvertAlignFlag(int align)
|
||||
{
|
||||
switch (align)
|
||||
{
|
||||
case Qt::AlignLeft:
|
||||
return wxLIST_FORMAT_LEFT;
|
||||
case Qt::AlignRight:
|
||||
return wxLIST_FORMAT_RIGHT;
|
||||
case Qt::AlignCenter:
|
||||
return wxLIST_FORMAT_CENTRE;
|
||||
}
|
||||
return wxLIST_FORMAT_LEFT;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
class wxQtListTreeWidget : public wxQtEventSignalHandler< QTreeWidget, wxListCtrl >
|
||||
{
|
||||
public:
|
||||
@@ -106,35 +139,6 @@ void wxQtListTreeWidget::itemActivated(QTreeWidgetItem *qitem, int column)
|
||||
}
|
||||
|
||||
|
||||
Qt::AlignmentFlag wxQtConvertTextAlign(wxListColumnFormat align)
|
||||
{
|
||||
switch (align)
|
||||
{
|
||||
case wxLIST_FORMAT_LEFT:
|
||||
return Qt::AlignLeft;
|
||||
case wxLIST_FORMAT_RIGHT:
|
||||
return Qt::AlignRight;
|
||||
case wxLIST_FORMAT_CENTRE:
|
||||
return Qt::AlignCenter;
|
||||
}
|
||||
return Qt::AlignLeft;
|
||||
}
|
||||
|
||||
wxListColumnFormat wxQtConvertAlignFlag(int align)
|
||||
{
|
||||
switch (align)
|
||||
{
|
||||
case Qt::AlignLeft:
|
||||
return wxLIST_FORMAT_LEFT;
|
||||
case Qt::AlignRight:
|
||||
return wxLIST_FORMAT_RIGHT;
|
||||
case Qt::AlignCenter:
|
||||
return wxLIST_FORMAT_CENTRE;
|
||||
}
|
||||
return wxLIST_FORMAT_LEFT;
|
||||
}
|
||||
|
||||
|
||||
wxListCtrl::wxListCtrl()
|
||||
{
|
||||
Init();
|
||||
|
Reference in New Issue
Block a user