- Timestamp:
- Mar 30, 2008, 3:58:56 PM (17 years ago)
- Location:
- trunk/BNS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bnswindow.cpp
r753 r754 23 23 24 24 using namespace std; 25 26 // About Dialog - Constructor 27 //////////////////////////////////////////////////////////////////////////// 28 bnsAboutDlg::bnsAboutDlg(QWidget* parent) : 29 QDialog(parent) { 30 31 QTextBrowser* tb = new QTextBrowser; 32 QUrl url; url.setPath(":bnsabout.html"); 33 tb->setSource(url); 34 tb->setReadOnly(true); 35 36 int ww = QFontMetrics(font()).width('w'); 37 QPushButton* _closeButton = new QPushButton("Close"); 38 _closeButton->setMaximumWidth(10*ww); 39 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close())); 40 41 QGridLayout* dlgLayout = new QGridLayout(); 42 QLabel* img = new QLabel(); 43 img->setPixmap(QPixmap(":ntrip-logo.png")); 44 dlgLayout->addWidget(img, 0,0); 45 dlgLayout->addWidget(new QLabel("BKG NTRIP Server (BNS) Version 1.0"), 0,1); 46 dlgLayout->addWidget(tb,1,0,1,2); 47 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight); 48 49 setLayout(dlgLayout); 50 resize(60*ww, 60*ww); 51 show(); 52 } 53 54 // About Dialog - Destructor 55 //////////////////////////////////////////////////////////////////////////// 56 bnsAboutDlg::~bnsAboutDlg() { 57 }; 25 58 26 59 // Constructor … … 234 267 } 235 268 236 // About Dialog - Constructor237 ////////////////////////////////////////////////////////////////////////////238 bnsAboutDlg::bnsAboutDlg(QWidget* parent) :239 QDialog(parent) {240 241 QTextBrowser* tb = new QTextBrowser;242 QUrl url; url.setPath(":bnsabout.html");243 tb->setSource(url);244 tb->setReadOnly(true);245 246 int ww = QFontMetrics(font()).width('w');247 QPushButton* _closeButton = new QPushButton("Close");248 _closeButton->setMaximumWidth(10*ww);249 connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));250 251 QGridLayout* dlgLayout = new QGridLayout();252 QLabel* img = new QLabel();253 img->setPixmap(QPixmap(":ntrip-logo.png"));254 dlgLayout->addWidget(img, 0,0);255 dlgLayout->addWidget(new QLabel("BKG NTRIP Server (BNS) Version 1.0"), 0,1);256 dlgLayout->addWidget(tb,1,0,1,2);257 dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight);258 259 setLayout(dlgLayout);260 resize(60*ww, 60*ww);261 show();262 }263 264 // About Dialog - Constructor265 ////////////////////////////////////////////////////////////////////////////266 bnsAboutDlg::~bnsAboutDlg() {267 };268 269 269 // Display Program Messages 270 270 //////////////////////////////////////////////////////////////////////////// 271 271 void bnsWindow::slotMessage(const QByteArray msg) { 272 273 ((bnsApp*)qApp)->slotMessage(msg); 272 274 273 275 const int maxBufferSize = 10000; … … 299 301 _actStop->setEnabled(true); 300 302 301 302 303 slotMessage("============ Start BNS ============"); 303 ((bnsApp*)qApp)->slotMessage("============ Start BNS ============"); 304 305 } 304 } -
trunk/BNS/bnswindow.h
r752 r754 28 28 void slotSaveOptions(); 29 29 void slotWhatsThis(); 30 void slotStart(); 31 void slotStop(); 30 32 31 33 protected: … … 44 46 QAction* _actSaveOpt; 45 47 QAction* _actQuit; 46 QAction* _actwhatsthis; 48 QAction* _actWhatsThis; 49 QAction* _actStart; 50 QAction* _actStop; 47 51 48 52 QWidget* _canvas;
Note:
See TracChangeset
for help on using the changeset viewer.