mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
@@ -113,6 +113,15 @@ QStringList windowsForType(int type)
|
||||
return returning;
|
||||
}
|
||||
|
||||
QString
|
||||
GcWindowRegistry::title(GcWinID id)
|
||||
{
|
||||
for(int i=0; GcWindows[i].relevance; i++) {
|
||||
if (GcWindows[i].relevance && GcWindows[i].id == id)
|
||||
return GcWindows[i].name;
|
||||
}
|
||||
}
|
||||
|
||||
QList<GcWinID> idsForType(int type)
|
||||
{
|
||||
QList<GcWinID> returning;
|
||||
|
||||
@@ -84,6 +84,7 @@ class GcWindowRegistry {
|
||||
static GcWindow *newGcWindow(GcWinID id, Context *context);
|
||||
static QStringList windowsForType(int type);
|
||||
static QList<GcWinID> idsForType(int type);
|
||||
static QString title(GcWinID id);
|
||||
};
|
||||
|
||||
extern GcWindowRegistry* GcWindows;
|
||||
|
||||
@@ -1041,6 +1041,7 @@ GcWindowDialog::GcWindowDialog(GcWinID type, Context *context, GcWindow **here)
|
||||
|
||||
title = new QLineEdit(this);
|
||||
chartLayout->addWidget(title);
|
||||
title->setText(GcWindowRegistry::title(type));
|
||||
|
||||
win = GcWindowRegistry::newGcWindow(type, context);
|
||||
chartLayout->addWidget(win);
|
||||
|
||||
Reference in New Issue
Block a user