void DragWidgetDir::BuildWindow() { // Create the window JXWindow* window = new JXWindow(this, 300,200, "Drag Painter Program"); assert( window != NULL ); // Give the window to the director SetWindow(window); // Set the window sizing window->SetMinSize(300,200); window->SetMaxSize(800,600); // Create the scrollbar set JXScrollbarSet* scrollbarSet = new JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 300,200); assert( scrollbarSet != NULL ); // Create the custom widget with the scrollbarset as its enclosure DragWidget* widget = new DragWidget(scrollbarSet, scrollbarSet->GetScrollEnclosure(), JXWidget::kHElastic, JXWidget::kVElastic, 0, 0, 10, 10); assert( widget != NULL ); // Fit the widget within the scrollbarset enclosure widget->FitToEnclosure(kJTrue, kJTrue); }
int main(int argc, char *argv[]) { Q_INIT_RESOURCE(draggabletext); QApplication app(argc, argv); DragWidget window; window.show(); return app.exec(); }
int main(int argc, char *argv[]) { Q_INIT_RESOURCE(fridgemagnets); QApplication app(argc, argv); DragWidget window; window.show(); return app.exec(); }
int main(int argc, char *argv[]) { Q_INIT_RESOURCE(draggabletext); QApplication app(argc, argv); DragWidget window; #ifdef Q_OS_SYMBIAN window.showMaximized(); #else window.show(); #endif return app.exec(); }
int main(int argc, char *argv[]) { Q_INIT_RESOURCE(fridgemagnets); bool smallScreen = false; for (int i=0; i<argc; i++) if (QString(argv[i]) == "-small-screen") smallScreen = true; QApplication app(argc, argv); #ifdef QT_KEYPAD_NAVIGATION QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); #endif DragWidget window; if (smallScreen) window.showFullScreen(); else window.show(); return app.exec(); }