diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-27 00:40:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-27 00:40:29 +0000 |
commit | 7a741e43ff09e70396a918956219b8316c48e522 (patch) | |
tree | 3d0f60eccd59786cea7236db2d5c4c1f25874515 /src/dolphiniconsviewsettings.cpp | |
parent | a48487ef0c329434b58b6f920111bb0999f1109e (diff) | |
download | dolphin-7a741e43ff09e70396a918956219b8316c48e522.tar.gz dolphin-7a741e43ff09e70396a918956219b8316c48e522.zip |
TQt4 port Dolphin
This enables compilation under Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/dolphin@1229359 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/dolphiniconsviewsettings.cpp')
-rw-r--r-- | src/dolphiniconsviewsettings.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dolphiniconsviewsettings.cpp b/src/dolphiniconsviewsettings.cpp index d47f0f7..e764e70 100644 --- a/src/dolphiniconsviewsettings.cpp +++ b/src/dolphiniconsviewsettings.cpp @@ -25,8 +25,8 @@ #include <assert.h> DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode mode) : - m_arrangement(QIconView::LeftToRight), - m_layoutMode(mode), + m_arrangement(TQIconView::LeftToRight), + m_tqlayoutMode(mode), m_iconSize(KIcon::SizeMedium), m_previewSize(KIcon::SizeMedium), m_gridWidth(0), @@ -45,12 +45,12 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode } // read arrangement - const QString arrangement(config->readEntry("Arrangement")); + const TQString arrangement(config->readEntry("Arrangement")); if (arrangement == "Left to Right") { - m_arrangement = QIconView::LeftToRight; + m_arrangement = TQIconView::LeftToRight; } else if (arrangement == "Top to Bottom") { - m_arrangement = QIconView::TopToBottom; + m_arrangement = TQIconView::TopToBottom; } // read preview size, grid width and grid height @@ -79,7 +79,7 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode m_fontSize = config->readNumEntry("Font Size", -1); m_fontFamily = config->readEntry("Font Family"); - const QFont font(KGlobalSettings::generalFont()); + const TQFont font(KGlobalSettings::generalFont()); if (m_fontSize < 0) { m_fontSize = font.pointSize(); } @@ -121,7 +121,7 @@ void DolphinIconsViewSettings::save() setConfigGroup(config); config->writeEntry("Icon Size", m_iconSize); - if (m_arrangement == QIconView::LeftToRight) { + if (m_arrangement == TQIconView::LeftToRight) { config->writeEntry("Arrangement", "Left to Right"); } else { @@ -140,7 +140,7 @@ void DolphinIconsViewSettings::save() void DolphinIconsViewSettings::calculateGridSize(int hint) { const int maxSize = (m_previewSize > m_iconSize) ? m_previewSize : m_iconSize; - if (m_arrangement == QIconView::LeftToRight) { + if (m_arrangement == TQIconView::LeftToRight) { int widthUnit = maxSize + (maxSize / 2); if (widthUnit < KIcon::SizeLarge) { widthUnit = KIcon::SizeLarge; @@ -157,7 +157,7 @@ void DolphinIconsViewSettings::calculateGridSize(int hint) } } else { - assert(m_arrangement == QIconView::TopToBottom); + assert(m_arrangement == TQIconView::TopToBottom); m_gridWidth = maxSize + (hint + 1) * (8 * m_fontSize); // The height-setting is ignored yet by KFileIconView if the TopToBottom @@ -170,7 +170,7 @@ int DolphinIconsViewSettings::textWidthHint() const { const int maxSize = (m_previewSize > m_iconSize) ? m_previewSize : m_iconSize; int hint = 0; - if (m_arrangement == QIconView::LeftToRight) { + if (m_arrangement == TQIconView::LeftToRight) { int widthUnit = maxSize + (maxSize / 2); if (widthUnit < KIcon::SizeLarge) { widthUnit = KIcon::SizeLarge; @@ -178,7 +178,7 @@ int DolphinIconsViewSettings::textWidthHint() const hint = (m_gridWidth - widthUnit) / KIcon::SizeLarge; } else { - assert(m_arrangement == QIconView::TopToBottom); + assert(m_arrangement == TQIconView::TopToBottom); hint = (m_gridWidth - maxSize) / (8 * m_fontSize) - 1; if (hint > 2) { hint = 2; @@ -189,7 +189,7 @@ int DolphinIconsViewSettings::textWidthHint() const void DolphinIconsViewSettings::setConfigGroup(KConfig* config) { - if (m_layoutMode == DolphinIconsView::Previews) { + if (m_tqlayoutMode == DolphinIconsView::Previews) { config->setGroup("Previews Mode"); } else { |