File indexing completed on 2024-04-28 05:41:40
0001 /* 0002 This file is part of KCachegrind. 0003 0004 SPDX-FileCopyrightText: 2009-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de> 0005 0006 SPDX-License-Identifier: GPL-2.0-only 0007 */ 0008 0009 /* 0010 * Base class of a subpage in the configuration dialog 0011 */ 0012 0013 #include "configpage.h" 0014 0015 #include <QLabel> 0016 #include <QWidget> 0017 0018 // 0019 // ConfigPage 0020 // 0021 0022 ConfigPage::ConfigPage(QWidget* parent, QString title, QString longTitle) 0023 : QWidget(parent) 0024 { 0025 _title = title; 0026 if (longTitle.isEmpty()) 0027 _longTitle = title; 0028 else 0029 _longTitle = longTitle; 0030 } 0031 0032 void ConfigPage::activate(QString s) 0033 { 0034 QWidget* w = _names.value(s); 0035 if (w) w->setFocus(); 0036 } 0037 0038 bool ConfigPage::check(QString&, QString&) 0039 { 0040 return true; 0041 } 0042 0043 void ConfigPage::accept() 0044 {} 0045 0046 QString ConfigPage::inRangeError(int from, int to) 0047 { 0048 return tr("Value must be between %1 and %2.").arg(from).arg(to); 0049 } 0050 0051 #include "moc_configpage.cpp"