#!/usr/local/bin/ruby =begin /**************************************************************************** ** $Id: qt/examples/helpviewer/main.cpp 2.2.2 edited 2000-08-31 $ ** ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified without limitation. ** *****************************************************************************/ =end #include "helpwindow.h" #include #include #include #include require "qt2" include Qt2 require "helpwindow_lib.rb" require "env" QApplication::setColorSpec( QApplication::ManyColor ) a = QApplication.new([$0]+ARGV) if (ARGV.size >= 1) home = ARGV[0] else home = $QTDIR + "/doc/html/index.html" end help = HelpWindow.new(nil, "help viewer") help.setHomePath(home,".") if ( QApplication::desktop().width() > 400 && QApplication::desktop().height() > 500 ) help.show() else help.showMaximized() end Qt2::connect( a, QSIGNAL("lastWindowClosed()"), a, QSLOT("quit()") ) a.exec()