summaryrefslogtreecommitdiffstats
path: root/kspread/dialogs/kspread_dlg_layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/dialogs/kspread_dlg_layout.cc')
-rw-r--r--kspread/dialogs/kspread_dlg_layout.cc110
1 files changed, 55 insertions, 55 deletions
diff --git a/kspread/dialogs/kspread_dlg_layout.cc b/kspread/dialogs/kspread_dlg_layout.cc
index 53942457..2bac0636 100644
--- a/kspread/dialogs/kspread_dlg_layout.cc
+++ b/kspread/dialogs/kspread_dlg_layout.cc
@@ -36,7 +36,7 @@
#include <tqcheckbox.h>
#include <tqframe.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqlistbox.h>
#include <tqfontdatabase.h>
#include <tqradiobutton.h>
@@ -78,7 +78,7 @@ PatternSelect::PatternSelect( TQWidget *parent, const char * )
{
penStyle = Qt::NoPen;
penWidth = 1;
- penColor = tqcolorGroup().text();
+ penColor = colorGroup().text();
selected = false;
undefined = false;
}
@@ -88,7 +88,7 @@ void PatternSelect::setPattern( const TQColor &_color, int _width, Qt::PenStyle
penStyle = _style;
penColor = _color;
penWidth = _width;
- tqrepaint();
+ repaint();
}
void PatternSelect::setUndefined()
@@ -127,7 +127,7 @@ void PatternSelect::slotUnselect()
setLineWidth( 1 );
setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- tqrepaint();
+ repaint();
}
void PatternSelect::slotSelect()
@@ -136,7 +136,7 @@ void PatternSelect::slotSelect()
setLineWidth( 2 );
setFrameStyle( TQFrame::Panel | TQFrame::Plain );
- tqrepaint();
+ repaint();
}
@@ -151,16 +151,16 @@ GeneralTab::GeneralTab( TQWidget* parent, CellFormatDialog * dlg )
: TQWidget( parent ),
m_dlg( dlg )
{
- TQGridLayout * tqlayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tqlayout");
+ TQGridLayout * layout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "layout");
TQGroupBox * groupBox = new TQGroupBox( this, "groupBox1" );
groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->setTitle( i18n( "Style" ) );
- groupBox->tqlayout()->setSpacing( KDialog::spacingHint() );
- groupBox->tqlayout()->setMargin( KDialog::marginHint() );
+ groupBox->layout()->setSpacing( KDialog::spacingHint() );
+ groupBox->layout()->setMargin( KDialog::marginHint() );
- TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->tqlayout() );
- groupBoxLayout->tqsetAlignment( TQt::AlignTop );
+ TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->layout() );
+ groupBoxLayout->setAlignment( TQt::AlignTop );
TQLabel * label1 = new TQLabel( groupBox, "label1" );
label1->setText( i18n( "Name:" ) );
@@ -198,8 +198,8 @@ GeneralTab::GeneralTab( TQWidget* parent, CellFormatDialog * dlg )
TQSpacerItem * spacer = new TQSpacerItem( 20, 260, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
- tqlayout->addWidget( groupBox, 0, 0 );
- tqlayout->addItem( spacer, 1, 0 );
+ layout->addWidget( groupBox, 0, 0 );
+ layout->addItem( spacer, 1, 0 );
if ( m_dlg->getStyle()->type() == Style::BUILTIN )
{
@@ -207,7 +207,7 @@ GeneralTab::GeneralTab( TQWidget* parent, CellFormatDialog * dlg )
m_parentBox->setEnabled( false );
}
- resize( TQSize( 534, 447 ).expandedTo(tqminimumSizeHint()) );
+ resize( TQSize( 534, 447 ).expandedTo(minimumSizeHint()) );
}
GeneralTab::~GeneralTab()
@@ -262,7 +262,7 @@ bool GeneralTab::checkParent( const TQString & parentName )
{
KMessageBox::sorry( this,
i18n( "The style cannot inherit from '%1' because of recursive references." )
- .tqarg( m_parentBox->currentText() ) );
+ .arg( m_parentBox->currentText() ) );
return false;
}
@@ -886,12 +886,12 @@ void CellFormatDialog::initParameters(Format *obj,int x,int y)
void CellFormatDialog::init()
{
- TQColorGroup tqcolorGroup = TQApplication::tqpalette().active();
+ TQColorGroup colorGroup = TQApplication::palette().active();
// Did we initialize the bitmaps ?
if ( formatOnlyNegSignedPixmap == 0L )
{
- TQColor black = tqcolorGroup.text(); // not necessarily black :)
+ TQColor black = colorGroup.text(); // not necessarily black :)
formatOnlyNegSignedPixmap = paintFormatPixmap( "123.456", black, "-123.456", black );
formatRedOnlyNegSignedPixmap = paintFormatPixmap( "123.456", black, "-123.456", TQt::red );
formatRedNeverSignedPixmap = paintFormatPixmap( "123.456", black, "123.456", TQt::red );
@@ -948,7 +948,7 @@ TQPixmap * CellFormatDialog::paintFormatPixmap( const char * _string1, const TQC
TQPainter painter;
painter.begin( pixmap );
- painter.fillRect( 0, 0, 150, 14, TQApplication::tqpalette().active().base() );
+ painter.fillRect( 0, 0, 150, 14, TQApplication::palette().active().base() );
painter.setPen( _color1 );
painter.drawText( 2, 11, TQString(_string1) );
painter.setPen( _color2 );
@@ -1082,7 +1082,7 @@ CellFormatPageFloat::CellFormatPageFloat( TQWidget* parent, CellFormatDialog *_d
: TQWidget ( parent ),
dlg( _dlg )
{
- TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6,10 );
+ TQVBoxLayout* layout = new TQVBoxLayout( this, 6,10 );
TQButtonGroup *grp = new TQButtonGroup( i18n("Format"),this);
TQGridLayout *grid = new TQGridLayout(grp,11,2,KDialog::marginHint(), KDialog::spacingHint());
@@ -1149,7 +1149,7 @@ CellFormatPageFloat::CellFormatPageFloat( TQWidget* parent, CellFormatDialog *_d
listFormat=new TQListBox(grp);
grid->addMultiCellWidget(listFormat,2,7,1,1);
TQWhatsThis::add(listFormat, i18n( "Displays choices of format for the fraction, date or time formats." ) );
- tqlayout->addWidget(grp);
+ layout->addWidget(grp);
/* *** */
@@ -1245,7 +1245,7 @@ CellFormatPageFloat::CellFormatPageFloat( TQWidget* parent, CellFormatDialog *_d
format->setCurrentItem( 3 );
else if ( dlg->floatFormat == Format::AlwaysSigned && dlg->floatColor == Format::NegRed )
format->setCurrentItem( 4 );
- tqlayout->addWidget(box);
+ layout->addWidget(box);
cellFormatType=dlg->formatType;
newFormatType = cellFormatType;
@@ -1465,8 +1465,8 @@ void CellFormatPageFloat::init()
TQString tmp;
TQString tmp2;
TQDate tmpDate( 2000,2,18);
- list+=i18n("System: ")+dlg->locale()->formatDate (TQDate::tqcurrentDate(), true);
- list+=i18n("System: ")+dlg->locale()->formatDate (TQDate::tqcurrentDate(), false);
+ list+=i18n("System: ")+dlg->locale()->formatDate (TQDate::currentDate(), true);
+ list+=i18n("System: ")+dlg->locale()->formatDate (TQDate::currentDate(), false);
ValueFormatter *fmt = dlg->getDoc()->formatter();
@@ -1965,7 +1965,7 @@ CellFormatPageFont::CellFormatPageFont( TQWidget* parent, CellFormatDialog *_dlg
TQStringList tmpListFont;
TQFontDatabase *fontDataBase = new TQFontDatabase();
- tmpListFont = fontDataBase->tqfamilies();
+ tmpListFont = fontDataBase->families();
delete fontDataBase;
family_combo->insertStringList( tmpListFont);
@@ -1996,7 +1996,7 @@ CellFormatPageFont::CellFormatPageFont( TQWidget* parent, CellFormatDialog *_dlg
TQStringList lst;
lst.append("");
for ( unsigned int i = 1; i < 100; ++i )
- lst.append( TQString( "%1" ).tqarg( i ) );
+ lst.append( TQString( "%1" ).arg( i ) );
size_combo->insertStringList( lst );
@@ -2151,7 +2151,7 @@ void CellFormatPageFont::display_example(const TQFont& font)
TQString string;
fontChanged=true;
example_label->setFont(font);
- example_label->tqrepaint();
+ example_label->repaint();
}
void CellFormatPageFont::setCombos()
@@ -2164,10 +2164,10 @@ void CellFormatPageFont::setCombos()
if ( dlg->bTextColor )
textColor = dlg->textColor;
else
- textColor = tqcolorGroup().text();
+ textColor = colorGroup().text();
if ( !textColor.isValid() )
- textColor =tqcolorGroup().text();
+ textColor =colorGroup().text();
textColorButton->setColor( textColor );
@@ -2281,7 +2281,7 @@ CellFormatPagePosition::CellFormatPagePosition( TQWidget* parent, CellFormatDial
if ( dlg->isRowSelected )
width->setEnabled(false);
- defaultWidth->setText(i18n("Default width (%1 %2)").tqarg(KoUnit::toUserValue(dlg->defaultWidthSize, dlg->getDoc()->unit()), 0, 'f', 2).tqarg(dlg->getDoc()->unitName()));
+ defaultWidth->setText(i18n("Default width (%1 %2)").arg(KoUnit::toUserValue(dlg->defaultWidthSize, dlg->getDoc()->unit()), 0, 'f', 2).arg(dlg->getDoc()->unitName()));
if ( dlg->isRowSelected )
defaultWidth->setEnabled(false);
@@ -2296,7 +2296,7 @@ CellFormatPagePosition::CellFormatPagePosition( TQWidget* parent, CellFormatDial
if ( dlg->isColumnSelected )
height->setEnabled(false);
- defaultHeight->setText(i18n("Default height (%1 %2)").tqarg(KoUnit::toUserValue(dlg->defaultHeightSize, dlg->getDoc()->unit()), 0, 'f', 2).tqarg(dlg->getDoc()->unitName())); //annma
+ defaultHeight->setText(i18n("Default height (%1 %2)").arg(KoUnit::toUserValue(dlg->defaultHeightSize, dlg->getDoc()->unit()), 0, 'f', 2).arg(dlg->getDoc()->unitName())); //annma
if ( dlg->isColumnSelected )
defaultHeight->setEnabled(false);
@@ -2533,7 +2533,7 @@ BorderButton::BorderButton( TQWidget *parent, const char *_name ) : TQPushButton
{
penStyle = Qt::NoPen;
penWidth = 1;
- penColor = tqcolorGroup().text();
+ penColor = colorGroup().text();
setToggleButton( true );
setOn( false);
setChanged(false);
@@ -2549,7 +2549,7 @@ void BorderButton::setUndefined()
{
setPenStyle(Qt::SolidLine );
setPenWidth(1);
- setColor(tqcolorGroup().midlight());
+ setColor(colorGroup().midlight());
}
@@ -2558,7 +2558,7 @@ void BorderButton::unselect()
setOn(false);
setPenWidth(1);
setPenStyle(Qt::NoPen);
- setColor( tqcolorGroup().text() );
+ setColor( colorGroup().text() );
setChanged(true);
}
@@ -2586,7 +2586,7 @@ void Border::paintEvent( TQPaintEvent *_ev )
TQPen pen;
TQPainter painter;
painter.begin( this );
- pen=TQPen( tqcolorGroup().midlight(),2,SolidLine);
+ pen=TQPen( colorGroup().midlight(),2,SolidLine);
painter.setPen( pen );
painter.drawLine( OFFSETX-5, OFFSETY, OFFSETX , OFFSETY );
@@ -2678,18 +2678,18 @@ void CellFormatPageBorder::InitializeGrids()
{ {0,0}, {0,1},{0,2} };
/***********************/
- /* set up a tqlayout box for most of the border setting buttons */
+ /* set up a layout box for most of the border setting buttons */
tmpTQGroupBox = new TQGroupBox( this, "GroupBox_1" );
tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
tmpTQGroupBox->setTitle( i18n("Border") );
- tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ tmpTQGroupBox->setAlignment( AlignLeft );
grid2 = new TQGridLayout(tmpTQGroupBox,6,5,KDialog::marginHint(), KDialog::spacingHint());
int fHeight = tmpTQGroupBox->fontMetrics().height();
grid2->addRowSpacing( 0, fHeight/2 ); // groupbox title
area=new Border(tmpTQGroupBox,"area",dlg->oneCol,dlg->oneRow);
grid2->addMultiCellWidget(area,2,4,1,3);
- area->setBackgroundColor( tqcolorGroup().base() );
+ area->setBackgroundColor( colorGroup().base() );
/* initailize the buttons that are in this box */
for (int i=BorderType_Top; i < BorderType_END; i++)
@@ -2709,7 +2709,7 @@ void CellFormatPageBorder::InitializeGrids()
tmpTQGroupBox = new TQGroupBox( this, "GroupBox_3" );
tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
tmpTQGroupBox->setTitle( i18n("Preselect") );
- tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ tmpTQGroupBox->setAlignment( AlignLeft );
grid2 = new TQGridLayout(tmpTQGroupBox,1,3,KDialog::marginHint(), KDialog::spacingHint());
@@ -2748,7 +2748,7 @@ void CellFormatPageBorder::InitializeGrids()
tmpTQGroupBox = new TQGroupBox( this, "GroupBox_10" );
tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
tmpTQGroupBox->setTitle( i18n("Pattern") );
- tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ tmpTQGroupBox->setAlignment( AlignLeft );
grid2 = new TQGridLayout(tmpTQGroupBox,7,2,KDialog::marginHint(), KDialog::spacingHint());
fHeight = tmpTQGroupBox->fontMetrics().height();
@@ -2804,7 +2804,7 @@ void CellFormatPageBorder::InitializeGrids()
style->insertItem(paintFormatPixmap(DashDotLine),2 );
style->insertItem(paintFormatPixmap(DashDotDotLine),3 );
style->insertItem(paintFormatPixmap(SolidLine),4);
- style->setBackgroundColor( tqcolorGroup().background() );
+ style->setBackgroundColor( colorGroup().background() );
grid2->addMultiCell(grid3,6,6,0,1);
grid->addMultiCellWidget(tmpTQGroupBox,0,3,1,1);
@@ -2813,7 +2813,7 @@ void CellFormatPageBorder::InitializeGrids()
tmpTQGroupBox = new TQGroupBox(this, "GroupBox_4" );
tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
tmpTQGroupBox->setTitle( i18n("Preview") );
- tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ tmpTQGroupBox->setAlignment( AlignLeft );
grid2 = new TQGridLayout(tmpTQGroupBox,1,1,KDialog::marginHint(), KDialog::spacingHint());
fHeight = tmpTQGroupBox->fontMetrics().height();
@@ -2970,9 +2970,9 @@ TQPixmap CellFormatPageBorder::paintFormatPixmap(PenStyle _style)
TQPixmap pixmap( style->width(), 14 );
TQPainter painter;
TQPen pen;
- pen=TQPen( tqcolorGroup().text(),1,_style);
+ pen=TQPen( colorGroup().text(),1,_style);
painter.begin( &pixmap );
- painter.fillRect( 0, 0, style->width(), 14, tqcolorGroup().background() );
+ painter.fillRect( 0, 0, style->width(), 14, colorGroup().background() );
painter.setPen( pen );
painter.drawLine( 0, 7, style->width(), 7 );
painter.end();
@@ -3223,7 +3223,7 @@ void CellFormatPageBorder::preselect( BorderButton *_p )
vertical->setChanged(true);
}
}
- area->tqrepaint();
+ area->repaint();
}
void CellFormatPageBorder::changeState( BorderButton *_p)
@@ -3240,10 +3240,10 @@ void CellFormatPageBorder::changeState( BorderButton *_p)
{
_p->setPenWidth(1);
_p->setPenStyle(Qt::NoPen);
- _p->setColor( tqcolorGroup().text() );
+ _p->setColor( colorGroup().text() );
}
- area->tqrepaint();
+ area->repaint();
}
void CellFormatPageBorder::draw()
@@ -3483,7 +3483,7 @@ if (rect.contains(TQPoint(_ev->x(),_ev->y())))
}
}
- area->tqrepaint();
+ area->repaint();
}
@@ -3505,7 +3505,7 @@ void BrushSelect::setPattern( const TQColor &_color,Qt::BrushStyle _style )
{
brushStyle = _style;
brushColor = _color;
- tqrepaint();
+ repaint();
}
@@ -3535,7 +3535,7 @@ void BrushSelect::slotUnselect()
setLineWidth( 1 );
setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- tqrepaint();
+ repaint();
}
void BrushSelect::slotSelect()
@@ -3544,7 +3544,7 @@ void BrushSelect::slotSelect()
setLineWidth( 2 );
setFrameStyle( TQFrame::Panel | TQFrame::Plain );
- tqrepaint();
+ repaint();
}
@@ -3567,7 +3567,7 @@ CellFormatPagePattern::CellFormatPagePattern( TQWidget* parent, CellFormatDialog
tmpTQGroupBox = new TQGroupBox( this, "GroupBox_20" );
tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
tmpTQGroupBox->setTitle( i18n("Pattern") );
- tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ tmpTQGroupBox->setAlignment( AlignLeft );
TQGridLayout *grid2 = new TQGridLayout(tmpTQGroupBox,8,3,KDialog::marginHint(), KDialog::spacingHint());
int fHeight = tmpTQGroupBox->fontMetrics().height();
@@ -3656,10 +3656,10 @@ CellFormatPagePattern::CellFormatPagePattern( TQWidget* parent, CellFormatDialog
if ( dlg->bBgColor )
bgColor = dlg->bgColor;
else
- bgColor = tqcolorGroup().base();
+ bgColor = colorGroup().base();
if (!bgColor.isValid())
- bgColor = tqcolorGroup().base();
+ bgColor = colorGroup().base();
bgColorButton->setColor( bgColor );
connect( bgColorButton, TQT_SIGNAL( changed( const TQColor & ) ),
@@ -3678,7 +3678,7 @@ CellFormatPagePattern::CellFormatPagePattern( TQWidget* parent, CellFormatDialog
tmpTQGroupBox = new TQGroupBox( this, "GroupBox1" );
tmpTQGroupBox->setTitle( i18n("Preview") );
tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
- tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ tmpTQGroupBox->setAlignment( AlignLeft );
grid2 = new TQGridLayout(tmpTQGroupBox,2,1,KDialog::marginHint(), KDialog::spacingHint());
fHeight = tmpTQGroupBox->fontMetrics().height();
@@ -3753,8 +3753,8 @@ CellFormatPagePattern::CellFormatPagePattern( TQWidget* parent, CellFormatDialog
void CellFormatPagePattern::slotNotAnyColor()
{
b_notAnyColor = true;
- bgColorButton->setColor( tqcolorGroup().base() );
- current->setBackgroundColor( tqcolorGroup().base() );
+ bgColorButton->setColor( colorGroup().base() );
+ current->setBackgroundColor( colorGroup().base() );
}
void CellFormatPagePattern::slotSetBackgroundColor( const TQColor &_color )