Mercurial > projects > qtd
comparison demos/browser/settings.d @ 94:87bb4e622f9e
more porting
author | mandel |
---|---|
date | Thu, 28 May 2009 22:11:52 +0000 |
parents | 85c59c4e5f19 |
children | dcd36d8db2da |
comparison
equal
deleted
inserted
replaced
93:55fd7080c4b9 | 94:87bb4e622f9e |
---|---|
41 module settings; | 41 module settings; |
42 | 42 |
43 | 43 |
44 import qt.core.QSettings; | 44 import qt.core.QSettings; |
45 | 45 |
46 import qt.gui.qt.gui; | 46 //import qt.gui.QtGui; //TODO: needed? |
47 import qt.gui.QDialog; | 47 import qt.gui.QDialog; |
48 | 48 |
49 import qt.webkit.QtWebKit; | 49 //import qt.webkit.QtWebKit; //TODO: needed? |
50 | 50 |
51 import browserapplication; | 51 import browserapplication; |
52 import browsermainwindow; | 52 import browsermainwindow; |
53 import cookiejar; | 53 import cookiejar; |
54 import history; | 54 import history; |
55 import networkaccessmanager; | 55 import networkaccessmanager; |
56 import webview; | 56 import webview; |
57 import ui_settings; | 57 import ui_settings; |
58 | 58 |
59 | 59 |
60 class SettingsDialog : public QDialog, public Ui_Settings | 60 class SettingsDialog : public QDialog //, public Ui_Settings |
61 { | 61 { |
62 Settings ui; | |
63 | |
62 public: | 64 public: |
63 | 65 |
64 this(QWidget parent = null) | 66 this(QWidget parent = null) |
65 //: QDialog(parent) | 67 { |
66 { | 68 super(this); |
67 setupUi(this); | 69 ui.setupUi(this); |
68 exceptionsButton.clicked.connect(&this.showExceptions); | 70 exceptionsButton.clicked.connect(&this.showExceptions); |
69 setHomeToCurrentPageButton.clicked.connect(&this.setHomeToCurrentPage); | 71 setHomeToCurrentPageButton.clicked.connect(&this.setHomeToCurrentPage); |
70 cookiesButton.clicked.connect(&this.showCookies()); | 72 cookiesButton.clicked.connect(&this.showCookies()); |
71 standardFontButton.clicked.connect(this.chooseFont); | 73 standardFontButton.clicked.connect(this.chooseFont); |
72 fixedFontButton.clicked.connect(&this.chooseFixedFont); | 74 fixedFontButton.clicked.connect(&this.chooseFixedFont); |
293 void setHomeToCurrentPage() | 295 void setHomeToCurrentPage() |
294 { | 296 { |
295 BrowserMainWindow mw = cast(BrowserMainWindow) parent(); | 297 BrowserMainWindow mw = cast(BrowserMainWindow) parent(); |
296 WebView webView = mw.currentTab(); | 298 WebView webView = mw.currentTab(); |
297 if (webView) | 299 if (webView) |
298 homeLineEdit.setText(webView.url().toString()); | 300 homeLineEdit.setText(webView.getUrl().toString()); |
299 } | 301 } |
300 | 302 |
301 void showCookies() | 303 void showCookies() |
302 { | 304 { |
303 CookiesDialog dialog = new CookiesDialog(BrowserApplication.cookieJar(), this); | 305 CookiesDialog dialog = new CookiesDialog(BrowserApplication.cookieJar(), this); |