From 4e56d710f94ab89e5d5baf0ea8db830ad8f3cf58 Mon Sep 17 00:00:00 2001 From: Vadim Kurland Date: Wed, 6 Oct 2010 21:04:52 +0000 Subject: [PATCH] setting an icon for the dialog using standard method --- src/gui/FWWindow.cpp | 25 +++++++++++++++---------- src/gui/main.cpp | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/gui/FWWindow.cpp b/src/gui/FWWindow.cpp index 3307c5411..1a841f249 100644 --- a/src/gui/FWWindow.cpp +++ b/src/gui/FWWindow.cpp @@ -164,7 +164,7 @@ #include #include - + extern bool regCheck(); using namespace libfwbuilder; @@ -550,17 +550,8 @@ void FWWindow::showIntroDialog() // guide on the web site. QMessageBox msg_box; msg_box.setText("" - "" - "" - "" - "" - "" - "
" - "" - "" "

Welcome to Firewall Builder

" "

Quick Start Guide

" - "
" "

" "There is a short online guide that provides basic information " "to help new users save time when first learning " @@ -580,6 +571,20 @@ void FWWindow::showIntroDialog() "" ); + + QPixmap pm; + pm.load(":/Images/fwbuilder3-128x128.png"); + + msg_box.setWindowModality(Qt::ApplicationModal); + msg_box.setWindowFlags( + Qt::Window | + Qt::WindowTitleHint | + Qt::CustomizeWindowHint | + Qt::WindowCloseButtonHint | + Qt::WindowSystemMenuHint); + + msg_box.setWindowTitle(tr("Welcome to Firewall Builder")); + msg_box.setIconPixmap(pm); msg_box.setInformativeText(tr("The guide will open in the web browser")); QCheckBox cb(tr("Do not show this again"), &msg_box); msg_box.addButton(&cb, QMessageBox::ResetRole); // is this role right ? diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 936224edd..127ac89c8 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -221,7 +221,7 @@ int main( int argc, char *argv[] ) print_output_file_name); return 0; } - + if (fwbdebug) qDebug("creating widgets ...");