r16062 by jghali - line tab uification
scribus-commit
scribus-commit at lists.scribus.net
Sun Dec 5 14:39:32 CET 2010
Author: jghali
Date: Sun Dec 5 13:39:32 2010
New Revision: 16062
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16062
Log:
line tab uification
Added:
branches/ScribusOIF/scribus/ui/propertiespalette_linebase.ui
Modified:
branches/ScribusOIF/scribus/CMakeLists.txt
branches/ScribusOIF/scribus/scribus.cpp
branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
branches/ScribusOIF/scribus/ui/propertiespalette_line.h
branches/ScribusOIF/win32/vc8/Scribus.vcproj
Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16062&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sun Dec 5 13:39:32 2010
@@ -123,6 +123,7 @@
ui/prefs_documentitemattributesbase.ui
ui/printdialogbase.ui
ui/propertiespalette_imagebase.ui
+ ui/propertiespalette_linebase.ui
ui/propertiespalette_shapebase.ui
ui/propertiespalette_textbase.ui
ui/propertiespalette_xyzbase.ui
Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16062&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Sun Dec 5 13:39:32 2010
@@ -3660,8 +3660,7 @@
propertiesPalette->textPal->paraStyleCombo->setDoc(doc);
propertiesPalette->textPal->charStyleCombo->setDoc(doc);
propertiesPalette->linePal->updateLineStyles();
- propertiesPalette->linePal->startArrow->rebuildList(&doc->arrowStyles());
- propertiesPalette->linePal->endArrow->rebuildList(&doc->arrowStyles());
+ propertiesPalette->linePal->updateArrowStyles();
symbolPalette->updateSymbolList();
if (!Mpa)
{
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16062&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp Sun Dec 5 13:39:32 2010
@@ -45,20 +45,17 @@
#endif
#include <cmath>
#include "arrowchooser.h"
-#include "autoform.h"
#include "commonstrings.h"
-#include "colorlistbox.h"
#include "dasheditor.h"
+#include "pageitem.h"
#include "pageitem_textframe.h"
#include "sccolorengine.h"
#include "sccombobox.h"
-#include "scfonts.h"
#include "scribus.h"
#include "scribuscore.h"
#include "scraction.h"
#include "scribusview.h"
#include "selection.h"
-#include "spalette.h"
#include "units.h"
#include "undomanager.h"
#include "util.h"
@@ -77,137 +74,52 @@
m_haveItem = false;
m_lineMode = false;
m_unitRatio = 1.0;
+
+ setupUi(this);
setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
- pageLayout_5 = new QVBoxLayout( this );
- pageLayout_5->setSpacing( 5 );
- pageLayout_5->setMargin( 0 );
-
- Layout12_2 = new QGridLayout;
- Layout12_2->setSpacing( 3 );
- Layout12_2->setMargin( 0 );
- LStyle = new LineCombo(this);
- LStyle->addItem( tr("Custom"));
- LineMode = new ScComboBox( this );
- LineModeT = new QLabel( "&Basepoint:", this );
- LineModeT->setBuddy(LineMode);
- Layout12_2->addWidget( LineModeT, 0, 0 );
- Layout12_2->addWidget( LineMode, 0, 1 );
- lineTypeLabel = new QLabel( "T&ype of Line:", this );
- lineTypeLabel->setBuddy(LStyle);
- Layout12_2->addWidget( lineTypeLabel, 1, 0 );
- Layout12_2->addWidget( LStyle, 1, 1 );
-
- dashEditor = new DashEditor(this);
- Layout12_2->addWidget(dashEditor, 2, 0, 1, 2);
-
- startArrow = new ArrowChooser(this, true);
- Layout12_2->addWidget( startArrow, 4, 0 );
- endArrow = new ArrowChooser(this, false);
- Layout12_2->addWidget( endArrow, 4, 1 );
- startArrowText = new QLabel( "Start Arrow:", this );
- startArrowText->setBuddy(startArrow);
- Layout12_2->addWidget( startArrowText, 3, 0 );
- endArrowText = new QLabel( "End Arrow:", this );
- endArrowText->setBuddy(endArrow);
- Layout12_2->addWidget( endArrowText, 3, 1 );
-
- Layout12_2a = new QHBoxLayout;
- Layout12_2a->setSpacing( 3 );
- Layout12_2a->setMargin( 0 );
- startArrowSpinText = new QLabel( "Scaling:", this );
- Layout12_2a->addWidget(startArrowSpinText);
- startArrowScaleSpin = new QSpinBox(this );
- startArrowScaleSpin->setMaximum( 300 );
- startArrowScaleSpin->setMinimum( 1 );
- Layout12_2a->addWidget(startArrowScaleSpin);
- Layout12_2->addLayout(Layout12_2a, 5, 0);
-
- Layout12_2b = new QHBoxLayout;
- Layout12_2b->setSpacing( 3 );
- Layout12_2b->setMargin( 0 );
- endArrowSpinText = new QLabel( "Scaling:", this );
- Layout12_2b->addWidget(endArrowSpinText);
- endArrowScaleSpin = new QSpinBox(this );
- endArrowScaleSpin->setMaximum( 300 );
- endArrowScaleSpin->setMinimum( 1 );
- Layout12_2b->addWidget(endArrowScaleSpin);
- Layout12_2->addLayout( Layout12_2b, 5, 1 );
-
- LSize = new ScrSpinBox( this, 0 );
- lineWidthLabel = new QLabel( "Line &Width:", this );
- lineWidthLabel->setBuddy(LSize);
- Layout12_2->addWidget( lineWidthLabel, 6, 0 );
- Layout12_2->addWidget( LSize, 6, 1 );
- LJoinStyle = new ScComboBox( this );
- edgesLabel = new QLabel( "Ed&ges:", this );
- edgesLabel->setBuddy(LJoinStyle);
- Layout12_2->addWidget( edgesLabel, 7, 0 );
- Layout12_2->addWidget( LJoinStyle, 7, 1 );
- LEndStyle = new ScComboBox( this );
- endingsLabel = new QLabel( "&Endings:", this );
- endingsLabel->setBuddy(LEndStyle);
- Layout12_2->addWidget( endingsLabel, 8, 0 );
- Layout12_2->addWidget( LEndStyle, 8, 1 );
- pageLayout_5->addLayout( Layout12_2 );
-
- TabStack3 = new QStackedWidget( this );
- TabStack3->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
-
- page_5a = new QWidget( TabStack3 );
- pageLayout_5a = new QVBoxLayout( page_5a );
- pageLayout_5a->setSpacing( 5 );
- pageLayout_5a->setMargin( 0 );
- StyledLine = new QListWidget(page_5a);
- StyledLine->setItemDelegate(new LineFormatItemDelegate);
- StyledLine->addItem( "No Style" );
- pageLayout_5a->addWidget(StyledLine);
- TabStack3->addWidget( page_5a );
-
- page_5b = new QWidget( TabStack3 );
- pageLayout_5b = new QVBoxLayout( page_5b );
- pageLayout_5b->setSpacing( 5 );
- pageLayout_5b->setMargin( 0 );
- TLines = new QGroupBox( "Cell Lines", page_5b );
- TLineLayout = new QVBoxLayout( TLines );
- TLineLayout->setSpacing( 2 );
- TLineLayout->setMargin( 5 );
- TLineLayout->setAlignment( Qt::AlignTop );
- TopLine = new QCheckBox( TLines );
- TopLine->setText( "Line at Top" );
- TLineLayout->addWidget(TopLine);
- LeftLine = new QCheckBox( TLines );
- LeftLine->setText( "Line at the Left" );
- TLineLayout->addWidget(LeftLine);
- RightLine = new QCheckBox( TLines );
- RightLine->setText( "Line at the Right " );
- TLineLayout->addWidget(RightLine);
- BottomLine = new QCheckBox( TLines );
- BottomLine->setText( "Line at Bottom" );
- TLineLayout->addWidget(BottomLine);
- pageLayout_5b->addWidget(TLines);
- TabStack3->addWidget( page_5b );
- pageLayout_5->addWidget( TabStack3 );
+ lineType->addItem( tr("Custom"));
+
+ lineModeLabel->setBuddy(lineMode);
+ lineTypeLabel->setBuddy(lineType);
+
+ startArrowLabel->setBuddy(startArrow);
+ endArrowLabel->setBuddy(endArrow);
+
+ startArrowScale->setMaximum( 300 );
+ startArrowScale->setMinimum( 1 );
+
+ endArrowScale->setMaximum( 300 );
+ endArrowScale->setMinimum( 1 );
+
+ lineWidthLabel->setBuddy(lineWidth);
+ lineJoinLabel->setBuddy(lineJoinStyle);
+ lineEndLabel->setBuddy(lineEndStyle);
+
+ lineStyles->setItemDelegate(new LineFormatItemDelegate);
+ lineStyles->addItem( "No Style" );
+
+ tableLineLayout->setAlignment( Qt::AlignTop );
languageChange();
- connect(LSize , SIGNAL(valueChanged(double)), this, SLOT(handleLineWidth()));
- connect(LStyle , SIGNAL(activated(int)) , this, SLOT(handleLineStyle()));
- connect(LJoinStyle, SIGNAL(activated(int)) , this, SLOT(handleLineJoin()));
- connect(LEndStyle , SIGNAL(activated(int)) , this, SLOT(handleLineEnd()));
- connect(LineMode , SIGNAL(activated(int)) , this, SLOT(handleLineMode()));
+ connect(lineWidth , SIGNAL(valueChanged(double)), this, SLOT(handleLineWidth()));
+ connect(lineType , SIGNAL(activated(int)) , this, SLOT(handleLineStyle()));
+ connect(lineJoinStyle, SIGNAL(activated(int)) , this, SLOT(handleLineJoin()));
+ connect(lineEndStyle , SIGNAL(activated(int)) , this, SLOT(handleLineEnd()));
+ connect(lineMode , SIGNAL(activated(int)) , this, SLOT(handleLineMode()));
connect(dashEditor, SIGNAL(dashChanged()) , this, SLOT(handleDashChange()));
- connect(TopLine , SIGNAL(clicked()) , this, SLOT(handleTLines()));
- connect(LeftLine , SIGNAL(clicked()) , this, SLOT(handleTLines()));
- connect(RightLine , SIGNAL(clicked()) , this, SLOT(handleTLines()));
- connect(BottomLine, SIGNAL(clicked()) , this, SLOT(handleTLines()));
+ connect(topLine , SIGNAL(clicked()) , this, SLOT(handleTLines()));
+ connect(leftLine , SIGNAL(clicked()) , this, SLOT(handleTLines()));
+ connect(rightLine , SIGNAL(clicked()) , this, SLOT(handleTLines()));
+ connect(bottomLine, SIGNAL(clicked()) , this, SLOT(handleTLines()));
connect(startArrow, SIGNAL(activated(int)) , this, SLOT(handleStartArrow(int )));
connect(endArrow , SIGNAL(activated(int)) , this, SLOT(handleEndArrow(int )));
- connect(startArrowScaleSpin, SIGNAL(valueChanged(int)), this, SLOT(handleStartArrowScale(int )));
- connect(endArrowScaleSpin , SIGNAL(valueChanged(int)), this, SLOT(handleEndArrowScale(int )));
- connect(StyledLine, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(handleLineStyle(QListWidgetItem*)));
-
- TabStack3->setCurrentIndex(0);
+ connect(startArrowScale, SIGNAL(valueChanged(int)), this, SLOT(handleStartArrowScale(int )));
+ connect(endArrowScale , SIGNAL(valueChanged(int)), this, SLOT(handleEndArrowScale(int )));
+ connect(lineStyles, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(handleLineStyle(QListWidgetItem*)));
+
+ stackedWidget->setCurrentIndex(0);
}
void PropertiesPalette_Line::changeEvent(QEvent *e)
@@ -272,8 +184,8 @@
m_haveDoc = true;
m_haveItem = false;
- LSize->setMaximum( 300 );
- LSize->setMinimum( 0 );
+ lineWidth->setMaximum( 300 );
+ lineWidth->setMinimum( 0 );
updateLineStyles(m_doc);
startArrow->rebuildList(&m_doc->arrowStyles());
@@ -324,7 +236,7 @@
int itemType = currItem ? (int) currItem->itemType() : -1;
m_haveItem = (itemType != -1);
- LineMode->setEnabled(false);
+ lineMode->setEnabled(false);
switch (itemType)
{
case -1:
@@ -336,7 +248,7 @@
setEnabled(currItem->asOSGFrame() == NULL);
case PageItem::Line:
setEnabled(true);
- LineMode->setEnabled(true);
+ lineMode->setEnabled(true);
break;
case PageItem::ItemType1:
case PageItem::ItemType3:
@@ -376,12 +288,12 @@
m_haveItem = false;
m_item = item;
- StyledLine->blockSignals(true);
+ lineStyles->blockSignals(true);
startArrow->blockSignals(true);
endArrow->blockSignals(true);
- startArrowScaleSpin->blockSignals(true);
- endArrowScaleSpin->blockSignals(true);
- LineMode->blockSignals(true);
+ startArrowScale->blockSignals(true);
+ endArrowScale->blockSignals(true);
+ lineMode->blockSignals(true);
if ((m_item->asLine()) || (m_item->asPolyLine()))
{
@@ -389,78 +301,78 @@
endArrow->setEnabled(true);
startArrow->setCurrentIndex(m_item->startArrowIndex());
endArrow->setCurrentIndex(m_item->endArrowIndex());
- startArrowScaleSpin->setEnabled(true);
- endArrowScaleSpin->setEnabled(true);
- endArrowScaleSpin->setValue(m_item->endArrowScale());
- startArrowScaleSpin->setValue(m_item->startArrowScale());
+ startArrowScale->setEnabled(true);
+ endArrowScale->setEnabled(true);
+ endArrowScale->setValue(m_item->endArrowScale());
+ startArrowScale->setValue(m_item->startArrowScale());
}
else
{
startArrow->setEnabled(false);
endArrow->setEnabled(false);
- startArrowScaleSpin->setEnabled(false);
- endArrowScaleSpin->setEnabled(false);
- }
-
- if (StyledLine->currentItem())
- StyledLine->currentItem()->setSelected(false);
+ startArrowScale->setEnabled(false);
+ endArrowScale->setEnabled(false);
+ }
+
+ if (lineStyles->currentItem())
+ lineStyles->currentItem()->setSelected(false);
bool setter = false;
if (m_item->NamedLStyle.isEmpty())
{
setter = true;
QListWidgetItem *itemStl = NULL;
- itemStl = StyledLine->item(0);
+ itemStl = lineStyles->item(0);
if (itemStl != NULL)
itemStl->setSelected(true);
}
else
{
- QList<QListWidgetItem*> results (StyledLine->findItems(m_item->NamedLStyle, Qt::MatchFixedString|Qt::MatchCaseSensitive));
+ QList<QListWidgetItem*> results (lineStyles->findItems(m_item->NamedLStyle, Qt::MatchFixedString|Qt::MatchCaseSensitive));
if (results.count() > 0)
results[0]->setSelected(true);
setter = false;
}
- LStyle->setEnabled(setter);
- LSize->setEnabled(setter);
- LJoinStyle->setEnabled(setter);
- LEndStyle->setEnabled(setter);
+ lineType->setEnabled(setter);
+ lineWidth->setEnabled(setter);
+ lineJoinStyle->setEnabled(setter);
+ lineEndStyle->setEnabled(setter);
if (m_item->dashes().count() == 0)
dashEditor->hide();
else
{
- LStyle->setCurrentIndex(37);
+ lineType->setCurrentIndex(37);
dashEditor->setDashValues(m_item->dashes(), qMax(m_item->lineWidth(), 0.001), m_item->dashOffset());
dashEditor->show();
}
if (m_lineMode)
- LineMode->setCurrentIndex(1);
+ lineMode->setCurrentIndex(1);
else
- LineMode->setCurrentIndex(0);
-
- StyledLine->blockSignals(false);
+ lineMode->setCurrentIndex(0);
+
+ lineStyles->blockSignals(false);
startArrow->blockSignals(false);
endArrow->blockSignals(false);
- startArrowScaleSpin->blockSignals(false);
- endArrowScaleSpin->blockSignals(false);
- LineMode->blockSignals(false);
+ startArrowScale->blockSignals(false);
+ endArrowScale->blockSignals(false);
+ lineMode->blockSignals(false);
if ((m_item->isTableItem) && (m_item->isSingleSel))
{
setter = true;
- TabStack3->setCurrentIndex(1);
- TopLine->setChecked(m_item->TopLine);
- LeftLine->setChecked(m_item->LeftLine);
- RightLine->setChecked(m_item->RightLine);
- BottomLine->setChecked(m_item->BottomLine);
+ stackedWidget->setCurrentIndex(1);
+ topLine->setChecked(m_item->TopLine);
+ leftLine->setChecked(m_item->LeftLine);
+ rightLine->setChecked(m_item->RightLine);
+ bottomLine->setChecked(m_item->BottomLine);
}
else
{
setter = false;
- TabStack3->setCurrentIndex(0);
+ stackedWidget->setCurrentIndex(0);
}
if ((m_item->isGroupControl) || ((m_item->Groups.count() != 0) && (!m_item->isSingleSel)))
@@ -483,6 +395,20 @@
}
}
+void PropertiesPalette_Line::updateArrowStyles()
+{
+ updateArrowStyles(m_doc);
+}
+
+void PropertiesPalette_Line::updateArrowStyles(ScribusDoc *doc)
+{
+ if (doc)
+ {
+ startArrow->rebuildList(&doc->arrowStyles());
+ endArrow->rebuildList(&doc->arrowStyles());
+ }
+}
+
void PropertiesPalette_Line::updateLineStyles()
{
updateLineStyles(m_doc);
@@ -493,26 +419,26 @@
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- StyledLine->blockSignals(true);
- StyledLine->clear();
+ lineStyles->blockSignals(true);
+ lineStyles->clear();
if (dd != 0)
{
QMap<QString,multiLine>::Iterator it;
for (it = dd->MLineStyles.begin(); it != dd->MLineStyles.end(); ++it)
- StyledLine->addItem( new LineFormatItem(dd, it.value(), it.key()) );
- StyledLine->sortItems();
- StyledLine->insertItem( 0, tr("No Style"));
- if (StyledLine->currentItem())
- StyledLine->currentItem()->setSelected(false);
- }
- StyledLine->blockSignals(false);
+ lineStyles->addItem( new LineFormatItem(dd, it.value(), it.key()) );
+ lineStyles->sortItems();
+ lineStyles->insertItem( 0, tr("No Style"));
+ if (lineStyles->currentItem())
+ lineStyles->currentItem()->setSelected(false);
+ }
+ lineStyles->blockSignals(false);
}
void PropertiesPalette_Line::displayLineWidth(double s)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- LSize->showValue(s * m_unitRatio);
+ lineWidth->showValue(s * m_unitRatio);
if (m_haveItem)
{
if (m_item->dashes().count() != 0)
@@ -535,58 +461,58 @@
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- LStyle->blockSignals(true);
+ lineType->blockSignals(true);
dashEditor->blockSignals(true);
if (m_haveItem)
{
if (m_item->dashes().count() != 0)
{
- LStyle->setCurrentIndex(37);
+ lineType->setCurrentIndex(37);
dashEditor->setDashValues(m_item->dashes(), qMax(m_item->lineWidth(), 0.001), m_item->dashOffset());
}
else
- LStyle->setCurrentIndex(static_cast<int>(p) - 1);
+ lineType->setCurrentIndex(static_cast<int>(p) - 1);
}
else
- LStyle->setCurrentIndex(static_cast<int>(p) - 1);
+ lineType->setCurrentIndex(static_cast<int>(p) - 1);
dashEditor->blockSignals(false);
- LStyle->blockSignals(false);
-
- LEndStyle->blockSignals(true);
+ lineType->blockSignals(false);
+
+ lineEndStyle->blockSignals(true);
switch (pc)
{
case Qt::FlatCap:
- LEndStyle->setCurrentIndex(0);
+ lineEndStyle->setCurrentIndex(0);
break;
case Qt::SquareCap:
- LEndStyle->setCurrentIndex(1);
+ lineEndStyle->setCurrentIndex(1);
break;
case Qt::RoundCap:
- LEndStyle->setCurrentIndex(2);
+ lineEndStyle->setCurrentIndex(2);
break;
default:
- LEndStyle->setCurrentIndex(0);
+ lineEndStyle->setCurrentIndex(0);
break;
}
- LEndStyle->blockSignals(false);
-
- LJoinStyle->blockSignals(true);
+ lineEndStyle->blockSignals(false);
+
+ lineJoinStyle->blockSignals(true);
switch (pj)
{
case Qt::MiterJoin:
- LJoinStyle->setCurrentIndex(0);
+ lineJoinStyle->setCurrentIndex(0);
break;
case Qt::BevelJoin:
- LJoinStyle->setCurrentIndex(1);
+ lineJoinStyle->setCurrentIndex(1);
break;
case Qt::RoundJoin:
- LJoinStyle->setCurrentIndex(2);
+ lineJoinStyle->setCurrentIndex(2);
break;
default:
- LJoinStyle->setCurrentIndex(0);
+ lineJoinStyle->setCurrentIndex(0);
break;
}
- LJoinStyle->blockSignals(false);
+ lineJoinStyle->blockSignals(false);
}
void PropertiesPalette_Line::handleLineWidth()
@@ -596,7 +522,7 @@
if ((m_haveDoc) && (m_haveItem))
{
double oldL = m_item->lineWidth();
- m_doc->itemSelection_SetLineWidth(LSize->value() / m_unitRatio);
+ m_doc->itemSelection_SetLineWidth(lineWidth->value() / m_unitRatio);
if (m_item->dashes().count() != 0)
{
if ((oldL != 0.0) && (m_item->lineWidth() != 0.0))
@@ -624,7 +550,7 @@
return;
if ((m_haveDoc) && (m_haveItem))
{
- if (LStyle->currentIndex() == 37)
+ if (lineType->currentIndex() == 37)
{
if (m_item->dashes().count() == 0)
{
@@ -650,7 +576,7 @@
{
m_item->DashValues.clear();
dashEditor->hide();
- m_doc->itemSelection_SetLineArt(static_cast<Qt::PenStyle>(LStyle->currentIndex()+1));
+ m_doc->itemSelection_SetLineArt(static_cast<Qt::PenStyle>(lineType->currentIndex()+1));
}
}
}
@@ -662,7 +588,7 @@
if ((m_haveDoc) && (m_haveItem))
{
Qt::PenJoinStyle c = Qt::MiterJoin;
- switch (LJoinStyle->currentIndex())
+ switch (lineJoinStyle->currentIndex())
{
case 0:
c = Qt::MiterJoin;
@@ -685,7 +611,7 @@
if ((m_haveDoc) && (m_haveItem))
{
Qt::PenCapStyle c = Qt::FlatCap;
- switch (LEndStyle->currentIndex())
+ switch (lineEndStyle->currentIndex())
{
case 0:
c = Qt::FlatCap;
@@ -705,18 +631,18 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_lineMode = (LineMode->currentIndex() == 1);
- emit lineModeChanged(LineMode->currentIndex());
+ m_lineMode = (lineMode->currentIndex() == 1);
+ emit lineModeChanged(lineMode->currentIndex());
}
void PropertiesPalette_Line::handleTLines()
{
if ((m_haveDoc) && (m_haveItem))
{
- m_item->TopLine = TopLine->isChecked();
- m_item->LeftLine = LeftLine->isChecked();
- m_item->RightLine = RightLine->isChecked();
- m_item->BottomLine = BottomLine->isChecked();
+ m_item->TopLine = topLine->isChecked();
+ m_item->LeftLine = leftLine->isChecked();
+ m_item->RightLine = rightLine->isChecked();
+ m_item->BottomLine = bottomLine->isChecked();
m_item->update();
emit DocChanged();
}
@@ -772,30 +698,30 @@
return;
bool setter = (widgetItem->listWidget()->currentRow() == 0);
m_doc->itemSelection_SetNamedLineStyle(setter ? QString("") : widgetItem->text());
- LStyle->setEnabled(setter);
- LSize->setEnabled(setter);
- LJoinStyle->setEnabled(setter);
- LEndStyle->setEnabled(setter);
+ lineType->setEnabled(setter);
+ lineWidth->setEnabled(setter);
+ lineJoinStyle->setEnabled(setter);
+ lineEndStyle->setEnabled(setter);
}
void PropertiesPalette_Line::languageChange()
{
- int oldLineStyle = LStyle->currentIndex();
- LStyle->clear();
- LStyle->updateList();
- LStyle->addItem( tr("Custom"));
- LStyle->setCurrentIndex(oldLineStyle);
- int oldLineMode=LineMode->currentIndex();
- LineMode->clear();
- LineMode->addItem( tr("Left Point"));
- LineMode->addItem( tr("End Points"));
- LineMode->setCurrentIndex(oldLineMode);
- LineModeT->setText( tr("&Basepoint:"));
+ int oldLineStyle = lineType->currentIndex();
+ lineType->clear();
+ lineType->updateList();
+ lineType->addItem( tr("Custom"));
+ lineType->setCurrentIndex(oldLineStyle);
+ int oldLineMode=lineMode->currentIndex();
+ lineMode->clear();
+ lineMode->addItem( tr("Left Point"));
+ lineMode->addItem( tr("End Points"));
+ lineMode->setCurrentIndex(oldLineMode);
+ lineModeLabel->setText( tr("&Basepoint:"));
lineTypeLabel->setText( tr("T&ype of Line:"));
- startArrowText->setText( tr("Start Arrow:"));
- endArrowText->setText( tr("End Arrow:"));
- startArrowSpinText->setText( tr("Scaling:"));
- endArrowSpinText->setText( tr("Scaling:"));
+ startArrowLabel->setText( tr("Start Arrow:"));
+ endArrowLabel->setText( tr("End Arrow:"));
+ startArrowScaleLabel->setText( tr("Scaling:"));
+ endArrowScaleLabel->setText( tr("Scaling:"));
if (m_haveDoc)
{
int arrowItem = startArrow->currentIndex();
@@ -806,52 +732,52 @@
endArrow->setCurrentIndex(arrowItem);
}
lineWidthLabel->setText( tr("Line &Width:"));
- edgesLabel->setText( tr("Ed&ges:"));
-
- int oldLJoinStyle=LJoinStyle->currentIndex();
- LJoinStyle->clear();
- LJoinStyle->addItem(loadIcon("16/stroke-join-miter.png"), tr("Miter Join"));
- LJoinStyle->addItem(loadIcon("16/stroke-join-bevel.png"), tr("Bevel Join"));
- LJoinStyle->addItem(loadIcon("16/stroke-join-round.png"), tr("Round Join"));
- LJoinStyle->setCurrentIndex(oldLJoinStyle);
-
- int oldLEndStyle=LEndStyle->currentIndex();
- LEndStyle->clear();
- LEndStyle->addItem(loadIcon("16/stroke-cap-butt.png"), tr("Flat Cap"));
- LEndStyle->addItem(loadIcon("16/stroke-cap-square.png"), tr("Square Cap"));
- LEndStyle->addItem(loadIcon("16/stroke-cap-round.png"), tr("Round Cap"));
- LEndStyle->setCurrentIndex(oldLEndStyle);
- endingsLabel->setText( tr("&Endings:"));
-
- TLines->setTitle( tr("Cell Lines"));
- TopLine->setText( tr("Line at Top"));
- LeftLine->setText( tr("Line at the Left"));
- RightLine->setText( tr("Line at the Right "));
- BottomLine->setText( tr("Line at Bottom"));
+ lineJoinLabel->setText( tr("Ed&ges:"));
+
+ int oldLJoinStyle=lineJoinStyle->currentIndex();
+ lineJoinStyle->clear();
+ lineJoinStyle->addItem(loadIcon("16/stroke-join-miter.png"), tr("Miter Join"));
+ lineJoinStyle->addItem(loadIcon("16/stroke-join-bevel.png"), tr("Bevel Join"));
+ lineJoinStyle->addItem(loadIcon("16/stroke-join-round.png"), tr("Round Join"));
+ lineJoinStyle->setCurrentIndex(oldLJoinStyle);
+
+ int oldLEndStyle=lineEndStyle->currentIndex();
+ lineEndStyle->clear();
+ lineEndStyle->addItem(loadIcon("16/stroke-cap-butt.png"), tr("Flat Cap"));
+ lineEndStyle->addItem(loadIcon("16/stroke-cap-square.png"), tr("Square Cap"));
+ lineEndStyle->addItem(loadIcon("16/stroke-cap-round.png"), tr("Round Cap"));
+ lineEndStyle->setCurrentIndex(oldLEndStyle);
+ lineEndLabel->setText( tr("&Endings:"));
+
+ tableLineGroup->setTitle( tr("Cell Lines"));
+ topLine->setText( tr("Line at Top"));
+ leftLine->setText( tr("Line at the Left"));
+ rightLine->setText( tr("Line at the Right "));
+ bottomLine->setText( tr("Line at Bottom"));
QString pctSuffix = tr(" %");
- startArrowScaleSpin->setSuffix(pctSuffix);
- endArrowScaleSpin->setSuffix(pctSuffix);
+ startArrowScale->setSuffix(pctSuffix);
+ endArrowScale->setSuffix(pctSuffix);
QString ptSuffix = tr(" pt");
QString suffix = (m_doc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
- LSize->setSuffix(suffix);
- LSize->setSpecialValueText( tr("Hairline"));
-
- if(StyledLine->count() > 0)
- StyledLine->item(0)->setText( tr("No Style") );
-
- LineMode->setToolTip( tr("Change settings for left or end points"));
- LStyle->setToolTip( tr("Pattern of line"));
- LSize->setToolTip( tr("Thickness of line"));
- LJoinStyle->setToolTip( tr("Type of line joins"));
- LEndStyle->setToolTip( tr("Type of line end"));
- StyledLine->setToolTip( tr("Line style of current object"));
+ lineWidth->setSuffix(suffix);
+ lineWidth->setSpecialValueText( tr("Hairline"));
+
+ if(lineStyles->count() > 0)
+ lineStyles->item(0)->setText( tr("No Style") );
+
+ lineMode->setToolTip( tr("Change settings for left or end points"));
+ lineType->setToolTip( tr("Pattern of line"));
+ lineWidth->setToolTip( tr("Thickness of line"));
+ lineJoinStyle->setToolTip( tr("Type of line joins"));
+ lineEndStyle->setToolTip( tr("Type of line end"));
+ lineStyles->setToolTip( tr("Line style of current object"));
startArrow->setToolTip( tr("Arrow head style for start of line"));
endArrow->setToolTip( tr("Arrow head style for end of line"));
- startArrowScaleSpin->setToolTip( tr("Arrow head scale for start of line"));
- endArrowScaleSpin->setToolTip( tr("Arrow head scale for end of line"));
+ startArrowScale->setToolTip( tr("Arrow head scale for start of line"));
+ endArrowScale->setToolTip( tr("Arrow head scale for end of line"));
}
void PropertiesPalette_Line::unitChange()
@@ -863,7 +789,7 @@
m_unitRatio = m_doc->unitRatio();
m_unitIndex = m_doc->unitIndex();
- LSize->blockSignals(true);
- LSize->setNewUnit( m_unitIndex );
- LSize->blockSignals(false);
-}
+ lineWidth->blockSignals(true);
+ lineWidth->setNewUnit( m_unitIndex );
+ lineWidth->blockSignals(false);
+}
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16062&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.h Sun Dec 5 13:39:32 2010
@@ -7,62 +7,20 @@
#ifndef PROPERTIESPALETTE_LINE_H
#define PROPERTIESPALETTE_LINE_H
-#include <QListWidgetItem>
-#include <QLineEdit>
-
-class QButtonGroup;
-class QCheckBox;
-class QCloseEvent;
-class QComboBox;
-class QEvent;
-class QEvent;
-class QFocusEvent;
-class QFrame;
-class QGridLayout;
-class QGroupBox;
-class QHBoxLayout;
-class QLabel;
-class QMenu;
-class QPushButton;
-class QRadioButton;
-class QSpinBox;
-class QStackedWidget;
-class QStackedWidget;
-class QToolBox;
-class QVBoxLayout;
-class QWidget;
-
+#include "ui_propertiespalette_linebase.h"
#include "scribusapi.h"
-#include "scrpalettebase.h"
-#include "scrspinbox.h"
-#include "pageitem.h"
-#include "page.h"
-#include "linkbutton.h"
#include "linecombo.h"
-#include "spalette.h"
-#include "alignselect.h"
-#include "shadebutton.h"
-#include "sclistboxpixmap.h"
#include "scguardedptr.h"
-#include "sctreewidget.h"
class ArrowChooser;
-class Autoforms;
-class BasePointWidget;
-class ColorCombo;
class DashEditor;
-class FontComboH;
-class NameWidget;
+class PageItem;
class ScComboBox;
class ScribusDoc;
class ScribusMainWindow;
-class Selection;
-class StyleSelect;
-class Tpalette;
-class UserActionSniffer;
-class SCRIBUS_API PropertiesPalette_Line : public QWidget
+class SCRIBUS_API PropertiesPalette_Line : public QWidget, Ui::PropertiesPalette_LineBase
{
Q_OBJECT
@@ -73,10 +31,7 @@
virtual void changeEvent(QEvent *e);
void updateLineStyles();
-
- ArrowChooser* startArrow;
- ArrowChooser* endArrow;
- DashEditor* dashEditor;
+ void updateArrowStyles();
protected:
@@ -93,6 +48,7 @@
private:
PageItem* currentItemFromSelection();
+ void updateArrowStyles(ScribusDoc *dd);
void updateLineStyles(ScribusDoc *dd);
public slots:
@@ -126,53 +82,6 @@
void handleEndArrowScale(int sc);
void handleLineStyle(QListWidgetItem *c);
-protected:
-
- QGridLayout* Layout12_2;
-
- QHBoxLayout* Layout12_2a;
- QHBoxLayout* Layout12_2b;
-
- QVBoxLayout* pageLayout_5;
- QVBoxLayout* pageLayout_5a;
- QVBoxLayout* pageLayout_5b;
- QVBoxLayout* TLineLayout;
-
- QCheckBox* LeftLine;
- QCheckBox* RightLine;
- QCheckBox* BottomLine;
- QCheckBox* TopLine;
-
- QLabel* LineModeT;
- QLabel* lineTypeLabel;
- QLabel* lineWidthLabel;
- QLabel* startArrowText;
- QLabel* startArrowSpinText;
- QLabel* endArrowText;
- QLabel* endArrowSpinText;
- QLabel* edgesLabel;
- QLabel* endingsLabel;
-
- QGroupBox* TLines;
-
- QListWidget* StyledLine;
-
- QSpinBox* startArrowScaleSpin;
- QSpinBox* endArrowScaleSpin;
-
- QStackedWidget* TabStack3;
-
- QWidget* page_5a;
- QWidget* page_5b;
-
- LineCombo* LStyle;
-
- ScComboBox* LineMode;
- ScComboBox* LJoinStyle;
- ScComboBox* LEndStyle;
-
- ScrSpinBox* LSize;
-
signals:
void DocChanged();
void lineModeChanged(int);
Modified: branches/ScribusOIF/win32/vc8/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16062&path=/branches/ScribusOIF/win32/vc8/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.vcproj Sun Dec 5 13:39:32 2010
@@ -11713,6 +11713,10 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\ui_propertiespalette_linebase.h"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\ui_propertiespalette_shapebase.h"
>
</File>
@@ -13039,6 +13043,10 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertiespalette_linebase.ui"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\propertiespalette_shapebase.ui"
>
</File>
More information about the scribus-commit
mailing list