Changeset View
Changeset View
Standalone View
Standalone View
addons/katesql/dataoutputwidget.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 54 | { | |||
---|---|---|---|---|---|
63 | toolbar->setIconSize(QSize(16, 16)); | 63 | toolbar->setIconSize(QSize(16, 16)); | ||
64 | 64 | | |||
65 | /// TODO: disable actions if no results are displayed or selected | 65 | /// TODO: disable actions if no results are displayed or selected | ||
66 | 66 | | |||
67 | QAction *action; | 67 | QAction *action; | ||
68 | 68 | | |||
69 | action = new QAction( QIcon::fromTheme(QLatin1String("distribute-horizontal-x")), i18nc("@action:intoolbar", "Resize columns to contents"), this); | 69 | action = new QAction( QIcon::fromTheme(QLatin1String("distribute-horizontal-x")), i18nc("@action:intoolbar", "Resize columns to contents"), this); | ||
70 | toolbar->addAction(action); | 70 | toolbar->addAction(action); | ||
71 | connect(action, SIGNAL(triggered()), this, SLOT(resizeColumnsToContents())); | 71 | connect(action, &QAction::triggered, this, &DataOutputWidget::resizeColumnsToContents); | ||
72 | 72 | | |||
73 | action = new QAction( QIcon::fromTheme(QLatin1String("distribute-vertical-y")), i18nc("@action:intoolbar", "Resize rows to contents"), this); | 73 | action = new QAction( QIcon::fromTheme(QLatin1String("distribute-vertical-y")), i18nc("@action:intoolbar", "Resize rows to contents"), this); | ||
74 | toolbar->addAction(action); | 74 | toolbar->addAction(action); | ||
75 | connect(action, SIGNAL(triggered()), this, SLOT(resizeRowsToContents())); | 75 | connect(action, &QAction::triggered, this, &DataOutputWidget::resizeRowsToContents); | ||
76 | 76 | | |||
77 | action = new QAction( QIcon::fromTheme(QLatin1String("edit-copy")), i18nc("@action:intoolbar", "Copy"), this); | 77 | action = new QAction( QIcon::fromTheme(QLatin1String("edit-copy")), i18nc("@action:intoolbar", "Copy"), this); | ||
78 | toolbar->addAction(action); | 78 | toolbar->addAction(action); | ||
79 | m_view->addAction(action); | 79 | m_view->addAction(action); | ||
80 | connect(action, SIGNAL(triggered()), this, SLOT(slotCopySelected())); | 80 | connect(action, &QAction::triggered, this, &DataOutputWidget::slotCopySelected); | ||
81 | 81 | | |||
82 | action = new QAction( QIcon::fromTheme(QLatin1String("document-export-table")), i18nc("@action:intoolbar", "Export..."), this); | 82 | action = new QAction( QIcon::fromTheme(QLatin1String("document-export-table")), i18nc("@action:intoolbar", "Export..."), this); | ||
83 | toolbar->addAction(action); | 83 | toolbar->addAction(action); | ||
84 | m_view->addAction(action); | 84 | m_view->addAction(action); | ||
85 | connect(action, SIGNAL(triggered()), this, SLOT(slotExport())); | 85 | connect(action, &QAction::triggered, this, &DataOutputWidget::slotExport); | ||
86 | 86 | | |||
87 | action = new QAction( QIcon::fromTheme(QLatin1String("edit-clear")), i18nc("@action:intoolbar", "Clear"), this); | 87 | action = new QAction( QIcon::fromTheme(QLatin1String("edit-clear")), i18nc("@action:intoolbar", "Clear"), this); | ||
88 | toolbar->addAction(action); | 88 | toolbar->addAction(action); | ||
89 | connect(action, SIGNAL(triggered()), this, SLOT(clearResults())); | 89 | connect(action, &QAction::triggered, this, &DataOutputWidget::clearResults); | ||
90 | 90 | | |||
91 | toolbar->addSeparator(); | 91 | toolbar->addSeparator(); | ||
92 | 92 | | |||
93 | KToggleAction *toggleAction = new KToggleAction( QIcon::fromTheme(QLatin1String("applications-education-language")), i18nc("@action:intoolbar", "Use system locale"), this); | 93 | KToggleAction *toggleAction = new KToggleAction( QIcon::fromTheme(QLatin1String("applications-education-language")), i18nc("@action:intoolbar", "Use system locale"), this); | ||
94 | toolbar->addAction(toggleAction); | 94 | toolbar->addAction(toggleAction); | ||
95 | connect(toggleAction, SIGNAL(triggered()), this, SLOT(slotToggleLocale())); | 95 | connect(action, &QAction::triggered, this, &DataOutputWidget::slotToggleLocale); | ||
96 | 96 | | |||
97 | m_dataLayout->addWidget(m_view); | 97 | m_dataLayout->addWidget(m_view); | ||
98 | 98 | | |||
99 | layout->addWidget(toolbar); | 99 | layout->addWidget(toolbar); | ||
100 | layout->addLayout(m_dataLayout); | 100 | layout->addLayout(m_dataLayout); | ||
101 | layout->setContentsMargins(0, 0, 0, 0); | 101 | layout->setContentsMargins(0, 0, 0, 0); | ||
102 | 102 | | |||
103 | setLayout(layout); | 103 | setLayout(layout); | ||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |