int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QSplashScreen *splash =
new QSplashScreen(QPixmap::fromMimeSource("splash.png"));
splash->show();
splash->message(QObject::tr("Setting up the main window..."),
Qt::AlignRight | Qt::AlignTop, Qt::white);
MainWindow mainWin;
app.setMainWidget(&mainWin);
splash->message(QObject::tr("Loading modules..."),
Qt::AlignRight | Qt::AlignTop, Qt::white);
loadModules();
splash->message(QObject::tr("Establishing connections..."),
Qt::AlignRight | Qt::AlignTop, Qt::white);
establishConnections();
mainWin.show();
splash->finish(&mainWin);
delete splash;
return app.exec();
}
Просмотров:
1761
|
Добавил:
qt-boy
|
Дата:
12.09.2010
|
|
void MainWindow::writeSettings()
{
QSettings settings;
settings.setPath("software-inc.com", "Spreadsheet");
settings.beginGroup("/Spreadsheet");
settings.writeEntry("/geometry/x", x());
settings.writeEntry("/geometry/y", y());
settings.writeEntry("/geometry/width", width());
settings.writeEntry("/geometry/height", height());
settings.writeEntry("/recentFiles", recentFiles);
settings.writeEntry("/showGrid", showGridAct->isOn());
settings.writeEntry("/autoRecalc", showGridAct->isOn());
settings.endGroup();
}
void MainWindow::readSettings()
{
QSettings settings;
settings.setPath("software-inc.com", "Spreadsheet");
settings.beginGroup("/Spreadsheet");
int x = settings.readNumEntry("/geometry/x", 200);
int y = settings.readNumEntry("/geometry/y", 200);
int w = settings.readNumEntry("/geometry/width", 400);
int h = settings.readNumEntry("/geometry/height", 400);
move(x, y);
resize(w, h);
recentFiles = settings.re
...
Читать дальше »
Просмотров:
1618
|
Добавил:
qt-boy
|
Дата:
12.09.2010
|
| |