Beispiel #1
0
int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	AppWindow window;
	window.show();
	return app.exec();
}
Beispiel #2
0
int main(int argc, char **argv) {
    AppWindow* win = new AppWindow(215, 144);
    win->begin();
    MenuBar* o = new MenuBar(0, 0, 215, 25);
    o->menu(menu_);

    Fl_Image* img1 = (Fl_Image*)IconLoader::get("document-new", ICON_SIZE_TINY);
    Fl_Image* img2 = (Fl_Image*)IconLoader::get("document-save", ICON_SIZE_SMALL);
    Fl_Image* img3 = (Fl_Image*)IconLoader::get("system-log-out", ICON_SIZE_TINY);

    menu_[1].image(img1);
    menu_[1].tooltip("Tooltip for First Item");
    menu_[2].image(img2);
    menu_[8].image(img3);

    MenuButton* b = new MenuButton(65, 80, 90, 25, "menu");
    b->menu(menu_menu);

    Fl_Image* img4 = (Fl_Image*)IconLoader::get("folder", ICON_SIZE_TINY);
    menu_menu[0].image(img4);
    menu_menu[0].tooltip("This should be some folder");
    win->end();
    win->show(argc, argv);
    return Fl::run();
}
Beispiel #3
0
int _runUI(int argc, char *argv[])
{
    QApplication a(argc, argv);

    ProductRepository<Product*>* repo = new ProductRepository<Product*>("produse.txt", "cantitati.txt");
    Inventory* ctrl = new Inventory(repo);
    AppWindow* GUI = new AppWindow(ctrl);

    //GUI->setMinimumSize(2048, 1024);
    GUI->show();

    return a.exec();
}
Beispiel #4
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    AppWindow window;
    window.resize(window.sizeHint());
        int desktopArea = QApplication::desktop()->width() *
                          QApplication::desktop()->height();

        int widgetArea = window.width() * window.height();

        if (((float)widgetArea / (float) desktopArea) < 0.75f) {
            window.show();
        } else {
            window.showMaximized();
        }

        return app.exec();
}
Beispiel #5
0
int main( int argc, char* argv[] )
{
    QApplication app( argc, argv );

    if (argc < 2 || !QFile::exists(QString(argv[1])) )
    {
        QMessageBox msgBox;
        msgBox.setWindowTitle("Crash Reporter");
        msgBox.setText(
                    "<b>Usage:</b> <br />"
                    " crashReporter <i>minidumpPath</i> [<i>crashedApplicationPath</i>]\n"
                    "<br /> <br /> <b>Example:</b> <br />"
                    " crashReporter 0120EDSDSD3.dmp [/usr/share/appFolder/app]\n"
                    "<br /><br /> <b> More info </b>: <a href='https://github.com/RedisDesktop/CrashReporter'>https://github.com/RedisDesktop/CrashReporter</a>"
                    );
        msgBox.exec();
        return 1;
    }

    Config crashReporterConfig = {
        "RedisDesktopManager",
        "http://redisdesktop.com/crash-report",
        QString(RDM_VERSION),
        QString(argv[1])
    };

    QApplication::setApplicationName(QString("%1 Crash Reporter").arg(crashReporterConfig.productName));
    QApplication::setApplicationVersion("1.0.0");

    CrashReporter reporter(crashReporterConfig);
    AppWindow window;

    QObject::connect(&reporter, &CrashReporter::success, &window, &AppWindow::onSuccess);
    QObject::connect(&reporter, &CrashReporter::error, &window, &AppWindow::onError);
    QObject::connect(&reporter, &CrashReporter::uploadingProgress, &window, &AppWindow::onProgress);

    QTimer::singleShot( 1, &reporter, SLOT( send() ) );
    window.show();

    return app.exec();
}