22 lines
357 B
C++
22 lines
357 B
C++
#include "tycho.h"
|
|
|
|
QIcon getIcon(QString const &name)
|
|
{
|
|
auto res = ":/tycho/icons/" + name + ".png";
|
|
|
|
if(QFile(res).exists()) {
|
|
return QIcon(res);
|
|
} else {
|
|
return QIcon::fromTheme(name);
|
|
}
|
|
}
|
|
|
|
extern "C" {
|
|
void critical_msg(char const *title, char const *msg)
|
|
{
|
|
QMessageBox::critical(nullptr, QObject::tr(title), QObject::tr(msg));
|
|
}
|
|
}
|
|
|
|
// EOF
|