Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 5582 → Rev 5583

/branches/Version13x/Scribus/scribus/layers.cpp
13,6 → 13,7
**
****************************************************************************/
#include <qpushbutton.h>
#include <qtoolbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qpixmap.h>
129,6 → 130,13
Table->setColumnWidth(3, 24);
Table->setColumnWidth(4, 24);
Table->setColumnWidth(5, 24);
header->setResizeEnabled(false, 0);
header->setResizeEnabled(false, 1);
header->setResizeEnabled(false, 2);
header->setResizeEnabled(false, 3);
header->setResizeEnabled(false, 4);
header->setResizeEnabled(false, 5);
header->setResizeEnabled(true, 6);
Table->setRowMovingEnabled(false);
Table->setSorting(false);
Table->setSelectionMode( QTable::SingleRow );
248,12 → 256,15
int layerLevel=ScMW->doc->layerLevelFromNumber(layerNumber);
int row=layerCount-layerLevel-1;
Table->setText(row, 6, ScMW->doc->layerName(layerNumber));
QPushButton *pb = new QPushButton(this, tmp.setNum(layerLevel));
pb->setFlat(true);
QToolButton *pb = new QToolButton(this, tmp.setNum(layerLevel));
pb->setAutoRaise(true);
pb->setText( "" );
QPixmap pm(22,15);
QPixmap pm(20,15);
pm.fill(ScMW->doc->layerMarker(layerNumber));
pb->setPixmap(pm);
QIconSet ic;
ic.setPixmap(pm, QIconSet::Small, QIconSet::Normal);
ic.setPixmap(pm, QIconSet::Small, QIconSet::Active);
pb->setIconSet(ic);
Table->setCellWidget(row, 0, pb);
flagsMarker.append(pb);
connect(pb, SIGNAL(clicked()), this, SLOT(markLayer()));
452,13 → 463,16
if (layerNumber==-1)
return;
const QObject* senderBox=sender();
if (senderBox->isA("QPushButton"))
if (senderBox->isA("QToolButton"))
{
QColor neu = QColor();
neu = QColorDialog::getColor(ScMW->doc->layerMarker(layerNumber), this);
QPixmap pm(22,15);
QPixmap pm(20,15);
pm.fill(neu);
((QPushButton*)(senderBox))->setPixmap(pm);
QIconSet ic;
ic.setPixmap(pm, QIconSet::Small, QIconSet::Normal);
ic.setPixmap(pm, QIconSet::Small, QIconSet::Active);
((QToolButton*)(senderBox))->setIconSet(ic);
ScMW->doc->setLayerMarker(layerNumber,neu);
emit LayerChanged();
ScMW->slotDocCh();
/branches/Version13x/Scribus/scribus/layers.h
15,6 → 15,7
#include "scribusapi.h"
#include "scrpalettebase.h"
 
class QToolButton;
class QPushButton;
class QLayout;
class QToolTip;
95,7 → 96,7
QPtrList<QCheckBox> flagsLocked;
QPtrList<QCheckBox> flagsFlow;
QPtrList<QCheckBox> flagsOutline;
QPtrList<QPushButton> flagsMarker;
QPtrList<QToolButton> flagsMarker;
QValueList<Layer> *layers;
};