diff options
author | deva <deva> | 2005-07-28 12:09:10 +0000 |
---|---|---|
committer | deva <deva> | 2005-07-28 12:09:10 +0000 |
commit | 6be08a50e748fbccd05a0194a65b2721b78c1b76 (patch) | |
tree | 01bbc99f0bc1108b11f49bfc32b1369a696e5be2 /src | |
parent | 1475da2d8d956998e5c210684a49d44df5a9a016 (diff) |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/aboutwindow.cc | 38 | ||||
-rw-r--r-- | src/aboutwindow.h | 9 |
2 files changed, 29 insertions, 18 deletions
diff --git a/src/aboutwindow.cc b/src/aboutwindow.cc index e5a487c..06ebb69 100644 --- a/src/aboutwindow.cc +++ b/src/aboutwindow.cc @@ -34,21 +34,22 @@ #include <config.h> //"miav-grab.h" - +#define MARGIN 12 AboutWindow::AboutWindow( QWidget* parent, const char* name ) : QDialog( parent, name ) { - resize(320,460); setModal(true); - pix_logo = new QPixmap(); - pix_logo->load( PIXMAP_LOGO ); + pix_about = new QPixmap(); + pix_about->load( PIXMAP_ABOUT ); + + resize(pix_about->width(), pix_about->height()); - setBackgroundColor(QColor(150,150,150)); + setBackgroundColor(QColor(200,200,200)); btn_ok = new QPushButton(this); btn_ok->setText("OK"); - btn_ok->move(200, 410); - btn_ok->resize( 95, 40 ); + btn_ok->resize( 140, 50 ); + btn_ok->move(pix_about->width() - btn_ok->width() - MARGIN, pix_about->height() - btn_ok->height() - MARGIN); btn_ok->setFont( QFont( "Arial", 12, QFont::Bold ) ); QObject::connect( btn_ok, SIGNAL(clicked()), this, SLOT(close()) ); @@ -60,24 +61,33 @@ AboutWindow::~AboutWindow() { } +void AboutWindow::mouseReleaseEvent(QMouseEvent *event) +{ + close(); +} + void AboutWindow::paintEvent( QPaintEvent *event ) { + int version_x = 58; + int version_y = 90; + if(!event) return; // Just to get rid og the compile warning! QPainter painter; painter.begin(this); - painter.drawPixmap(-200,-50, *pix_logo); + painter.drawPixmap(0,0, *pix_about); - painter.setBrush( Dense4Pattern ); - painter.drawRect(25,25,270,377); - painter.setBrush( SolidPattern ); painter.setFont( QFont( "Arial", 18, QFont::Bold ) ); painter.setPen( Qt::black ); - painter.drawText(58,58, "MIAV-Grab v" VERSION); + painter.drawText(version_x, version_y, "MIAV-Grab v" VERSION); painter.setPen( Qt::red ); - painter.drawText(60,60, "MIAV-Grab v" VERSION); + painter.drawText(version_x + 2, version_y + 2, "MIAV-Grab v" VERSION); + /* + painter.setBrush( Dense4Pattern ); + painter.drawRect(25,25,270,377); + painter.setPen( Qt::white ); painter.setFont( QFont( "Arial", 11, QFont::Bold ) ); painter.drawText(30,70, 270, 357, 0, ABOUT_INFO); @@ -85,7 +95,7 @@ void AboutWindow::paintEvent( QPaintEvent *event ) painter.setPen( Qt::white ); painter.setFont( QFont( "Arial", 8, QFont::Bold ) ); painter.drawText(30,165, 270, 357, 0, GPL_LICENSE); - + */ painter.end(); } diff --git a/src/aboutwindow.h b/src/aboutwindow.h index ea956a6..f63b4cd 100644 --- a/src/aboutwindow.h +++ b/src/aboutwindow.h @@ -36,8 +36,8 @@ //#include <qtextedit.h> #include <qpushbutton.h> -#define PIXMAP_LOGO PIXMAPS"/miav-logo.png" - +#define PIXMAP_ABOUT PIXMAPS"/about.png" +/* #define ABOUT_INFO "\ Official homepage:\n\ http://www.aasimon.org/miav\n\ @@ -63,7 +63,7 @@ General Public License along with this program;\n\ if not, write to the Free Software Foundation,\n\ Inc., 59 Temple Place - Suite 330, Boston,\n\ MA 02111-1307, USA." - +*/ class AboutWindow : public QDialog { Q_OBJECT @@ -71,10 +71,11 @@ public: AboutWindow(QWidget* parent = 0, const char* name = 0); ~AboutWindow(); virtual void paintEvent( QPaintEvent *event ); + void mouseReleaseEvent(QMouseEvent *event); private: QPushButton *btn_ok; - QPixmap *pix_logo; + QPixmap *pix_about; }; #endif /* __ABOUTWINDOW_H__ */ |