Changeset View
Changeset View
Standalone View
Standalone View
src/kedittoolbar.cpp
Show First 20 Lines • Show All 338 Lines • ▼ Show 20 Line(s) | |||||
339 | ToolBarItem *ToolBarListWidget::currentItem() const | 339 | ToolBarItem *ToolBarListWidget::currentItem() const | ||
340 | { | 340 | { | ||
341 | return static_cast<ToolBarItem *>(QListWidget::currentItem()); | 341 | return static_cast<ToolBarItem *>(QListWidget::currentItem()); | ||
342 | } | 342 | } | ||
343 | 343 | | |||
344 | IconTextEditDialog::IconTextEditDialog(QWidget *parent) | 344 | IconTextEditDialog::IconTextEditDialog(QWidget *parent) | ||
345 | : QDialog(parent) | 345 | : QDialog(parent) | ||
346 | { | 346 | { | ||
347 | setWindowTitle(i18n("Change Text")); | 347 | setWindowTitle(i18nc("@title:window", "Change Text")); | ||
348 | setModal(true); | 348 | setModal(true); | ||
349 | 349 | | |||
350 | QVBoxLayout *layout = new QVBoxLayout; | 350 | QVBoxLayout *layout = new QVBoxLayout; | ||
351 | setLayout(layout); | 351 | setLayout(layout); | ||
352 | 352 | | |||
353 | QGridLayout *grid = new QGridLayout; | 353 | QGridLayout *grid = new QGridLayout; | ||
354 | grid->setContentsMargins(0, 0, 0, 0); | 354 | grid->setContentsMargins(0, 0, 0, 0); | ||
355 | 355 | | |||
356 | m_lineEdit = new QLineEdit(this); | 356 | m_lineEdit = new QLineEdit(this); | ||
357 | m_lineEdit->setClearButtonEnabled(true); | 357 | m_lineEdit->setClearButtonEnabled(true); | ||
358 | QLabel *label = new QLabel(i18n("Icon te&xt:"), this); | 358 | QLabel *label = new QLabel(i18n("Icon te&xt:"), this); | ||
359 | label->setBuddy(m_lineEdit); | 359 | label->setBuddy(m_lineEdit); | ||
360 | grid->addWidget(label, 0, 0); | 360 | grid->addWidget(label, 0, 0); | ||
361 | grid->addWidget(m_lineEdit, 0, 1); | 361 | grid->addWidget(m_lineEdit, 0, 1); | ||
362 | 362 | | |||
363 | m_cbHidden = new QCheckBox(i18n("&Hide text when toolbar shows text alongside icons"), this); | 363 | m_cbHidden = new QCheckBox(i18nc("@option:check", "&Hide text when toolbar shows text alongside icons"), this); | ||
364 | grid->addWidget(m_cbHidden, 1, 1); | 364 | grid->addWidget(m_cbHidden, 1, 1); | ||
365 | 365 | | |||
366 | layout->addLayout(grid); | 366 | layout->addLayout(grid); | ||
367 | 367 | | |||
368 | m_buttonBox = new QDialogButtonBox(this); | 368 | m_buttonBox = new QDialogButtonBox(this); | ||
369 | m_buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); | 369 | m_buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); | ||
370 | connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); | 370 | connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); | ||
371 | connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); | 371 | connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); | ||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Line(s) | |||||
608 | 608 | | |||
609 | void KEditToolBarPrivate::init() | 609 | void KEditToolBarPrivate::init() | ||
610 | { | 610 | { | ||
611 | m_accept = false; | 611 | m_accept = false; | ||
612 | m_factory = nullptr; | 612 | m_factory = nullptr; | ||
613 | 613 | | |||
614 | q->setDefaultToolBar(QString()); | 614 | q->setDefaultToolBar(QString()); | ||
615 | 615 | | |||
616 | q->setWindowTitle(i18n("Configure Toolbars")); | 616 | q->setWindowTitle(i18nc("@title:window", "Configure Toolbars")); | ||
617 | q->setModal(false); | 617 | q->setModal(false); | ||
618 | 618 | | |||
619 | m_layout = new QVBoxLayout; | 619 | m_layout = new QVBoxLayout; | ||
620 | q->setLayout(m_layout); | 620 | q->setLayout(m_layout); | ||
621 | 621 | | |||
622 | m_layout->addWidget(m_widget); | 622 | m_layout->addWidget(m_widget); | ||
623 | 623 | | |||
624 | m_buttonBox = new QDialogButtonBox(q); | 624 | m_buttonBox = new QDialogButtonBox(q); | ||
▲ Show 20 Lines • Show All 429 Lines • ▼ Show 20 Line(s) | 1053 | QObject::connect(m_activeList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), | |||
1054 | m_widget, SLOT(slotRemoveButton())); | 1054 | m_widget, SLOT(slotRemoveButton())); | ||
1055 | QObject::connect(m_activeList, SIGNAL(dropped(ToolBarListWidget*,int,ToolBarItem*,bool)), | 1055 | QObject::connect(m_activeList, SIGNAL(dropped(ToolBarListWidget*,int,ToolBarItem*,bool)), | ||
1056 | m_widget, SLOT(slotDropped(ToolBarListWidget*,int,ToolBarItem*,bool))); | 1056 | m_widget, SLOT(slotDropped(ToolBarListWidget*,int,ToolBarItem*,bool))); | ||
1057 | 1057 | | |||
1058 | KListWidgetSearchLine *activeListSearchLine = new KListWidgetSearchLine(m_widget, m_activeList); | 1058 | KListWidgetSearchLine *activeListSearchLine = new KListWidgetSearchLine(m_widget, m_activeList); | ||
1059 | activeListSearchLine->setPlaceholderText(i18n("Filter")); | 1059 | activeListSearchLine->setPlaceholderText(i18n("Filter")); | ||
1060 | 1060 | | |||
1061 | // "change icon" button | 1061 | // "change icon" button | ||
1062 | m_changeIcon = new QPushButton(i18n("Change &Icon..."), m_widget); | 1062 | m_changeIcon = new QPushButton(i18nc("@action:button", "Change &Icon..."), m_widget); | ||
1063 | m_changeIcon->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-icons"))); | 1063 | m_changeIcon->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-icons"))); | ||
1064 | m_changeIcon->setEnabled(m_activeList->currentItem()); | 1064 | m_changeIcon->setEnabled(m_activeList->currentItem()); | ||
1065 | 1065 | | |||
1066 | QObject::connect(m_changeIcon, SIGNAL(clicked()), | 1066 | QObject::connect(m_changeIcon, SIGNAL(clicked()), | ||
1067 | m_widget, SLOT(slotChangeIcon())); | 1067 | m_widget, SLOT(slotChangeIcon())); | ||
1068 | 1068 | | |||
1069 | // "change icon text" button | 1069 | // "change icon text" button | ||
1070 | m_changeIconText = new QPushButton(i18n("Change Te&xt..."), m_widget); | 1070 | m_changeIconText = new QPushButton(i18nc("@action:button", "Change Te&xt..."), m_widget); | ||
1071 | m_changeIconText->setIcon(QIcon::fromTheme(QStringLiteral("edit-rename"))); | 1071 | m_changeIconText->setIcon(QIcon::fromTheme(QStringLiteral("edit-rename"))); | ||
1072 | m_changeIconText->setEnabled(m_activeList->currentItem() != nullptr); | 1072 | m_changeIconText->setEnabled(m_activeList->currentItem() != nullptr); | ||
1073 | 1073 | | |||
1074 | QObject::connect(m_changeIconText, SIGNAL(clicked()), | 1074 | QObject::connect(m_changeIconText, SIGNAL(clicked()), | ||
1075 | m_widget, SLOT(slotChangeIconText())); | 1075 | m_widget, SLOT(slotChangeIconText())); | ||
1076 | 1076 | | |||
1077 | // The buttons in the middle | 1077 | // The buttons in the middle | ||
1078 | 1078 | | |||
▲ Show 20 Lines • Show All 665 Lines • Show Last 20 Lines |