Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4198 → Rev 4197

/branches/Version13x/Scribus/scribus/guidemanager.cpp
269,11 → 269,6
connect(useColGap, SIGNAL(toggled(bool)), this, SLOT(useColGap_clicked(bool)));
}
 
GuideManager::~GuideManager()
{
ScMW->mainWindowStatusLabel->setText(QString::null);
}
 
void GuideManager::DelHorVal()
{
/* previous item pointer to ensure that ++it
308,34 → 303,30
}
}
 
bool GuideManager::addValueToList(QListView *list, MSpinBox *spin)
void GuideManager::AddHorVal()
{
QString tmp;
tmp = tmp.setNum(0.0, 'f', docUnitPrecision);
// no duplications
if (list->findItem(tmp, 0) != 0)
{
ScMW->mainWindowStatusLabel->setText(tr("There is empty (0.0) guide already"));
return false;
}
QListViewItem *item = new QListViewItem(list, tmp, suffix);
list->insertItem(item);
list->setCurrentItem(item);
list->clearSelection();
list->setSelected(item, true);
spin->setFocus();
spin->selectAll();
return true;
QListViewItem *item = new QListViewItem(horList, tmp, suffix);
horList->insertItem(item);
horList->setCurrentItem(item);
horList->clearSelection();
horList->setSelected(item, true);
horSpin->setFocus();
horSpin->selectAll();
}
 
void GuideManager::AddHorVal()
{
addValueToList(horList, horSpin);
}
 
void GuideManager::AddVerVal()
{
addValueToList(verList, verSpin);
QString tmp;
tmp = tmp.setNum(0.0, 'f', docUnitPrecision);
QListViewItem *item = new QListViewItem(verList, tmp, suffix);
verList->insertItem(item);
verList->clearSelection();
verList->setCurrentItem(item);
verList->setSelected(item, true);
verSpin->setFocus();
verSpin->selectAll();
}
 
void GuideManager::resetMarginsForPage()
530,15 → 521,11
void GuideManager::useRowGap_clicked(bool state)
{
rowGap->setEnabled(state);
if (state)
rowGap->setFocus();
}
 
void GuideManager::useColGap_clicked(bool state)
{
colGap->setEnabled(state);
if (state)
colGap->setFocus();
}
 
void GuideManager::commitChanges()
/branches/Version13x/Scribus/scribus/guidemanager.h
35,7 → 35,7
 
public:
GuideManager(QWidget* parent);
~GuideManager();
~GuideManager() {};
 
private:
//! \brief If there is a selection on the current page
136,14 → 136,6
page when is "apply to all pages" switched on */
void resetMarginsForPage();
 
/*! \brief Add a value from spin box to the list.
It's called by "add" slots AddHorVal and AddVerVal.
\param list a reference to the QListView to add a value.
\param spin a reference to the spin box to take a value.
\retval bool false on no add (duplicate etc.), true on success.
*/
bool addValueToList(QListView *list, MSpinBox *spin);
 
protected slots:
 
/*! \brief delete horizontal value */