Mercurial > projects > qtd
comparison demos/browser/history.d @ 113:8636c819ce4d
more porting
author | mandel |
---|---|
date | Wed, 03 Jun 2009 14:35:25 +0000 |
parents | dcd36d8db2da |
children | a8d76a9a85aa |
comparison
equal
deleted
inserted
replaced
112:e416c5215366 | 113:8636c819ce4d |
---|---|
1372 } | 1372 } |
1373 | 1373 |
1374 | 1374 |
1375 import ui_history; | 1375 import ui_history; |
1376 | 1376 |
1377 class HistoryDialog : public QDialog//, public Ui_HistoryDialog | 1377 class HistoryDialog : public QDialog //, public Ui_HistoryDialog |
1378 { | 1378 { |
1379 HistoryDialog ui; | 1379 mixin Ui_HistoryDialog; |
1380 | |
1381 mixin Signal!("openUrl", QUrl /*url*/); | 1380 mixin Signal!("openUrl", QUrl /*url*/); |
1382 | 1381 |
1383 public: | 1382 public: |
1384 | 1383 |
1385 this(QWidget parent = null, HistoryManager history = null) | 1384 this(QWidget parent = null, HistoryManager history = null) |
1386 { | 1385 { |
1387 super(parent); | 1386 super(parent); |
1388 HistoryManager history = setHistory; | 1387 HistoryManager history = setHistory; |
1389 if (!history) | 1388 if (!history) |
1390 history = BrowserApplication.historyManager(); | 1389 history = BrowserApplication.historyManager(); |
1391 ui.setupUi(this); | 1390 setupUi(this); |
1392 tree.setUniformRowHeights(true); | 1391 tree.setUniformRowHeights(true); |
1393 tree.setSelectionBehavior(QAbstractItemView.SelectRows); | 1392 tree.setSelectionBehavior(QAbstractItemView.SelectRows); |
1394 tree.setTextElideMode(Qt_TextElideMode.ElideMiddle); | 1393 tree.setTextElideMode(Qt_TextElideMode.ElideMiddle); |
1395 auto model = history.historyTreeModel(); | 1394 auto model = history.historyTreeModel(); |
1396 auto proxyModel = new TreeProxyModel(this); | 1395 auto proxyModel = new TreeProxyModel(this); |