summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/KoPageLayoutDia.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /lib/kofficeui/KoPageLayoutDia.cpp
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'lib/kofficeui/KoPageLayoutDia.cpp')
-rw-r--r--lib/kofficeui/KoPageLayoutDia.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/lib/kofficeui/KoPageLayoutDia.cpp b/lib/kofficeui/KoPageLayoutDia.cpp
index 0b410bf1..24e32a7a 100644
--- a/lib/kofficeui/KoPageLayoutDia.cpp
+++ b/lib/kofficeui/KoPageLayoutDia.cpp
@@ -34,7 +34,7 @@
#include <kmessagebox.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpainter.h>
#include <tqlineedit.h>
#include <tqbuttongroup.h>
@@ -49,10 +49,10 @@
/******************************************************************/
/*===================== constrcutor ==============================*/
-KoPagePreview::KoPagePreview( TQWidget* parent, const char *name, const KoPageLayout& tqlayout )
+KoPagePreview::KoPagePreview( TQWidget* parent, const char *name, const KoPageLayout& layout )
: TQGroupBox( i18n( "Page Preview" ), parent, name )
{
- setPageLayout( tqlayout );
+ setPageLayout( layout );
columns = 1;
setMinimumSize( 150, 150 );
}
@@ -62,15 +62,15 @@ KoPagePreview::~KoPagePreview()
{
}
-/*=================== set tqlayout =================================*/
-void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout )
+/*=================== set layout =================================*/
+void KoPagePreview::setPageLayout( const KoPageLayout &layout )
{
// resolution[XY] is in pixel per pt
double resolutionX = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiX()) );
double resolutionY = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiY()) );
- m_pageWidth = tqlayout.ptWidth * resolutionX;
- m_pageHeight = tqlayout.ptHeight * resolutionY;
+ m_pageWidth = layout.ptWidth * resolutionX;
+ m_pageHeight = layout.ptHeight * resolutionY;
double zh = 110.0 / m_pageHeight;
double zw = 110.0 / m_pageWidth;
@@ -79,19 +79,19 @@ void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout )
m_pageWidth *= z;
m_pageHeight *= z;
- m_textFrameX = tqlayout.ptLeft * resolutionX * z;
- m_textFrameY = tqlayout.ptTop * resolutionY * z;
- m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z;
- m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z;
+ m_textFrameX = layout.ptLeft * resolutionX * z;
+ m_textFrameY = layout.ptTop * resolutionY * z;
+ m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z;
+ m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z;
- tqrepaint( true );
+ repaint( true );
}
-/*=================== set tqlayout =================================*/
+/*=================== set layout =================================*/
void KoPagePreview::setPageColumns( const KoColumns &_columns )
{
columns = _columns.columns;
- tqrepaint( true );
+ repaint( true );
}
/*======================== draw contents =========================*/
@@ -129,7 +129,7 @@ void KoPagePreview::drawContents( TQPainter *painter )
/*==================== constructor ===============================*/
KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name,
- const KoPageLayout& tqlayout,
+ const KoPageLayout& layout,
const KoHeadFoot& hf, int tabs,
KoUnit::Unit unit, bool modal )
: KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel,
@@ -137,7 +137,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name,
{
flags = tabs;
- m_layout = tqlayout;
+ m_layout = layout;
m_unit = unit;
m_pageSizeTab = 0;
m_columnsTab = 0;
@@ -154,7 +154,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name,
/*==================== constructor ===============================*/
KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name,
- const KoPageLayout& tqlayout,
+ const KoPageLayout& layout,
const KoHeadFoot& hf,
const KoColumns& columns,
const KoKWHeaderFooter& kwhf,
@@ -164,7 +164,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name,
{
flags = tabs;
- m_layout = tqlayout;
+ m_layout = layout;
m_column = columns;
m_unit = unit;
m_pageSizeTab = 0;
@@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia()
}
/*======================= show dialog ============================*/
-bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* parent )
+bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* parent )
{
bool res = false;
- KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", tqlayout, hf, tabs, unit );
+ KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit );
if ( dlg->exec() == TQDialog::Accepted ) {
res = true;
- if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout();
+ if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout();
if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot();
unit = dlg->unit();
}
@@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int ta
}
/*======================= show dialog ============================*/
-bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns,
+bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns,
KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* parent )
{
bool res = false;
- KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit );
+ KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit );
if ( dlg->exec() == TQDialog::Accepted ) {
res = true;
- if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout();
+ if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout();
if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot();
if ( tabs & COLUMNS ) columns = dlg->columns();
if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter();
@@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColu
return res;
}
-/*===================== get a standard page tqlayout ===============*/
+/*===================== get a standard page layout ===============*/
KoPageLayout KoPageLayoutDia::standardLayout()
{
return KoPageLayout::standardLayout();
@@ -261,17 +261,17 @@ void KoPageLayoutDia::setupTab1( bool enableBorders )
this, TQT_SLOT (sizeUpdated( KoPageLayout&)));
}
-void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) {
- m_layout.ptWidth = tqlayout.ptWidth;
- m_layout.ptHeight = tqlayout.ptHeight;
- m_layout.ptLeft = tqlayout.ptLeft;
- m_layout.ptRight = tqlayout.ptRight;
- m_layout.ptTop = tqlayout.ptTop;
- m_layout.ptBottom = tqlayout.ptBottom;
- m_layout.format = tqlayout.format;
- m_layout.orientation = tqlayout.orientation;
+void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) {
+ m_layout.ptWidth = layout.ptWidth;
+ m_layout.ptHeight = layout.ptHeight;
+ m_layout.ptLeft = layout.ptLeft;
+ m_layout.ptRight = layout.ptRight;
+ m_layout.ptTop = layout.ptTop;
+ m_layout.ptBottom = layout.ptBottom;
+ m_layout.format = layout.format;
+ m_layout.orientation = layout.orientation;
if(m_columnsTab)
- m_columnsTab->setLayout(tqlayout);
+ m_columnsTab->setLayout(layout);
}
/*================ setup header and footer tab ===================*/
@@ -282,9 +282,9 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf )
// ------------- header ---------------
TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 );
- gHead->tqlayout()->setSpacing(KDialog::spacingHint());
- gHead->tqlayout()->setMargin(KDialog::marginHint());
- TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 );
+ gHead->layout()->setSpacing(KDialog::spacingHint());
+ gHead->layout()->setMargin(KDialog::marginHint());
+ TQGridLayout *headGrid = new TQGridLayout( gHead->layout(), 2, 3 );
TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead );
headGrid->addWidget( lHeadLeft, 0, 0 );
@@ -311,9 +311,9 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf )
// ------------- footer ---------------
TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 );
- gFoot->tqlayout()->setSpacing(KDialog::spacingHint());
- gFoot->tqlayout()->setMargin(KDialog::marginHint());
- TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 );
+ gFoot->layout()->setSpacing(KDialog::spacingHint());
+ gFoot->layout()->setMargin(KDialog::marginHint());
+ TQGridLayout *footGrid = new TQGridLayout( gFoot->layout(), 2, 3 );
TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot );
footGrid->addWidget( lFootLeft, 0, 0 );
@@ -362,7 +362,7 @@ void KoPageLayoutDia::setupTab3()
TQWidget *tab3 = addPage(i18n( "Col&umns" ));
TQHBoxLayout *lay = new TQHBoxLayout(tab3);
m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout);
- m_columnsTab->tqlayout()->setMargin(0);
+ m_columnsTab->layout()->setMargin(0);
lay->addWidget(m_columnsTab);
m_columnsTab->show();
connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)),
@@ -382,7 +382,7 @@ void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf )
TQWidget *tab4 = addPage(i18n( "H&eader && Footer" ));
TQHBoxLayout *lay = new TQHBoxLayout(tab4);
m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf);
- m_headerTab->tqlayout()->setMargin(0);
+ m_headerTab->layout()->setMargin(0);
lay->addWidget(m_headerTab);
m_headerTab->show();