Changeset 998 in ntrip for trunk/BNS/bnswindow.cpp


Ignore:
Timestamp:
Jul 29, 2008, 11:15:18 AM (16 years ago)
Author:
weber
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnswindow.cpp

    r981 r998  
    5656};
    5757
     58// Flowchart Dialog - Constructor
     59////////////////////////////////////////////////////////////////////////////
     60bnsFlowchartDlg::bnsFlowchartDlg(QWidget* parent) :
     61   QDialog(parent) {
     62
     63  int ww = QFontMetrics(font()).width('w');
     64  QPushButton* _closeButton = new QPushButton("Close");
     65  _closeButton->setMaximumWidth(10*ww);
     66  connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
     67
     68  QGridLayout* dlgLayout = new QGridLayout();
     69  QLabel* img = new QLabel();
     70  img->setPixmap(QPixmap(":bnsflowchart.png"));
     71  dlgLayout->addWidget(img, 0,0);
     72  dlgLayout->addWidget(_closeButton,1,0,Qt::AlignLeft);
     73
     74  setLayout(dlgLayout);
     75  show();
     76}
     77
     78// Flowchart Dialog - Destructor
     79////////////////////////////////////////////////////////////////////////////
     80bnsFlowchartDlg::~bnsFlowchartDlg() {
     81};
     82
    5883// Constructor
    5984////////////////////////////////////////////////////////////////////////////
     
    84109  _actAbout = new QAction(tr("&About BNS"),this);
    85110  connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
     111
     112  _actFlowchart = new QAction(tr("&Flow Chart"),this);
     113  connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
    86114
    87115  _actFontSel = new QAction(tr("Select &Font"),this);
     
    367395}
    368396
     397//Flowchart
     398////////////////////////////////////////////////////////////////////////////
     399void bnsWindow::slotFlowchart() {
     400 new bnsFlowchartDlg(0);
     401}
     402
    369403// Help Window
    370404////////////////////////////////////////////////////////////////////////////
     
    407441  _menuHlp = menuBar()->addMenu(tr("&Help"));
    408442  _menuHlp->addAction(_actHelp);
     443  _menuHlp->addAction(_actFlowchart);
    409444  _menuHlp->addAction(_actAbout);
    410445}
Note: See TracChangeset for help on using the changeset viewer.