ViewSettingsPageBase(parent),
m_iconSizeGroupBox(0),
m_fontRequester(0),
- m_columnWidthSlider(0)
+ m_textWidthBox(0)
{
const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint();
this, SIGNAL(changed()));
// create "Text" properties
- QGroupBox* textBox = new QGroupBox(i18nc("@title:group", "Text"), this);
- textBox->setSizePolicy(sizePolicy);
+ QGroupBox* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this);
+ textGroup->setSizePolicy(sizePolicy);
- QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textBox);
- m_fontRequester = new DolphinFontRequester(textBox);
+ QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup);
+ m_fontRequester = new DolphinFontRequester(textGroup);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
- QHBoxLayout* textLayout = new QHBoxLayout(textBox);
- textLayout->addWidget(fontLabel);
- textLayout->addWidget(m_fontRequester);
+ QLabel* textWidthLabel = new QLabel(i18nc("@label:listbox", "Text width:"), textGroup);
+ m_textWidthBox = new QComboBox(textGroup);
+ m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Small"));
+ m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium"));
+ m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large"));
+ connect(m_textWidthBox, SIGNAL(activated(int)), this, SIGNAL(changed()));
- // create "Column Width" properties
- QGroupBox* columnWidthBox = new QGroupBox(i18nc("@title:group", "Column Width"), this);
- columnWidthBox->setSizePolicy(sizePolicy);
-
- QLabel* smallLabel = new QLabel(i18nc("@item:inrange Column Width", "Small"), columnWidthBox);
- m_columnWidthSlider = new QSlider(Qt::Horizontal, columnWidthBox);
- m_columnWidthSlider->setMinimum(0);
- m_columnWidthSlider->setMaximum(5);
- m_columnWidthSlider->setPageStep(1);
- m_columnWidthSlider->setTickPosition(QSlider::TicksBelow);
- QLabel* largeLabel = new QLabel(i18nc("@item:inrange Column Width", "Large"), columnWidthBox);
- connect(m_columnWidthSlider, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
-
- QHBoxLayout* columnWidthLayout = new QHBoxLayout(columnWidthBox);
- columnWidthLayout->addWidget(smallLabel);
- columnWidthLayout->addWidget(m_columnWidthSlider);
- columnWidthLayout->addWidget(largeLabel);
+ QGridLayout* textGroupLayout = new QGridLayout(textGroup);
+ textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight);
+ textGroupLayout->addWidget(m_fontRequester, 0, 1);
+ textGroupLayout->addWidget(textWidthLabel, 1, 0, Qt::AlignRight);
+ textGroupLayout->addWidget(m_textWidthBox, 1, 1);
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
settings->setItalicFont(font.italic());
settings->setFontWeight(font.weight());
- const int columnWidth = 150 + (m_columnWidthSlider->value() * 50);
- settings->setColumnWidth(columnWidth);
+ // TODO:
+ //const int columnWidth = 150 + (m_columnWidthSlider->value() * 50);
+ //settings->setColumnWidth(columnWidth);
}
void ColumnViewSettingsPage::restoreDefaults()
m_fontRequester->setCustomFont(font);
}
- m_columnWidthSlider->setValue((settings->columnWidth() - 150) / 50);
+ // TODO:
+ //m_columnWidthSlider->setValue((settings->columnWidth() - 150) / 50);
}
#include "columnviewsettingspage.moc"
class DolphinMainWindow;
class DolphinFontRequester;
class IconSizeGroupBox;
-class QSlider;
+class QComboBox;
/**
* @brief Represents the page from the Dolphin Settings which allows
private:
IconSizeGroupBox* m_iconSizeGroupBox;
DolphinFontRequester* m_fontRequester;
- QSlider* m_columnWidthSlider;
+ QComboBox* m_textWidthBox;
};
#endif
this, SIGNAL(changed()));
// create "Text" properties
- QGroupBox* textBox = new QGroupBox(i18nc("@title:group", "Text"), this);
- textBox->setSizePolicy(sizePolicy);
-
- QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textBox);
- m_fontRequester = new DolphinFontRequester(textBox);
+ QWidget* textGroup = new QWidget(this);
+ textGroup->setSizePolicy(sizePolicy);
+
+ QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup);
+ m_fontRequester = new DolphinFontRequester(textGroup);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
- QHBoxLayout* textLayout = new QHBoxLayout(textBox);
- textLayout->addWidget(fontLabel);
+ QHBoxLayout* textLayout = new QHBoxLayout(textGroup);
+ textLayout->addWidget(fontLabel, 0, Qt::AlignRight);
textLayout->addWidget(m_fontRequester);
-
+
// create "Expandable Folders" checkbox
m_expandableFolders = new QCheckBox(i18nc("@option:check", "Expandable Folders"), this);
connect(m_expandableFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
this, SIGNAL(defaultSizeChanged(int)));
QGridLayout* layout = new QGridLayout(this);
- layout->addWidget(defaultLabel, 0, 0);
+ layout->addWidget(defaultLabel, 0, 0, Qt::AlignRight);
layout->addWidget(m_defaultSizeSlider, 0, 1);
- layout->addWidget(previewLabel, 1, 0);
+ layout->addWidget(previewLabel, 1, 0, Qt::AlignRight);
layout->addWidget(m_previewSizeSlider, 1, 1);
}
connect(m_textWidthBox, SIGNAL(activated(int)), this, SIGNAL(changed()));
QGridLayout* textGroupLayout = new QGridLayout(textGroup);
- textGroupLayout->addWidget(fontLabel, 0, 0);
+ textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight);
textGroupLayout->addWidget(m_fontRequester, 0, 1);
- textGroupLayout->addWidget(textlinesCountLabel, 1, 0);
+ textGroupLayout->addWidget(textlinesCountLabel, 1, 0, Qt::AlignRight);
textGroupLayout->addWidget(m_textlinesCountBox, 1, 1);
- textGroupLayout->addWidget(textWidthLabel, 2, 0);
+ textGroupLayout->addWidget(textWidthLabel, 2, 0, Qt::AlignRight);
textGroupLayout->addWidget(m_textWidthBox, 2, 1);
// create the 'Grid' group for selecting the arrangement and the grid spacing
connect(m_gridSpacingBox, SIGNAL(activated(int)), this, SIGNAL(changed()));
QGridLayout* gridGroupLayout = new QGridLayout(gridGroup);
- gridGroupLayout->addWidget(arrangementLabel, 0, 0);
+ gridGroupLayout->addWidget(arrangementLabel, 0, 0, Qt::AlignRight);
gridGroupLayout->addWidget(m_arrangementBox, 0, 1);
- gridGroupLayout->addWidget(gridSpacingLabel, 1, 0);
+ gridGroupLayout->addWidget(gridSpacingLabel, 1, 0, Qt::AlignRight);
gridGroupLayout->addWidget(m_gridSpacingBox, 1, 1);
// Add a dummy widget with no restriction regarding
sortingBox->setLayout(sortingLayout);
QGridLayout* propsGridLayout = new QGridLayout(propsGrid);
- propsGridLayout->addWidget(viewModeLabel, 0, 0);
+ propsGridLayout->addWidget(viewModeLabel, 0, 0, Qt::AlignRight);
propsGridLayout->addWidget(m_viewMode, 0, 1);
- propsGridLayout->addWidget(sortingLabel, 1, 0);
+ propsGridLayout->addWidget(sortingLabel, 1, 0, Qt::AlignRight);
propsGridLayout->addWidget(sortingBox, 1, 1);
QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox);