"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/DoubleList.cpp" between
MP3Diags-unstable-1.3.04.tar.gz and MP3Diags-unstable-1.5.01.tar.gz

About: MP3 Diags finds problems in MP3 files and helps the user to fix many of them (with a GUI). Also includes a tag editor and a file renamer.

DoubleList.cpp  (MP3Diags-unstable-1.3.04):DoubleList.cpp  (MP3Diags-unstable-1.5.01)
skipping to change at line 277 skipping to change at line 277
//#include <iostream> //#include <iostream>
DoubleList::DoubleList( DoubleList::DoubleList(
ListPainter& listPainter, ListPainter& listPainter,
int nButtons, int nButtons,
//bool bAllowMultipleSel, //bool bAllowMultipleSel,
//bool bUserSortSel, //bool bUserSortSel,
SelectionMode eSelectionMode, SelectionMode eSelectionMode,
const std::string& strAvailableLabel, const std::string& strAvailableLabel,
const std::string& strSelLabel, const std::string& strSelLabel,
QWidget* pParent, Qt::WFlags fl /* =0*/) : QWidget* pParent, Qt::WindowFlags fl /* =0*/) :
QWidget(pParent, fl), Ui::DoubleListWdg(), QWidget(pParent, fl), Ui::DoubleListWdg(),
m_listPainter(listPainter), m_listPainter(listPainter),
//m_bAllowMultipleSel(bAllowMultipleSel), //m_bAllowMultipleSel(bAllowMultipleSel),
//m_bUserSortSel(bUserSortSel), //m_bUserSortSel(bUserSortSel),
m_eSelectionMode(eSelectionMode), m_eSelectionMode(eSelectionMode),
m_availableModel(listPainter), m_availableModel(listPainter),
m_selectedModel(listPainter), m_selectedModel(listPainter),
m_bSectionMovedLock(false) m_bSectionMovedLock(false)
skipping to change at line 337 skipping to change at line 337
s = m_listPainter.getTooltip(ListPainter::ADD_B); if (!s.empty()) { m_pA ddB->setToolTip(convStr(s)); } s = m_listPainter.getTooltip(ListPainter::ADD_B); if (!s.empty()) { m_pA ddB->setToolTip(convStr(s)); }
s = m_listPainter.getTooltip(ListPainter::DELETE_B); if (!s.empty()) { m _pDeleteB->setToolTip(convStr(s)); } s = m_listPainter.getTooltip(ListPainter::DELETE_B); if (!s.empty()) { m _pDeleteB->setToolTip(convStr(s)); }
s = m_listPainter.getTooltip(ListPainter::ADD_ALL_B); if (!s.empty()) { m_pAddAllB->setToolTip(convStr(s)); } s = m_listPainter.getTooltip(ListPainter::ADD_ALL_B); if (!s.empty()) { m_pAddAllB->setToolTip(convStr(s)); }
s = m_listPainter.getTooltip(ListPainter::DELETE_ALL_B); if (!s.empty()) { m_pDeleteAllB->setToolTip(convStr(s)); } s = m_listPainter.getTooltip(ListPainter::DELETE_ALL_B); if (!s.empty()) { m_pDeleteAllB->setToolTip(convStr(s)); }
s = m_listPainter.getTooltip(ListPainter::RESTORE_DEFAULT_B); if (!s.emp ty()) { m_pRestoreDefaultB->setToolTip(convStr(s)); } s = m_listPainter.getTooltip(ListPainter::RESTORE_DEFAULT_B); if (!s.emp ty()) { m_pRestoreDefaultB->setToolTip(convStr(s)); }
s = m_listPainter.getTooltip(ListPainter::RESTORE_OPEN_B); if (!s.empty( )) { m_pRestoreOpenB->setToolTip(convStr(s)); } s = m_listPainter.getTooltip(ListPainter::RESTORE_OPEN_B); if (!s.empty( )) { m_pRestoreOpenB->setToolTip(convStr(s)); }
} }
if (SINGLE_UNSORTABLE != m_eSelectionMode) if (SINGLE_UNSORTABLE != m_eSelectionMode)
{ {
m_pSelectedG->verticalHeader()->setMovable(true); m_pSelectedG->verticalHeader()->setSectionsMovable(true);
} }
connect(m_pSelectedG->verticalHeader(), SIGNAL(sectionMoved(int, int, int)), this, SLOT(onSelSectionMoved(int, int, int))); connect(m_pSelectedG->verticalHeader(), SIGNAL(sectionMoved(int, int, int)), this, SLOT(onSelSectionMoved(int, int, int)));
connect(m_pAvailableG, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT (onAvlDoubleClicked(const QModelIndex&))); connect(m_pAvailableG, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT (onAvlDoubleClicked(const QModelIndex&)));
decreaseRowHeaderFont(*m_pSelectedG);
decreaseRowHeaderFont(*m_pAvailableG);
//ttt2 perhaps use QAction::shortcutContext(Qt::WidgetShortcut) to set up sh ortcuts, if it works well enough //ttt2 perhaps use QAction::shortcutContext(Qt::WidgetShortcut) to set up sh ortcuts, if it works well enough
} }
DoubleList::~DoubleList() DoubleList::~DoubleList()
{ {
} }
void DoubleList::onSelSectionMoved(int /*nLogicalIndex*/, int nOldVisualIndex, i nt nNewVisualIndex) void DoubleList::onSelSectionMoved(int /*nLogicalIndex*/, int nOldVisualIndex, i nt nNewVisualIndex)
{ {
CB_ASSERT(SINGLE_SORTABLE == m_eSelectionMode || MULTIPLE == m_eSelectionMod e); CB_ASSERT(SINGLE_SORTABLE == m_eSelectionMode || MULTIPLE == m_eSelectionMod e);
skipping to change at line 432 skipping to change at line 435
break; break;
} }
} }
void DoubleList::setUpGrid(QTableView* pGrid) void DoubleList::setUpGrid(QTableView* pGrid)
{ {
pGrid->verticalHeader()->setMinimumSectionSize(m_listPainter.getHdrHeight()) ; pGrid->verticalHeader()->setMinimumSectionSize(m_listPainter.getHdrHeight()) ;
pGrid->verticalHeader()->setDefaultSectionSize(m_listPainter.getHdrHeight()) ; pGrid->verticalHeader()->setDefaultSectionSize(m_listPainter.getHdrHeight()) ;
pGrid->verticalHeader()->setResizeMode(QHeaderView::Interactive); pGrid->verticalHeader()->setSectionResizeMode(QHeaderView::Interactive);
pGrid->verticalHeader()->setDefaultAlignment(Qt::AlignRight | Qt::AlignVCent er); pGrid->verticalHeader()->setDefaultAlignment(Qt::AlignRight | Qt::AlignVCent er);
resizeColumns(pGrid); resizeColumns(pGrid);
} }
void DoubleList::resizeColumns(QTableView* pGrid) void DoubleList::resizeColumns(QTableView* pGrid)
{ {
if (1 == pGrid->horizontalHeader()->count()) if (1 == pGrid->horizontalHeader()->count())
{ {
pGrid->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); pGrid->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch) ;
} }
else else
{ {
for (int i = 0, n = m_listPainter.getColCount(); i < n; ++i) for (int i = 0, n = m_listPainter.getColCount(); i < n; ++i)
{ {
int w (m_listPainter.getColWidth(i)); int w (m_listPainter.getColWidth(i));
if (w >= 0) if (w >= 0)
{ {
pGrid->horizontalHeader()->setResizeMode(i, QHeaderView::Interac tive); pGrid->horizontalHeader()->setSectionResizeMode(i, QHeaderView:: Interactive);
pGrid->horizontalHeader()->resizeSection(i, w); pGrid->horizontalHeader()->resizeSection(i, w);
} }
else else
{ {
pGrid->horizontalHeader()->setResizeMode(i, QHeaderView::Stretch ); pGrid->horizontalHeader()->setSectionResizeMode(i, QHeaderView:: Stretch);
} }
} }
} }
} }
void DoubleList::clearSel() void DoubleList::clearSel()
{ {
m_pSelectedG->selectionModel()->clear(); m_pSelectedG->selectionModel()->clear();
m_pAvailableG->selectionModel()->clear(); m_pAvailableG->selectionModel()->clear();
} }
 End of changes. 7 change blocks. 
6 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)