changeset 72:b149ef2cb18b

more porting
author mandel
date Wed, 20 May 2009 22:44:31 +0000
parents 9071511f7a5b
children 7bfd46c330dc
files demos/browser/addbookmarkdialog.ui demos/browser/bookmarks.d demos/browser/bookmarks.ui demos/browser/cookies.ui demos/browser/cookiesexceptions.ui demos/browser/downloaditem.ui demos/browser/downloads.ui demos/browser/history.d demos/browser/history.ui demos/browser/passworddialog.ui demos/browser/proxy.ui demos/browser/searchlineedit.d demos/browser/settings.ui demos/browser/ui_downloaditem.d
diffstat 14 files changed, 2081 insertions(+), 607 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/addbookmarkdialog.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,98 @@
+<ui version="4.0" >
+ <class>AddBookmarkDialog</class>
+ <widget class="QDialog" name="AddBookmarkDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>240</width>
+    <height>168</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Add Bookmark</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout" >
+   <item>
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>Type a name for the bookmark, and choose where to keep it.</string>
+     </property>
+     <property name="textFormat" >
+      <enum>Qt::PlainText</enum>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="name" />
+   </item>
+   <item>
+    <widget class="QComboBox" name="location" />
+   </item>
+   <item>
+    <spacer name="verticalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+     <property name="centerButtons" >
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>AddBookmarkDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>AddBookmarkDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- a/demos/browser/bookmarks.d	Wed May 20 21:06:33 2009 +0000
+++ b/demos/browser/bookmarks.d	Wed May 20 22:44:31 2009 +0000
@@ -39,34 +39,36 @@
 **
 ****************************************************************************/
 
-import QtCore.QObject;
-import QtCore.QAbstractItemModel;
+module bookmarks;
 
-import QtGui.QUndoCommand;
 
+import qt.core.QObject;
+import qt.core.QAbstractItemModel;
+
+import qt.gui.QUndoCommand;
+
+import qt.core.QBuffer;
+import qt.core.QFile;
+import qt.core.QMimeData;
+
+import qt.gui.QDesktopServices;
+import qt.gui.QDragEnterEvent;
+import qt.gui.QFileDialog;
+import qt.gui.QHeaderView;
+import qt.gui.QIcon;
+import qt.gui.QMessageBox;
+import qt.gui.QToolButton;
+
+import QtWebKit.QWebSettings;
+
+import qt.core.QDebug;
 
 import bookmarks;
-
 import autosaver;
 import browserapplication;
 import history;
 import xbel;
 
-import QtCore.QBuffer;
-import QtCore.QFile;
-import QtCore.QMimeData;
-
-import QtGui.QDesktopServices;
-import QtGui.QDragEnterEvent;
-import QtGui.QFileDialog;
-import QtGui.QHeaderView;
-import QtGui.QIcon;
-import QtGui.QMessageBox;
-import QtGui.QToolButton;
-
-import QtWebKit.QWebSettings;
-
-import QtCore.QDebug;
 
 const char[] BOOKMARKBAR = "Bookmarks Bar";
 const char[] BOOKMARKMENU = "Bookmarks Menu";
@@ -75,34 +77,25 @@
 /*!
     Bookmark manager, owner of the bookmarks, loads, saves and basic tasks
   */
-  /*
-class AutoSaver;
-class BookmarkNode;
-class BookmarksModel;
-*/
+
 class BookmarksManager : public QObject
 {
-    Q_OBJECT
-
-signals:
-    void entryAdded(BookmarkNode *item);
-    void entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item);
-    void entryChanged(BookmarkNode *item);
+	
+   mixin Signal!("entryAdded", BookmarkNode item);
+     mixin Signal!("entryRemoved", BookmarkNode parent, int row, BookmarkNode item);
+     mixin Signal!("entryChanged", BookmarkNode item);
 
 public:
-    BookmarksManager(QObject *parent = null)
+    BookmarksManager(QObject parent = null)
 {
 	super(parent);
 	m_loaded = false;
 	m_saveTimer = new AutoSaver(this);
 	m_bookmarkRootNode = null;
 	m_bookmarkModel = null;
-    connect(this, SIGNAL(entryAdded(BookmarkNode *)),
-            m_saveTimer, SLOT(changeOccurred()));
-    connect(this, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)),
-            m_saveTimer, SLOT(changeOccurred()));
-    connect(this, SIGNAL(entryChanged(BookmarkNode *)),
-            m_saveTimer, SLOT(changeOccurred()));
+    this.entryAdded.connect(&m_saveTimer.changeOccurred);
+    this.entryRemoved.connect(&m_saveTimer.changeOccurred);
+    this.entryChanged.connect(&m_saveTimer.changeOccurred);
 }
 
 
@@ -112,46 +105,46 @@
 }
 
 
-    void addBookmark(BookmarkNode *parent, BookmarkNode *node, int row = -1)
+    void addBookmark(BookmarkNode parent, BookmarkNode node, int row = -1)
 {
     if (!m_loaded)
         return;
-    Q_ASSERT(parent);
-    InsertBookmarksCommand *command = new InsertBookmarksCommand(this, parent, node, row);
+    assert(parent);
+    InsertBookmarksCommand command = new InsertBookmarksCommand(this, parent, node, row);
     m_commands.push(command);
 }
 
 
-    void removeBookmark(BookmarkNode *node);
+    void removeBookmark(BookmarkNode node);
 {
     if (!m_loaded)
         return;
 
-    Q_ASSERT(node);
-    BookmarkNode *parent = node.parent();
+    assert(node);
+    BookmarkNode parent = node.parent();
     int row = parent.children().indexOf(node);
-    RemoveBookmarksCommand *command = new RemoveBookmarksCommand(this, parent, row);
+    RemoveBookmarksCommand command = new RemoveBookmarksCommand(this, parent, row);
     m_commands.push(command);
 }
 
-    void setTitle(BookmarkNode *node, QString &newTitle);
+    void setTitle(BookmarkNode node, QString newTitle);
 {
     if (!m_loaded)
         return;
 
-    Q_ASSERT(node);
-    ChangeBookmarkCommand *command = new ChangeBookmarkCommand(this, node, newTitle, true);
+    assert(node);
+    ChangeBookmarkCommand command = new ChangeBookmarkCommand(this, node, newTitle, true);
     m_commands.push(command);
 }
 
 
-    void setUrl(BookmarkNode *node, QString &newUrl);
+    void setUrl(BookmarkNode node, QString newUrl);
 {
     if (!m_loaded)
         return;
 
-    Q_ASSERT(node);
-    ChangeBookmarkCommand *command = new ChangeBookmarkCommand(this, node, newUrl, false);
+    assert(node);
+    ChangeBookmarkCommand command = new ChangeBookmarkCommand(this, node, newUrl, false);
     m_commands.push(command);
 }
 
@@ -161,84 +154,84 @@
     m_saveTimer.changeOccurred();
 }
 
-    BookmarkNode *bookmarks();
+    BookmarkNode bookmarks();
 {
     if (!m_loaded)
         load();
     return m_bookmarkRootNode;
 }
 
-    BookmarkNode *menu();
+    BookmarkNode menu();
 {
     if (!m_loaded)
         load();
 
     for (int i = m_bookmarkRootNode.children().count() - 1; i >= 0; --i) {
-        BookmarkNode *node = m_bookmarkRootNode.children().at(i);
+        BookmarkNode node = m_bookmarkRootNode.children().at(i);
         if (node.title == tr(BOOKMARKMENU))
             return node;
     }
-    Q_ASSERT(false);
+    assert(false);
     return 0;
 }
 
-    BookmarkNode *toolbar();
+    BookmarkNode toolbar();
 {
     if (!m_loaded)
         load();
 
     for (int i = m_bookmarkRootNode.children().count() - 1; i >= 0; --i) {
-        BookmarkNode *node = m_bookmarkRootNode.children().at(i);
+        BookmarkNode node = m_bookmarkRootNode.children().at(i);
         if (node.title == tr(BOOKMARKBAR))
             return node;
     }
-    Q_ASSERT(false);
+    assert(false);
     return 0;
 }
 
-BookmarksModel* bookmarksModel()
+BookmarksModel bookmarksModel()
 {
     if (!m_bookmarkModel)
         m_bookmarkModel = new BookmarksModel(this, this);
     return m_bookmarkModel;
 }
 
-    QUndoStack *undoRedoStack() { return &m_commands; };
+    QUndoStack undoRedoStack() { return m_commands; };
 
 public slots:
     void importBookmarks()
 {
-    QString fileName = QFileDialog::getOpenFileName(0, tr("Open File"),
+    QString fileName = QFileDialog.getOpenFileName(0, tr("Open File"),
                                                      QString(),
                                                      tr("XBEL (*.xbel *.xml)"));
     if (fileName.isEmpty())
         return;
 
     XbelReader reader;
-    BookmarkNode *importRootNode = reader.read(fileName);
-    if (reader.error() != QXmlStreamReader::NoError) {
-        QMessageBox::warning(0, QLatin1String("Loading Bookmark"),
+    BookmarkNode importRootNode = reader.read(fileName);
+    if (reader.error() != QXmlStreamReader.NoError) {
+        QMessageBox.warning(0, QLatin1String("Loading Bookmark"),
             tr("Error when loading bookmarks on line %1, column %2:\n"
                "%3").arg(reader.lineNumber()).arg(reader.columnNumber()).arg(reader.errorString()));
     }
 
-    importRootNode.setType(BookmarkNode::Folder);
-    importRootNode.title = (tr("Imported %1").arg(QDate::currentDate().toString(Qt.SystemLocaleShortDate)));
+    importRootNode.setType(BookmarkNode.Folder);
+    importRootNode.title = (tr("Imported %1").arg(QDate.currentDate().toString(Qt.SystemLocaleShortDate)));
     addBookmark(menu(), importRootNode);
 }
 
 
     void exportBookmarks()
 {
-    QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
-                                tr("%1 Bookmarks.xbel").arg(QCoreApplication::applicationName()),
+    QString fileName = QFileDialog.getSaveFileName(0, tr("Save File"),
+                                tr("%1 Bookmarks.xbel").arg(QCoreApplication.applicationName()),
                                 tr("XBEL (*.xbel *.xml)"));
     if (fileName.isEmpty())
         return;
 
     XbelWriter writer;
     if (!writer.write(fileName, m_bookmarkRootNode))
-        QMessageBox::critical(0, tr("Export error"), tr("error saving bookmarks"));
+        QMessageBox.critical(0, tr("Export error"), tr("error saving bookmarks"));
 }
 
 private slots:
@@ -248,7 +241,7 @@
         return;
 
     XbelWriter writer;
-    QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+    QString dir = QDesktopServices.storageLocation(QDesktopServices.DataLocation);
     QString bookmarkFile = dir + QLatin1String("/bookmarks.xbel");
     if (!writer.write(bookmarkFile, m_bookmarkRootNode))
         qWarning() << "BookmarkManager: error saving to" << bookmarkFile;
@@ -261,25 +254,25 @@
         return;
     m_loaded = true;
 
-    QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
+    QString dir = QDesktopServices.storageLocation(QDesktopServices.DataLocation);
     QString bookmarkFile = dir + QLatin1String("/bookmarks.xbel");
-    if (!QFile::exists(bookmarkFile))
+    if (!QFile.exists(bookmarkFile))
         bookmarkFile = QLatin1String(":defaultbookmarks.xbel");
 
     XbelReader reader;
     m_bookmarkRootNode = reader.read(bookmarkFile);
-    if (reader.error() != QXmlStreamReader::NoError) {
-        QMessageBox::warning(0, QLatin1String("Loading Bookmark"),
+    if (reader.error() != QXmlStreamReader.NoError) {
+        QMessageBox.warning(0, QLatin1String("Loading Bookmark"),
             tr("Error when loading bookmarks on line %1, column %2:\n"
                "%3").arg(reader.lineNumber()).arg(reader.columnNumber()).arg(reader.errorString()));
     }
 
-    BookmarkNode *toolbar = null;
-    BookmarkNode *menu = null;
-    QList<BookmarkNode*> others;
+    BookmarkNode toolbar = null;
+    BookmarkNode menu = null;
+    QList<BookmarkNode> others;
     for (int i = m_bookmarkRootNode.children().count() - 1; i >= 0; --i) {
-        BookmarkNode *node = m_bookmarkRootNode.children().at(i);
-        if (node.type() == BookmarkNode::Folder) {
+        BookmarkNode node = m_bookmarkRootNode.children().at(i);
+        if (node.type() == BookmarkNode.Folder) {
             // Automatically convert
             if (node.title == tr("Toolbar Bookmarks") && !toolbar) {
                 node.title = tr(BOOKMARKBAR);
@@ -300,16 +293,16 @@
         }
         m_bookmarkRootNode.remove(node);
     }
-    Q_ASSERT(m_bookmarkRootNode.children().count() == 0);
+    assert(m_bookmarkRootNode.children().count() == 0);
     if (!toolbar) {
-        toolbar = new BookmarkNode(BookmarkNode::Folder, m_bookmarkRootNode);
+        toolbar = new BookmarkNode(BookmarkNode.Folder, m_bookmarkRootNode);
         toolbar.title = tr(BOOKMARKBAR);
     } else {
         m_bookmarkRootNode.add(toolbar);
     }
 
     if (!menu) {
-        menu = new BookmarkNode(BookmarkNode::Folder, m_bookmarkRootNode);
+        menu = new BookmarkNode(BookmarkNode.Folder, m_bookmarkRootNode);
         menu.title = tr(BOOKMARKMENU);
     } else {
         m_bookmarkRootNode.add(menu);
@@ -321,22 +314,22 @@
 
 
     bool m_loaded;
-    AutoSaver *m_saveTimer;
-    BookmarkNode *m_bookmarkRootNode;
-    BookmarksModel *m_bookmarkModel;
+    AutoSaver m_saveTimer;
+    BookmarkNode m_bookmarkRootNode;
+    BookmarksModel m_bookmarkModel;
     QUndoStack m_commands;
 
     friend class RemoveBookmarksCommand;
     friend class ChangeBookmarkCommand;
-};
+}
 
 class RemoveBookmarksCommand : public QUndoCommand
 {
 
 public:
-    this(BookmarksManager *m_bookmarkManagaer, BookmarkNode *parent, int row)
+    this(BookmarksManager m_bookmarkManagaer, BookmarkNode parent, int row)
 {
-	super(BookmarksManager::tr("Remove Bookmark"))
+	super(BookmarksManager.tr("Remove Bookmark"))
 	m_row = row;
 	m_bookmarkManagaer = m_bookmarkManagaer;
 	m_node = parent.children().value(row);
@@ -367,9 +360,9 @@
 
 protected:
     int m_row;
-    BookmarksManager *m_bookmarkManagaer;
-    BookmarkNode *m_node;
-    BookmarkNode *m_parent;
+    BookmarksManager m_bookmarkManagaer;
+    BookmarkNode m_node;
+    BookmarkNode m_parent;
     bool m_done;
 };
 
@@ -377,25 +370,25 @@
 {
 
 public:
-this(BookmarksManager *m_bookmarkManagaer,
-                BookmarkNode *parent, BookmarkNode *node, int row)
+this(BookmarksManager m_bookmarkManagaer,
+                BookmarkNode parent, BookmarkNode node, int row)
 {
 	super(m_bookmarkManagaer, parent, row);
 	
-    setText(BookmarksManager::tr("Insert Bookmark"));
+    setText(BookmarksManager.tr("Insert Bookmark"));
     m_node = node;
 }
 
-    void undo() { RemoveBookmarksCommand::redo(); }
-    void redo() { RemoveBookmarksCommand::undo(); }
+    void undo() { RemoveBookmarksCommand.redo(); }
+    void redo() { RemoveBookmarksCommand.undo(); }
 }
 
 class ChangeBookmarkCommand : public QUndoCommand
 {
 
 public:
-    this(BookmarksManager *m_bookmarkManagaer,
-        BookmarkNode *node, QString &newValue, bool title)
+    this(BookmarksManager m_bookmarkManagaer,
+        BookmarkNode node, QString newValue, bool title)
 {
 	super();
 	m_bookmarkManagaer = m_bookmarkManagaer;
@@ -404,10 +397,10 @@
     m_node = node;
     if (m_title) {
         m_oldValue = m_node.title;
-        setText(BookmarksManager::tr("Name Change"));
+        setText(BookmarksManager.tr("Name Change"));
     } else {
         m_oldValue = m_node.url;
-        setText(BookmarksManager::tr("Address Change"));
+        setText(BookmarksManager.tr("Address Change"));
     }
 }
 
@@ -430,27 +423,27 @@
 }
 
 private:
-    BookmarksManager *m_bookmarkManagaer;
+    BookmarksManager m_bookmarkManagaer;
     bool m_title;
     QString m_oldValue;
     QString m_newValue;
-    BookmarkNode *m_node;
+    BookmarkNode m_node;
 }
 
 /*!
     BookmarksModel is a QAbstractItemModel wrapper around the BookmarkManager
   */
-import QtGui/QIcon;
+import qt.gui.QIcon;
+
 class BookmarksModel : public QAbstractItemModel
 {
-    Q_OBJECT
 
-public slots:
-    void entryAdded(BookmarkNode *item)
+public:
+    void entryAdded(BookmarkNode item)
 {
-    Q_ASSERT(item && item.parent());
+    assert(item && item.parent());
     int row = item.parent().children().indexOf(item);
-    BookmarkNode *parent = item.parent();
+    BookmarkNode parent = item.parent();
     // item was already added so remove beore beginInsertRows is called
     parent.remove(item);
     beginInsertRows(index(parent), row, row);
@@ -459,7 +452,7 @@
 }
 
 
-    void entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item);
+    void entryRemoved(BookmarkNode parent, int row, BookmarkNode item);
 {
     // item was already removed, re-add so beginRemoveRows works
     parent.add(item, row);
@@ -468,7 +461,7 @@
     endRemoveRows();
 }
 
-    void entryChanged(BookmarkNode *item);
+    void entryChanged(BookmarkNode item);
 {
     QModelIndex idx = index(item);
     emit dataChanged(idx, idx);
@@ -479,23 +472,20 @@
         UrlRole = Qt.UserRole + 2,
         UrlStringRole = Qt.UserRole + 3,
         SeparatorRole = Qt.UserRole + 4
-    };
+    }
 
-    BookmarksModel(BookmarksManager *bookmarkManager, QObject *parent = null)
+    BookmarksModel(BookmarksManager bookmarkManager, QObject parent = null)
 {
 	super(parent)
     m_endMacro = false;
     m_bookmarksManager = bookmarkManager;
-    connect(bookmarkManager, SIGNAL(entryAdded(BookmarkNode *)),
-            this, SLOT(entryAdded(BookmarkNode *)));
-    connect(bookmarkManager, SIGNAL(entryRemoved(BookmarkNode *, int, BookmarkNode *)),
-            this, SLOT(entryRemoved(BookmarkNode *, int, BookmarkNode *)));
-    connect(bookmarkManager, SIGNAL(entryChanged(BookmarkNode *)),
-            this, SLOT(entryChanged(BookmarkNode *)));
+    bookmarkManager.entryAdded.connect(&this.entryAdded);
+	bookmarkManager.entryRemoved.connect(&this.entryRemoved);
+	bookmarkManager.entryChanged.connect(&this.entryChanged);
 }
     
     
-    inline BookmarksManager *bookmarksManager() { return m_bookmarksManager; }
+    inline BookmarksManager bookmarksManager() { return m_bookmarksManager; }
 
     QVariant headerData(int section, Qt.Orientation orientation, int role = Qt.DisplayRole);
 {
@@ -505,20 +495,20 @@
             case 1: return tr("Address");
         }
     }
-    return QAbstractItemModel::headerData(section, orientation, role);
+    return QAbstractItemModel.headerData(section, orientation, role);
 }
     
     
-    QVariant data(QModelIndex &index, int role = Qt.DisplayRole)
+    QVariant data(QModelIndex index, int role = Qt.DisplayRole)
 {
     if (!index.isValid() || index.model() != this)
         return QVariant();
 
-    BookmarkNode *bookmarkNode = node(index);
+    BookmarkNode bookmarkNode = node(index);
     switch (role) {
     case Qt.EditRole:
     case Qt.DisplayRole:
-        if (bookmarkNode.type() == BookmarkNode::Separator) {
+        if (bookmarkNode.type() == BookmarkNode.Separator) {
             switch (index.column()) {
             case 0: return QString(50, 0xB7);
             case 1: return QString();
@@ -530,35 +520,35 @@
         case 1: return bookmarkNode.url;
         }
         break;
-    case BookmarksModel::UrlRole:
+    case BookmarksModel.UrlRole:
         return QUrl(bookmarkNode.url);
         break;
-    case BookmarksModel::UrlStringRole:
+    case BookmarksModel.UrlStringRole:
         return bookmarkNode.url;
         break;
-    case BookmarksModel::TypeRole:
+    case BookmarksModel.TypeRole:
         return bookmarkNode.type();
         break;
-    case BookmarksModel::SeparatorRole:
-        return (bookmarkNode.type() == BookmarkNode::Separator);
+    case BookmarksModel.SeparatorRole:
+        return (bookmarkNode.type() == BookmarkNode.Separator);
         break;
     case Qt.DecorationRole:
         if (index.column() == 0) {
-            if (bookmarkNode.type() == BookmarkNode::Folder)
-                return QApplication::style().standardIcon(QStyle::SP_DirIcon);
-            return BrowserApplication::instance().icon(bookmarkNode.url);
+            if (bookmarkNode.type() == BookmarkNode.Folder)
+                return QApplication.style().standardIcon(QStyle.SP_DirIcon);
+            return BrowserApplication.instance().icon(bookmarkNode.url);
         }
     }
 
     return QVariant();
 }
 
-    int columnCount(QModelIndex &parent = QModelIndex())
+    int columnCount(QModelIndex parent = QModelIndex())
 {
     return (parent.column() > 0) ? 0 : 2;
 }
 
-    int rowCount(QModelIndex &parent = QModelIndex())
+    int rowCount(QModelIndex parent = QModelIndex())
 {
     if (parent.column() > 0)
         return 0;
@@ -566,7 +556,7 @@
     if (!parent.isValid())
         return m_bookmarksManager.bookmarks().children().count();
 
-    const BookmarkNode *item = static_cast<BookmarkNode*>(parent.internalPointer());
+    const BookmarkNode item = static_cast<BookmarkNode>(parent.internalPointer());
     return item.children().count();
 }
 
@@ -576,7 +566,7 @@
         return QModelIndex();
 
     // get the parent node
-    BookmarkNode *parentNode = node(parent);
+    BookmarkNode parentNode = node(parent);
     return createIndex(row, column, parentNode.children().at(row));
 }
 
@@ -585,32 +575,31 @@
     if (!index.isValid())
         return QModelIndex();
 
-    BookmarkNode *itemNode = node(index);
-    BookmarkNode *parentNode = (itemNode ? itemNode.parent() : 0);
+    BookmarkNode itemNode = node(index);
+    BookmarkNode parentNode = (itemNode ? itemNode.parent() : 0);
     if (!parentNode || parentNode == m_bookmarksManager.bookmarks())
         return QModelIndex();
 
     // get the parent's row
-    BookmarkNode *grandParentNode = parentNode.parent();
+    BookmarkNode grandParentNode = parentNode.parent();
     int parentRow = grandParentNode.children().indexOf(parentNode);
-    Q_ASSERT(parentRow >= 0);
+    assert(parentRow >= 0);
     return createIndex(parentRow, 0, parentNode);
 }
 
 
-    Qt.ItemFlags flags(QModelIndex &index)
+    Qt.ItemFlags flags(QModelIndex index)
 {
     if (!index.isValid())
         return Qt.NoItemFlags;
 
     Qt.ItemFlags flags = Qt.ItemIsSelectable | Qt.ItemIsEnabled;
 
-    BookmarkNode *bookmarkNode = node(index);
+    BookmarkNode bookmarkNode = node(index);
 
-    if (bookmarkNode != m_bookmarksManager.menu()
-        && bookmarkNode != m_bookmarksManager.toolbar()) {
+    if (bookmarkNode != m_bookmarksManager.menu() && bookmarkNode != m_bookmarksManager.toolbar()) {
         flags |= Qt.ItemIsDragEnabled;
-        if (bookmarkNode.type() != BookmarkNode::Separator)
+        if (bookmarkNode.type() != BookmarkNode.Separator)
             flags |= Qt.ItemIsEditable;
     }
     if (hasChildren(index))
@@ -624,14 +613,14 @@
 }
 
 
-    bool removeRows(int row, int count, QModelIndex &parent = QModelIndex());
+    bool removeRows(int row, int count, QModelIndex parent = QModelIndex());
 {
     if (row < 0 || count <= 0 || row + count > rowCount(parent))
         return false;
 
-    BookmarkNode *bookmarkNode = node(parent);
+    BookmarkNode bookmarkNode = node(parent);
     for (int i = row + count - 1; i >= row; --i) {
-        BookmarkNode *node = bookmarkNode.children().at(i);
+        BookmarkNode node = bookmarkNode.children().at(i);
         if (node == m_bookmarksManager.menu()
             || node == m_bookmarksManager.toolbar())
             continue;
@@ -645,12 +634,12 @@
     return true;
 }
     
-    bool setData(QModelIndex &index, QVariant &value, int role = Qt.EditRole)
+    bool setData(QModelIndex index, QVariant value, int role = Qt.EditRole)
 {
     if (!index.isValid() || (flags(index) & Qt.ItemIsEditable) == 0)
         return false;
 
-    BookmarkNode *item = node(index);
+    BookmarkNode item = node(index);
 
     switch (role) {
     case Qt.EditRole:
@@ -664,10 +653,10 @@
             break;
         }
         return false;
-    case BookmarksModel::UrlRole:
+    case BookmarksModel.UrlRole:
         m_bookmarksManager.setUrl(item, value.toUrl().toString());
         break;
-    case BookmarksModel::UrlStringRole:
+    case BookmarksModel.UrlStringRole:
         m_bookmarksManager.setUrl(item, value.toString());
         break;
     default:
@@ -679,19 +668,19 @@
 }
 
 
-    QMimeData *mimeData(QModelIndexList &indexes);
+    QMimeData mimeData(QModelIndexList indexes);
 {
-    QMimeData *mimeData = new QMimeData();
+    QMimeData mimeData = new QMimeData();
     QByteArray data;
-    QDataStream stream(&data, QIODevice::WriteOnly);
+    QDataStream stream(&data, QIODevice.WriteOnly);
     foreach (QModelIndex index, indexes) {
         if (index.column() != 0 || !index.isValid())
             continue;
         QByteArray encodedData;
         QBuffer buffer(&encodedData);
-        buffer.open(QBuffer::ReadWrite);
+        buffer.open(QBuffer.ReadWrite);
         XbelWriter writer;
-        const BookmarkNode *parentNode = node(index);
+        const BookmarkNode parentNode = node(index);
         writer.write(&buffer, parentNode);
         stream << encodedData;
     }
@@ -700,7 +689,7 @@
 }
 
 
-#define MIMETYPE QLatin1String("application/bookmarks.xbel")
+const char[] MIMETYPE = QLatin1String("application/bookmarks.xbel")
 
 QStringList mimeTypes()
 {
@@ -709,37 +698,36 @@
     return types;
 }
 
-bool dropMimeData(QMimeData *data,  Qt.DropAction action, int row, int column, QModelIndex &parent)
+bool dropMimeData(QMimeData data,  Qt.DropAction action, int row, int column, QModelIndex parent)
 {
     if (action == Qt.IgnoreAction)
         return true;
 
-    if (!data.hasFormat(MIMETYPE)
-        || column > 0)
+    if (!data.hasFormat(MIMETYPE) || column > 0)
         return false;
 
     QByteArray ba = data.data(MIMETYPE);
-    QDataStream stream(&ba, QIODevice::ReadOnly);
+    QDataStream stream(&ba, QIODevice.ReadOnly);
     if (stream.atEnd())
         return false;
 
-    QUndoStack *undoStack = m_bookmarksManager.undoRedoStack();
+    QUndoStack undoStack = m_bookmarksManager.undoRedoStack();
     undoStack.beginMacro(QLatin1String("Move Bookmarks"));
 
     while (!stream.atEnd()) {
         QByteArray encodedData;
         stream >> encodedData;
         QBuffer buffer(&encodedData);
-        buffer.open(QBuffer::ReadOnly);
+        buffer.open(QBuffer.ReadOnly);
 
         XbelReader reader;
-        BookmarkNode *rootNode = reader.read(&buffer);
-        QList<BookmarkNode*> children = rootNode.children();
+        BookmarkNode rootNode = reader.read(&buffer);
+        QList<BookmarkNode> children = rootNode.children();
         for (int i = 0; i < children.count(); ++i) {
-            BookmarkNode *bookmarkNode = children.at(i);
+            BookmarkNode bookmarkNode = children.at(i);
             rootNode.remove(bookmarkNode);
             row = qMax(0, row);
-            BookmarkNode *parentNode = node(parent);
+            BookmarkNode parentNode = node(parent);
             m_bookmarksManager.addBookmark(parentNode, bookmarkNode, row);
             m_endMacro = true;
         }
@@ -749,25 +737,25 @@
 }
 
 
-    bool hasChildren(QModelIndex &parent = QModelIndex())
+    bool hasChildren(QModelIndex parent = QModelIndex())
 {
     if (!parent.isValid())
         return true;
-    const BookmarkNode *parentNode = node(parent);
-    return (parentNode.type() == BookmarkNode::Folder);
+    const BookmarkNode parentNode = node(parent);
+    return (parentNode.type() == BookmarkNode.Folder);
 }
 
-    BookmarkNode *node(QModelIndex &index)
+    BookmarkNode node(QModelIndex index)
 {
-    BookmarkNode *itemNode = static_cast<BookmarkNode*>(index.internalPointer());
+    BookmarkNode itemNode = static_cast<BookmarkNode>(index.internalPointer());
     if (!itemNode)
         return m_bookmarksManager.bookmarks();
     return itemNode;
 }
 
-    QModelIndex index(BookmarkNode *node)
+    QModelIndex index(BookmarkNode node)
 {
-    BookmarkNode *parent = node.parent();
+    BookmarkNode parent = node.parent();
     if (!parent)
         return QModelIndex();
     return createIndex(parent.children().indexOf(node), 0, node);
@@ -776,30 +764,26 @@
 private:
 
     bool m_endMacro;
-    BookmarksManager *m_bookmarksManager;
+    BookmarksManager m_bookmarksManager;
 }
 
 // Menu that is dynamically populated from the bookmarks
 import modelmenu;
 class BookmarksMenu : public ModelMenu
 {
-    Q_OBJECT
-
-signals:
-    void openUrl(QUrl &url);
+    mixin Signal!("openUrl", QUrl url);
 
 public:
-     BookmarksMenu(QWidget *parent = null)
+     BookmarksMenu(QWidget parent = null)
 {
 super(parent);	
 	m_bookmarksManager = 0;
-    connect(this, SIGNAL(activated(QModelIndex &)),
-            this, SLOT(activated(QModelIndex &)));
+    this.activated.connect(&this.activated);
     setMaxRows(-1);
-    setHoverRole(BookmarksModel::UrlStringRole);
-    setSeparatorRole(BookmarksModel::SeparatorRole);
+    setHoverRole(BookmarksModel.UrlStringRole);
+    setSeparatorRole(BookmarksModel.SeparatorRole);
 }
-     void setInitialActions(QList<QAction*> actions);
+     void setInitialActions(QList<QAction> actions);
 {
     m_initialActions = actions;
     for (int i = 0; i < m_initialActions.count(); ++i)
@@ -808,7 +792,7 @@
 protected:
 	bool prePopulated()
 {
-    m_bookmarksManager = BrowserApplication::bookmarksManager();
+    m_bookmarksManager = BrowserApplication.bookmarksManager();
     setModel(m_bookmarksManager.bookmarksModel());
     setRootIndex(m_bookmarksManager.bookmarksModel().index(1, 0));
     // initial actions
@@ -821,35 +805,36 @@
 }
 
 private slots:
-    void activated(QModelIndex &index)
+    void activated(QModelIndex index)
 {
-    emit openUrl(index.data(BookmarksModel::UrlRole).toUrl());
+    emit openUrl(index.data(BookmarksModel.UrlRole).toUrl());
 }
 
 private:
-    BookmarksManager *m_bookmarksManager;
-    QList<QAction*> m_initialActions;
+    BookmarksManager m_bookmarksManager;
+    QList<QAction> m_initialActions;
 }
 
 /*
     Proxy model that filters out the bookmarks so only the folders
     are left behind.  Used in the add bookmark dialog combobox.
  */
-import QtGui/QSortFilterProxyModel;
+import qt.gui.QSortFilterProxyModel;
+
 class AddBookmarkProxyModel : public QSortFilterProxyModel
 {
     Q_OBJECT
 public:
-    this(QObject * parent = null)
+    this(QObject  parent = null)
 {
 	super(parent);
 }
-    int columnCount(QModelIndex & parent = QModelIndex())
+    int columnCount(QModelIndex  parent = QModelIndex())
 {
-    return qMin(1, QSortFilterProxyModel::columnCount(parent));
+    return qMin(1, QSortFilterProxyModel.columnCount(parent));
 }
 protected:
-    bool filterAcceptsRow(int source_row, QModelIndex &source_parent)
+    bool filterAcceptsRow(int source_row, QModelIndex source_parent)
 {
     QModelIndex idx = sourceModel().index(source_row, 0, source_parent);
     return sourceModel().hasChildren(idx);
@@ -859,26 +844,26 @@
 /*!
     Add bookmark dialog
  */
+
 import ui_addbookmarkdialog;
+
 class AddBookmarkDialog : public QDialog, public Ui_AddBookmarkDialog
 {
-    Q_OBJECT
 
 public:
-    this(QString &url, QString &title, QWidget *parent = null, BookmarksManager *bookmarkManager = null)
+    this(QString url, QString title, QWidget parent = null, BookmarksManager bookmarkManager = null)
  : QDialog(parent)
-
 {
 	m_url = url;
     m_bookmarksManager = bookmarkManager;
 	
     setWindowFlags(Qt.Sheet);
     if (!m_bookmarksManager)
-        m_bookmarksManager = BrowserApplication::bookmarksManager();
+        m_bookmarksManager = BrowserApplication.bookmarksManager();
     setupUi(this);
-    QTreeView *view = new QTreeView(this);
+    QTreeView view = new QTreeView(this);
     m_proxyModel = new AddBookmarkProxyModel(this);
-    BookmarksModel *model = m_bookmarksManager.bookmarksModel();
+    BookmarksModel model = m_bookmarksManager.bookmarksModel();
     m_proxyModel.setSourceModel(model);
     view.setModel(m_proxyModel);
     view.expandAll();
@@ -890,13 +875,14 @@
     location.setModel(m_proxyModel);
     view.show();
     location.setView(view);
-    BookmarkNode *menu = m_bookmarksManager.menu();
+    BookmarkNode menu = m_bookmarksManager.menu();
     QModelIndex idx = m_proxyModel.mapFromSource(model.index(menu));
     view.setCurrentIndex(idx);
     location.setCurrentIndex(idx.row());
     name.setText(title);
 }
-private slots:
+
+private:
 	
 void accept()
 {
@@ -904,18 +890,18 @@
     index = m_proxyModel.mapToSource(index);
     if (!index.isValid())
         index = m_bookmarksManager.bookmarksModel().index(0, 0);
-    BookmarkNode *parent = m_bookmarksManager.bookmarksModel().node(index);
-    BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark);
+    BookmarkNode parent = m_bookmarksManager.bookmarksModel().node(index);
+    BookmarkNode bookmark = new BookmarkNode(BookmarkNode.Bookmark);
     bookmark.url = m_url;
     bookmark.title = name.text();
     m_bookmarksManager.addBookmark(parent, bookmark);
-    QDialog::accept();
+    QDialog.accept();
 }
 
 private:
     QString m_url;
-    BookmarksManager *m_bookmarksManager;
-    AddBookmarkProxyModel *m_proxyModel;
+    BookmarksManager m_bookmarksManager;
+    AddBookmarkProxyModel m_proxyModel;
 }
 
 import ui_bookmarks;
@@ -923,45 +909,39 @@
 //class TreeProxyModel;
 class BookmarksDialog : public QDialog, public Ui_BookmarksDialog
 {
-    Q_OBJECT
-
-signals:
-    void openUrl(QUrl &url);
+	
+    mixin Signal!("openUrl", QUrl url);
 
 public:
-    this(QWidget *parent = null, BookmarksManager *manager = null)
+    this(QWidget parent = null, BookmarksManager manager = null)
     : QDialog(parent)
 {
     m_bookmarksManager = manager;
     if (!m_bookmarksManager)
-        m_bookmarksManager = BrowserApplication::bookmarksManager();
+        m_bookmarksManager = BrowserApplication.bookmarksManager();
     setupUi(this);
 
     tree.setUniformRowHeights(true);
-    tree.setSelectionBehavior(QAbstractItemView::SelectRows);
-    tree.setSelectionMode(QAbstractItemView::ContiguousSelection);
+    tree.setSelectionBehavior(QAbstractItemView.SelectRows);
+    tree.setSelectionMode(QAbstractItemView.ContiguousSelection);
     tree.setTextElideMode(Qt.ElideMiddle);
     m_bookmarksModel = m_bookmarksManager.bookmarksModel();
     m_proxyModel = new TreeProxyModel(this);
-    connect(search, SIGNAL(textChanged(QString)),
-            m_proxyModel, SLOT(setFilterFixedString(QString)));
-    connect(removeButton, SIGNAL(clicked()), tree, SLOT(removeOne()));
+    search.textChanged.connect(&m_proxyModel.setFilterFixedString);
+    removeButton.clicked.connect(&tree.removeOne);
     m_proxyModel.setSourceModel(m_bookmarksModel);
     tree.setModel(m_proxyModel);
-    tree.setDragDropMode(QAbstractItemView::InternalMove);
+    tree.setDragDropMode(QAbstractItemView.InternalMove);
     tree.setExpanded(m_proxyModel.index(0, 0), true);
     tree.setAlternatingRowColors(true);
-    QFontMetrics fm(font());
+   auto fm = new QFontMetrics(font());
     int header = fm.width(QLatin1Char('m')) * 40;
     tree.header().resizeSection(0, header);
     tree.header().setStretchLastSection(true);
-    connect(tree, SIGNAL(activated(QModelIndex&)),
-            this, SLOT(open()));
+    tree.activated.connect(&this.open);
     tree.setContextMenuPolicy(Qt.CustomContextMenu);
-    connect(tree, SIGNAL(customContextMenuRequested(QPoint &)),
-            this, SLOT(customContextMenuRequested(QPoint &)));
-    connect(addFolderButton, SIGNAL(clicked()),
-            this, SLOT(newFolder()));
+    tree.customContextMenuRequested.connect(&this.customContextMenuRequested);
+    addFolderButton.clicked.connect(&this.newFolder);
     expandNodes(m_bookmarksManager.bookmarks());
     setAttribute(Qt.WA_DeleteOnClose);
 }
@@ -972,7 +952,7 @@
 }
 
 private slots:
-    void customContextMenuRequested(QPoint &pos)
+    void customContextMenuRequested(QPoint pos)
 {
     QMenu menu;
     QModelIndex index = tree.indexAt(pos);
@@ -982,14 +962,14 @@
         menu.addSeparator();
     }
     menu.addAction(tr("Delete"), tree, SLOT(removeOne()));
-    menu.exec(QCursor::pos());
+    menu.exec(QCursor.pos());
 }
 void open()
 {
     QModelIndex index = tree.currentIndex();
     if (!index.parent().isValid())
         return;
-    emit openUrl(index.sibling(index.row(), 1).data(BookmarksModel::UrlRole).toUrl());
+    emit openUrl(index.sibling(index.row(), 1).data(BookmarksModel.UrlRole).toUrl());
 }
 
     void newFolder()
@@ -1001,17 +981,17 @@
     if (!idx.isValid())
         idx = tree.rootIndex();
     idx = m_proxyModel.mapToSource(idx);
-    BookmarkNode *parent = m_bookmarksManager.bookmarksModel().node(idx);
-    BookmarkNode *node = new BookmarkNode(BookmarkNode::Folder);
+    BookmarkNode parent = m_bookmarksManager.bookmarksModel().node(idx);
+    BookmarkNode node = new BookmarkNode(BookmarkNode.Folder);
     node.title = tr("New Folder");
     m_bookmarksManager.addBookmark(parent, node, currentIndex.row() + 1);
 }
 
 private:
-    void expandNodes(BookmarkNode *node)
+    void expandNodes(BookmarkNode node)
 {
     for (int i = 0; i < node.children().count(); ++i) {
-        BookmarkNode *childNode = node.children()[i];
+        BookmarkNode childNode = node.children()[i];
         if (childNode.expanded) {
             QModelIndex idx = m_bookmarksModel.index(childNode);
             idx = m_proxyModel.mapFromSource(idx);
@@ -1021,13 +1001,13 @@
     }
 }
 
-bool saveExpandedNodes(QModelIndex &parent)
+bool saveExpandedNodes(QModelIndex parent)
 {
     bool changed = false;
     for (int i = 0; i < m_proxyModel.rowCount(parent); ++i) {
         QModelIndex child = m_proxyModel.index(i, 0, parent);
         QModelIndex sourceIndex = m_proxyModel.mapToSource(child);
-        BookmarkNode *childNode = m_bookmarksModel.node(sourceIndex);
+        BookmarkNode childNode = m_bookmarksModel.node(sourceIndex);
         bool wasExpanded = childNode.expanded;
         if (tree.isExpanded(child)) {
             childNode.expanded = true;
@@ -1040,34 +1020,32 @@
     return changed;
 }
 
-    BookmarksManager *m_bookmarksManager;
-    BookmarksModel *m_bookmarksModel;
-    TreeProxyModel *m_proxyModel;
-};
+    BookmarksManager m_bookmarksManager;
+    BookmarksModel m_bookmarksModel;
+    TreeProxyModel m_proxyModel;
+}
 
-import QtGui/QToolBar;
+import qt.gui.QToolBar;
+
 class BookmarksToolBar : public QToolBar
 {
-    Q_OBJECT
-
-signals:
-    void openUrl(QUrl &url);
+    mixin Signal!("openUrl", QUrl url);
 
 public:
-    BookmarksToolBar(BookmarksModel *model, QWidget *parent = null)
+    BookmarksToolBar(BookmarksModel model, QWidget parent = null)
 {
 	super(tr("Bookmark"), parent);
 	m_bookmarksModel = model;
-    connect(this, SIGNAL(actionTriggered(QAction*)), this, SLOT(triggered(QAction*)));
+    this.actionTriggered.connect(&this.triggered);
     setRootIndex(model.index(0, 0));
-    connect(m_bookmarksModel, SIGNAL(modelReset()), this, SLOT(build()));
-    connect(m_bookmarksModel, SIGNAL(rowsInserted(QModelIndex &, int, int)), this, SLOT(build()));
-    connect(m_bookmarksModel, SIGNAL(rowsRemoved(QModelIndex &, int, int)), this, SLOT(build()));
-    connect(m_bookmarksModel, SIGNAL(dataChanged(QModelIndex &, QModelIndex &)), this, SLOT(build()));
+    m_bookmarksModel.modelReset.connect(&this.build);
+    m_bookmarksModel.rowsInserted.connect(&this.build);
+    m_bookmarksModel.rowsRemoved.connect(&this.build);
+    m_bookmarksModel.dataChanged.connect(&this.build);
     setAcceptDrops(true);
 }
 
-    void setRootIndex(QModelIndex &index);
+    void setRootIndex(QModelIndex index);
 {
     m_root = index;
     build();
@@ -1079,20 +1057,20 @@
 }
 
 protected:
-    void dragEnterEvent(QDragEnterEvent *event)
+    void dragEnterEvent(QDragEnterEvent event)
 {
-    const QMimeData *mimeData = event.mimeData();
+    const QMimeData mimeData = event.mimeData();
     if (mimeData.hasUrls())
         event.acceptProposedAction();
-    QToolBar::dragEnterEvent(event);
+    QToolBar.dragEnterEvent(event);
 }
 
-    void dropEvent(QDropEvent *event)
+    void dropEvent(QDropEvent event)
 {
-    const QMimeData *mimeData = event.mimeData();
+    const QMimeData mimeData = event.mimeData();
     if (mimeData.hasUrls() && mimeData.hasText()) {
         QList<QUrl> urls = mimeData.urls();
-        QAction *action = actionAt(event.pos());
+        QAction action = actionAt(event.pos());
         QString dropText;
         if (action)
             dropText = action.text();
@@ -1110,20 +1088,20 @@
                 break;
             }
         }
-        BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark);
+        BookmarkNode bookmark = new BookmarkNode(BookmarkNode.Bookmark);
         bookmark.url = urls.at(0).toString();
         bookmark.title = mimeData.text();
 
-        BookmarkNode *parent = m_bookmarksModel.node(parentIndex);
-        BookmarksManager *bookmarksManager = m_bookmarksModel.bookmarksManager();
+        BookmarkNode parent = m_bookmarksModel.node(parentIndex);
+        BookmarksManager bookmarksManager = m_bookmarksModel.bookmarksManager();
         bookmarksManager.addBookmark(parent, bookmark, row);
         event.acceptProposedAction();
     }
-    QToolBar::dropEvent(event);
+    QToolBar.dropEvent(event);
 }
 
 private slots:
-    void triggered(QAction *action)
+    void triggered(QAction action)
 {
     QVariant v = action.data();
     if (v.canConvert<QUrl>()) {
@@ -1131,9 +1109,9 @@
     }
 }
 
-    void activated(QModelIndex &index)
+    void activated(QModelIndex index)
 {
-    emit openUrl(index.data(BookmarksModel::UrlRole).toUrl());
+    emit openUrl(index.data(BookmarksModel.UrlRole).toUrl());
 }
 
 
@@ -1143,28 +1121,27 @@
     for (int i = 0; i < m_bookmarksModel.rowCount(m_root); ++i) {
         QModelIndex idx = m_bookmarksModel.index(i, 0, m_root);
         if (m_bookmarksModel.hasChildren(idx)) {
-            QToolButton *button = new QToolButton(this);
-            button.setPopupMode(QToolButton::InstantPopup);
+            QToolButton button = new QToolButton(this);
+            button.setPopupMode(QToolButton.InstantPopup);
             button.setArrowType(Qt.DownArrow);
             button.setText(idx.data().toString());
-            ModelMenu *menu = new ModelMenu(this);
-            connect(menu, SIGNAL(activated(QModelIndex &)),
-                    this, SLOT(activated(QModelIndex &)));
+            ModelMenu menu = new ModelMenu(this);
+            menu.activated.connect(&this.activated);
             menu.setModel(m_bookmarksModel);
             menu.setRootIndex(idx);
             menu.addAction(new QAction(menu));
             button.setMenu(menu);
             button.setToolButtonStyle(Qt.ToolButtonTextOnly);
-            QAction *a = addWidget(button);
+            QAction a = addWidget(button);
             a.setText(idx.data().toString());
         } else {
-            QAction *action = addAction(idx.data().toString());
-            action.setData(idx.data(BookmarksModel::UrlRole));
+            QAction action = addAction(idx.data().toString());
+            action.setData(idx.data(BookmarksModel.UrlRole));
         }
     }
 }
 
 private:
-    BookmarksModel *m_bookmarksModel;
+    BookmarksModel m_bookmarksModel;
     QPersistentModelIndex m_root;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/bookmarks.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,106 @@
+<ui version="4.0" >
+ <class>BookmarksDialog</class>
+ <widget class="QDialog" name="BookmarksDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>758</width>
+    <height>450</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Bookmarks</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>252</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="1" >
+    <widget class="SearchLineEdit" name="search" />
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="EditTreeView" name="tree" />
+   </item>
+   <item row="2" column="0" colspan="2" >
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QPushButton" name="removeButton" >
+       <property name="text" >
+        <string>&amp;Remove</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="addFolderButton" >
+       <property name="text" >
+        <string>Add Folder</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox" >
+       <property name="standardButtons" >
+        <set>QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SearchLineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>searchlineedit.h</header>
+  </customwidget>
+  <customwidget>
+   <class>EditTreeView</class>
+   <extends>QTreeView</extends>
+   <header>edittreeview.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>BookmarksDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>472</x>
+     <y>329</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>461</x>
+     <y>356</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/cookies.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,106 @@
+<ui version="4.0" >
+ <class>CookiesDialog</class>
+ <widget class="QDialog" name="CookiesDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>550</width>
+    <height>370</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Cookies</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>252</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="1" >
+    <widget class="SearchLineEdit" name="search" />
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="EditTableView" name="cookiesTable" />
+   </item>
+   <item row="2" column="0" colspan="2" >
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QPushButton" name="removeButton" >
+       <property name="text" >
+        <string>&amp;Remove</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="removeAllButton" >
+       <property name="text" >
+        <string>Remove &amp;All Cookies</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox" >
+       <property name="standardButtons" >
+        <set>QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SearchLineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>searchlineedit.h</header>
+  </customwidget>
+  <customwidget>
+   <class>EditTableView</class>
+   <extends>QTableView</extends>
+   <header>edittableview.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>CookiesDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>472</x>
+     <y>329</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>461</x>
+     <y>356</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/cookiesexceptions.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,184 @@
+<ui version="4.0" >
+ <class>CookiesExceptionsDialog</class>
+ <widget class="QDialog" name="CookiesExceptionsDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>466</width>
+    <height>446</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Cookie Exceptions</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <item>
+    <widget class="QGroupBox" name="newExceptionGroupBox" >
+     <property name="title" >
+      <string>New Exception</string>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <layout class="QHBoxLayout" >
+        <item>
+         <widget class="QLabel" name="label" >
+          <property name="text" >
+           <string>Domain:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="domainLineEdit" />
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0" >
+       <layout class="QHBoxLayout" >
+        <item>
+         <spacer>
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>81</width>
+            <height>25</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="blockButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Block</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="allowForSessionButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Allow For Session</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="allowButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Allow</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="ExceptionsGroupBox" >
+     <property name="title" >
+      <string>Exceptions</string>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" colspan="3" >
+       <spacer>
+        <property name="orientation" >
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>252</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="0" column="3" >
+       <widget class="SearchLineEdit" name="search" />
+      </item>
+      <item row="1" column="0" colspan="4" >
+       <widget class="EditTableView" name="exceptionTable" />
+      </item>
+      <item row="2" column="0" >
+       <widget class="QPushButton" name="removeButton" >
+        <property name="text" >
+         <string>&amp;Remove</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QPushButton" name="removeAllButton" >
+        <property name="text" >
+         <string>Remove &amp;All</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="2" colspan="2" >
+       <spacer>
+        <property name="orientation" >
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SearchLineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>searchlineedit.h</header>
+  </customwidget>
+  <customwidget>
+   <class>EditTableView</class>
+   <extends>QTableView</extends>
+   <header>edittableview.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>CookiesExceptionsDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>381</x>
+     <y>428</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>336</x>
+     <y>443</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/downloaditem.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,134 @@
+<ui version="4.0" >
+ <class>DownloadItem</class>
+ <widget class="QWidget" name="DownloadItem" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>423</width>
+    <height>110</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="fileIcon" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text" >
+      <string>Ico</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2" >
+     <item>
+      <widget class="SqueezeLabel" native="1" name="fileNameLabel" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" stdset="0" >
+        <string>Filename</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QProgressBar" name="progressBar" >
+       <property name="value" >
+        <number>0</number>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="SqueezeLabel" native="1" name="downloadInfoLabel" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" stdset="0" >
+        <string/>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout" >
+     <item>
+      <spacer name="verticalSpacer" >
+       <property name="orientation" >
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>17</width>
+         <height>1</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="tryAgainButton" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="text" >
+        <string>Try Again</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="stopButton" >
+       <property name="text" >
+        <string>Stop</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="openButton" >
+       <property name="text" >
+        <string>Open</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="verticalSpacer_2" >
+       <property name="orientation" >
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>17</width>
+         <height>5</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SqueezeLabel</class>
+   <extends>QWidget</extends>
+   <header>squeezelabel.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/downloads.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,83 @@
+<ui version="4.0" >
+ <class>DownloadDialog</class>
+ <widget class="QDialog" name="DownloadDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>332</width>
+    <height>252</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Downloads</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <property name="margin" >
+    <number>0</number>
+   </property>
+   <property name="spacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" colspan="3" >
+    <widget class="EditTableView" name="downloadsView" />
+   </item>
+   <item row="1" column="0" >
+    <layout class="QHBoxLayout" name="horizontalLayout" >
+     <item>
+      <widget class="QPushButton" name="cleanupButton" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="text" >
+        <string>Clean up</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>58</width>
+         <height>24</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QLabel" name="itemCount" >
+     <property name="text" >
+      <string>0 Items</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2" >
+    <spacer name="horizontalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>148</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>EditTableView</class>
+   <extends>QTableView</extends>
+   <header>edittableview.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
--- a/demos/browser/history.d	Wed May 20 21:06:33 2009 +0000
+++ b/demos/browser/history.d	Wed May 20 22:44:31 2009 +0000
@@ -38,40 +38,36 @@
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
+
 module history;
 
 
-import QtCore.QBuffer;
-import QtCore.QDir;
-import QtCore.QFile;
-import QtCore.QFileInfo;
-import QtCore.QSettings;
-import QtCore.QTemporaryFile;
-import QtCore.QTextStream;
+import qt.gui.QClipboard;
+import qt.gui.QDesktopServices;
+import qt.gui.QHeaderView;
+import qt.gui.QStyle;
+import qt.gui.QSortFilterProxyModel;
 
-import QtCore.QtAlgorithms;
-
-import QtGui.QClipboard;
-import QtGui.QDesktopServices;
-import QtGui.QHeaderView;
-import QtGui.QStyle;
+import qt.core.QtAlgorithms;
+import qt.core.QBuffer;
+import qt.core.QDir;
+import qt.core.QFile;
+import qt.core.QFileInfo;
+import qt.core.QSettings;
+import qt.core.QTemporaryFile;
+import qt.core.QTextStream;
+import qt.core.QDebug;
+import qt.core.QDateTime;
+import qt.core.QHash;
+import qt.core.QObject;
+import qt.core.QTimer;
+import qt.core.QUrl;
 
 import QtWebKit.QWebHistoryInterface;
 import QtWebKit.QWebSettings;
 
-import QtCore.QDebug;
-
-import QtCore.QDateTime;
-import QtCore.QHash;
-import QtCore.QObject;
-import QtCore.QTimer;
-import QtCore.QUrl;
-
-import QtGui.QSortFilterProxyModel;
-
 import QWebHistoryInterface;
 
-
 import autosaver
 import browserapplication;
 import modelmenu;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/history.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,106 @@
+<ui version="4.0" >
+ <class>HistoryDialog</class>
+ <widget class="QDialog" name="HistoryDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>758</width>
+    <height>450</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>History</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>252</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="1" >
+    <widget class="SearchLineEdit" name="search" />
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="EditTreeView" name="tree" />
+   </item>
+   <item row="2" column="0" colspan="2" >
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QPushButton" name="removeButton" >
+       <property name="text" >
+        <string>&amp;Remove</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="removeAllButton" >
+       <property name="text" >
+        <string>Remove &amp;All</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox" >
+       <property name="standardButtons" >
+        <set>QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SearchLineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>searchlineedit.h</header>
+  </customwidget>
+  <customwidget>
+   <class>EditTreeView</class>
+   <extends>QTreeView</extends>
+   <header>edittreeview.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>HistoryDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>472</x>
+     <y>329</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>461</x>
+     <y>356</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/passworddialog.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,111 @@
+<ui version="4.0" >
+ <class>PasswordDialog</class>
+ <widget class="QDialog" name="PasswordDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>399</width>
+    <height>148</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Authentication Required</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" colspan="2" >
+    <layout class="QHBoxLayout" >
+     <item>
+      <widget class="QLabel" name="iconLabel" >
+       <property name="text" >
+        <string>DUMMY ICON</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="introLabel" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" >
+        <string>INTRO TEXT DUMMY</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>Username:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QLineEdit" name="userNameLineEdit" />
+   </item>
+   <item row="2" column="0" >
+    <widget class="QLabel" name="lblPassword" >
+     <property name="text" >
+      <string>Password:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1" >
+    <widget class="QLineEdit" name="passwordLineEdit" >
+     <property name="echoMode" >
+      <enum>QLineEdit::Password</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>PasswordDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>PasswordDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/proxy.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,104 @@
+<ui version="4.0" >
+ <class>ProxyDialog</class>
+ <widget class="QDialog" name="ProxyDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>369</width>
+    <height>144</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Proxy Authentication</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="iconLabel" >
+     <property name="text" >
+      <string>ICON</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="2" >
+    <widget class="QLabel" name="introLabel" >
+     <property name="text" >
+      <string>Connect to proxy</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="QLabel" name="usernameLabel" >
+     <property name="text" >
+      <string>Username:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2" >
+    <widget class="QLineEdit" name="userNameLineEdit" />
+   </item>
+   <item row="2" column="0" colspan="2" >
+    <widget class="QLabel" name="passwordLabel" >
+     <property name="text" >
+      <string>Password:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="2" >
+    <widget class="QLineEdit" name="passwordLineEdit" >
+     <property name="echoMode" >
+      <enum>QLineEdit::Password</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="3" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>ProxyDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>ProxyDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- a/demos/browser/searchlineedit.d	Wed May 20 21:06:33 2009 +0000
+++ b/demos/browser/searchlineedit.d	Wed May 20 22:44:31 2009 +0000
@@ -39,18 +39,17 @@
 **
 ****************************************************************************/
 
+module searchlineedit;
+
 import urllineedit;
 
-import QtGui.QLineEdit;
-import QtGui.QAbstractButton;
-
-import searchlineedit;
-
-import QtGui.QPainter;
-import QtGui.QMouseEvent;
-import QtGui.QMenu;
-import QtGui.QStyle;
-import QtGui.QStyleOptionFrameV2;
+import qt.gui.QLineEdit;
+import qt.gui.QAbstractButton;
+import qt.gui.QPainter;
+import qt.gui.QMouseEvent;
+import qt.gui.QMenu;
+import qt.gui.QStyle;
+import qt.gui.QStyleOptionFrameV2;
 
 /*
 QT_BEGIN_NAMESPACE
@@ -67,46 +66,42 @@
  */
 class ClearButton : public QAbstractButton
 {
-    Q_OBJECT
+public:
 
-public:
-    this(QWidget *parent = null)
-{
-	super(parent);
-    setCursor(Qt.ArrowCursor);
-    setToolTip(tr("Clear"));
-    setVisible(false);
-    setFocusPolicy(Qt.NoFocus);
-}
-    void paintEvent(QPaintEvent *event)
-{
-    Q_UNUSED(event);
-    QPainter painter(this);
-    int height = this.height();
+	this(QWidget parent = null)
+	{
+		super(parent);
+		setCursor(Qt.ArrowCursor);
+		setToolTip(tr("Clear"));
+		setVisible(false);
+		setFocusPolicy(Qt.NoFocus);
+	}
+	
+	void paintEvent(QPaintEvent *event)
+	{
+		//Q_UNUSED(event);
+		QPainter painter(this);
+		int height = this.height();
 
-    painter.setRenderHint(QPainter::Antialiasing, true);
-    QColor color = palette().color(QPalette.Mid);
-    painter.setBrush(isDown()
-                     ? palette().color(QPalette.Dark)
-                     : palette().color(QPalette.Mid));
-    painter.setPen(painter.brush().color());
-    int size = width();
-    int offset = size / 5;
-    int radius = size - offset * 2;
-    painter.drawEllipse(offset, offset, radius, radius);
+		painter.setRenderHint(QPainter.Antialiasing, true);
+		QColor color = palette().color(QPalette.Mid);
+		painter.setBrush(isDown() ? palette().color(QPalette.Dark) : palette().color(QPalette.Mid));
+		painter.setPen(painter.brush().color());
+		int size = width();
+		int offset = size / 5;
+		int radius = size - offset * 2;
+		painter.drawEllipse(offset, offset, radius, radius);
 
-    painter.setPen(palette().color(QPalette.Base));
-    int border = offset * 2;
-    painter.drawLine(border, border, width() - border, height - border);
-    painter.drawLine(border, height - border, width() - border, border);
-}
+		painter.setPen(palette().color(QPalette.Base));
+		int border = offset * 2;
+		painter.drawLine(border, border, width() - border, height - border);
+		painter.drawLine(border, height - border, width() - border, border);
+	}
 
-public slots:
-    void textChanged(QString &text)
-{
-    setVisible(!text.isEmpty());
-}
-
+	void textChanged(QString &text)
+	{
+		setVisible(!text.isEmpty());
+	}
 }
 
 /*
@@ -114,75 +109,76 @@
     When a menu is set a down arrow appears
  */
 class SearchButton : public QAbstractButton {
+
 public:
-    SearchButton(QWidget *parent = null)
-{
-	super(parent);
-	m_menu = 0;
-    setObjectName(QLatin1String("SearchButton"));
-    setCursor(Qt.ArrowCursor);
-    setFocusPolicy(Qt.NoFocus);
-}
 
-    void paintEvent(QPaintEvent *event)
-{
-    Q_UNUSED(event);
-    QPainterPath myPath;
+	SearchButton(QWidget parent = null)
+	{
+		super(parent);
+		m_menu = 0;
+		setObjectName(QLatin1String("SearchButton"));
+		setCursor(Qt.ArrowCursor);
+		setFocusPolicy(Qt.NoFocus);
+	}
 
-    int radius = (height() / 5) * 2;
-    QRect circle(height() / 3 - 1, height() / 4, radius, radius);
-    myPath.addEllipse(circle);
+	void paintEvent(QPaintEvent event)
+	{
+		//Q_UNUSED(event);
+		QPainterPath myPath;
 
-    myPath.arcMoveTo(circle, 300);
-    QPointF c = myPath.currentPosition();
-    int diff = height() / 7;
-    myPath.lineTo(qMin(width() - 2, (int)c.x() + diff), c.y() + diff);
+		int radius = (height() / 5) * 2;
+		QRect circle(height() / 3 - 1, height() / 4, radius, radius);
+		myPath.addEllipse(circle);
 
-    QPainter painter(this);
-    painter.setRenderHint(QPainter::Antialiasing, true);
-    painter.setPen(QPen(Qt.darkGray, 2));
-    painter.drawPath(myPath);
+		myPath.arcMoveTo(circle, 300);
+		QPointF c = myPath.currentPosition();
+		int diff = height() / 7;
+		myPath.lineTo(qMin(width() - 2, (int)c.x() + diff), c.y() + diff);
 
-    if (m_menu) {
-        QPainterPath dropPath;
-        dropPath.arcMoveTo(circle, 320);
-        QPointF c = dropPath.currentPosition();
-        c = QPointF(c.x() + 3.5, c.y() + 0.5);
-        dropPath.moveTo(c);
-        dropPath.lineTo(c.x() + 4, c.y());
-        dropPath.lineTo(c.x() + 2, c.y() + 2);
-        dropPath.closeSubpath();
-        painter.setPen(Qt.darkGray);
-        painter.setBrush(Qt.darkGray);
-        painter.setRenderHint(QPainter::Antialiasing, false);
-        painter.drawPath(dropPath);
-    }
-    painter.end();
-}
-    QMenu *m_menu;
+		QPainter painter(this);
+		painter.setRenderHint(QPainter.Antialiasing, true);
+		painter.setPen(QPen(Qt.darkGray, 2));
+		painter.drawPath(myPath);
+
+		if (m_menu) {
+			QPainterPath dropPath;
+			dropPath.arcMoveTo(circle, 320);
+			QPointF c = dropPath.currentPosition();
+			c = QPointF(c.x() + 3.5, c.y() + 0.5);
+			dropPath.moveTo(c);
+			dropPath.lineTo(c.x() + 4, c.y());
+			dropPath.lineTo(c.x() + 2, c.y() + 2);
+			dropPath.closeSubpath();
+			painter.setPen(Qt.darkGray);
+			painter.setBrush(Qt.darkGray);
+			painter.setRenderHint(QPainter.Antialiasing, false);
+			painter.drawPath(dropPath);
+		}
+		painter.end();
+	}
+
+	QMenu m_menu;
 
 protected:
-    void mousePressEvent(QMouseEvent *event)
-{
-    if (m_menu && event.button() == Qt.LeftButton) {
-        QWidget *p = parentWidget();
-        if (p) {
-            QPoint r = p.mapToGlobal(QPoint(0, p.height()));
-            m_menu.exec(QPoint(r.x() + height() / 2, r.y()));
-        }
-        event.accept();
-    }
-    QAbstractButton::mousePressEvent(event);
-}
+	void mousePressEvent(QMouseEvent event)
+	{
+		if (m_menu && event.button() == Qt.LeftButton) {
+			QWidget p = parentWidget();
+			if (p) {
+				QPoint r = p.mapToGlobal(QPoint(0, p.height()));
+				m_menu.exec(QPoint(r.x() + height() / 2, r.y()));
+			}
+			event.accept();
+		}
+		QAbstractButton.mousePressEvent(event);
+	}
 }
 
 class SearchLineEdit : public ExLineEdit
 {
-    Q_OBJECT
-    Q_PROPERTY(QString inactiveText READ inactiveText WRITE setInactiveText)
+    //Q_PROPERTY(QString inactiveText READ inactiveText WRITE setInactiveText)
 
-signals:
-    void textChanged(QString &text);
+    mixin Signal!("textChanged", QString &text);
 
 public:
 /*
@@ -191,82 +187,81 @@
     - When there is no text and doesn't have focus an "inactive text" is displayed
     - When there is text a clear button is displayed on the right hand side
  */
-this(QWidget *parent = null) : ExLineEdit(parent),
-    m_searchButton(new SearchButton(this))
-{
-    connect(lineEdit(), SIGNAL(textChanged(QString &)),
-            this, SIGNAL(textChanged(QString &)));
-    setLeftWidget(m_searchButton);
-    m_inactiveText = tr("Search");
+	this(QWidget parent = null) : ExLineEdit(parent)
+	{
+		m_searchButton = new SearchButton(this);
+		lineEdit.textChanged.connect(&this.textChanged);
+		setLeftWidget(m_searchButton);
+		m_inactiveText = tr("Search");
 
-    QSizePolicy policy = sizePolicy();
-    setSizePolicy(QSizePolicy::Preferred, policy.verticalPolicy());
-}
+		QSizePolicy policy = sizePolicy();
+		setSizePolicy(QSizePolicy.Preferred, policy.verticalPolicy());
+	}
 
-    QString inactiveText()
-{
-    return m_inactiveText;
-}
+	QString inactiveText()
+	{
+		return m_inactiveText;
+	}
 
-    void setInactiveText(QString &text)
-{
-    m_inactiveText = text;
-}
+	void setInactiveText(QString &text)
+	{
+		m_inactiveText = text;
+	}
 
-    QMenu *menu()
-{
-    if (!m_searchButton.m_menu) {
-        m_searchButton.m_menu = new QMenu(m_searchButton);
-        if (isVisible())
-            (const_cast<SearchLineEdit*>(this)).updateGeometries();
-    }
-    return m_searchButton.m_menu;
-}
+	QMenu menu()
+	{
+		if (!m_searchButton.m_menu) {
+			m_searchButton.m_menu = new QMenu(m_searchButton);
+			if (isVisible())
+				(const_cast<SearchLineEdit>(this)).updateGeometries();
+		}
+		return m_searchButton.m_menu;
+	}
 
-    void setMenu(QMenu *menu)
-{
-    if (m_searchButton.m_menu)
-        m_searchButton.m_menu.deleteLater();
-    m_searchButton.m_menu = menu;
-    updateGeometries();
-}
+	void setMenu(QMenu menu)
+	{
+		if (m_searchButton.m_menu)
+			m_searchButton.m_menu.deleteLater();
+		m_searchButton.m_menu = menu;
+		updateGeometries();
+	}
 
 protected:
-    void resizeEvent(QResizeEvent *event)
-{
-    updateGeometries();
-    ExLineEdit.resizeEvent(event);
-}
+	void resizeEvent(QResizeEvent event)
+	{
+		updateGeometries();
+		ExLineEdit.resizeEvent(event);
+	}
 
-    void paintEvent(QPaintEvent *event)
-{
-    if (lineEdit().text().isEmpty() && !hasFocus() && !m_inactiveText.isEmpty()) {
-        ExLineEdit.paintEvent(event);
-        QStyleOptionFrameV2 panel;
-        initStyleOption(&panel);
-        QRect r = style().subElementRect(QStyle::SE_LineEditContents, &panel, this);
-        QFontMetrics fm = fontMetrics();
-        int horizontalMargin = lineEdit().x();
-        QRect lineRect(horizontalMargin + r.x(), r.y() + (r.height() - fm.height() + 1) / 2,
-                       r.width() - 2 * horizontalMargin, fm.height());
-        QPainter painter(this);
-        painter.setPen(palette().brush(QPalette.Disabled, QPalette.Text).color());
-        painter.drawText(lineRect, Qt.AlignLeft|Qt.AlignVCenter, m_inactiveText);
-    } else {
-        ExLineEdit.paintEvent(event);
-    }
-}
+	void paintEvent(QPaintEvent event)
+	{
+		if (lineEdit().text().isEmpty() && !hasFocus() && !m_inactiveText.isEmpty()) {
+			ExLineEdit.paintEvent(event);
+			QStyleOptionFrameV2 panel;
+			initStyleOption(&panel);
+			QRect r = style().subElementRect(QStyle.SE_LineEditContents, &panel, this);
+			QFontMetrics fm = fontMetrics();
+			int horizontalMargin = lineEdit().x();
+			QRect lineRect(horizontalMargin + r.x(), r.y() + (r.height() - fm.height() + 1) / 2, r.width() - 2 * horizontalMargin, fm.height());
+			QPainter painter(this);
+			painter.setPen(palette().brush(QPalette.Disabled, QPalette.Text).color());
+			painter.drawText(lineRect, Qt.AlignLeft|Qt.AlignVCenter, m_inactiveText);
+		} else {
+			ExLineEdit.paintEvent(event);
+		}
+	}
 
 private:
-    void updateGeometries()
-{
-    int menuHeight = height();
-    int menuWidth = menuHeight + 1;
-    if (!m_searchButton.m_menu)
-        menuWidth = (menuHeight / 5) * 4;
-    m_searchButton.resize(QSize(menuWidth, menuHeight));
+
+	void updateGeometries()
+	{
+		int menuHeight = height();
+		int menuWidth = menuHeight + 1;
+		if (!m_searchButton.m_menu)
+			menuWidth = (menuHeight / 5) * 4;
+		m_searchButton.resize(QSize(menuWidth, menuHeight));
+	}
+
+	SearchButton m_searchButton;
+	QString m_inactiveText;
 }
-
-    SearchButton *m_searchButton;
-    QString m_inactiveText;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demos/browser/settings.ui	Wed May 20 22:44:31 2009 +0000
@@ -0,0 +1,614 @@
+<ui version="4.0" >
+ <class>Settings</class>
+ <widget class="QDialog" name="Settings" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>657</width>
+    <height>322</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Settings</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="2" column="0" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <widget class="QTabWidget" name="tabWidget" >
+     <property name="currentIndex" >
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="tab" >
+      <property name="geometry" >
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>627</width>
+        <height>243</height>
+       </rect>
+      </property>
+      <attribute name="title" >
+       <string>General</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_4" >
+       <item row="0" column="0" >
+        <widget class="QLabel" name="label_3" >
+         <property name="text" >
+          <string>Home:</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1" colspan="2" >
+        <widget class="QLineEdit" name="homeLineEdit" />
+       </item>
+       <item row="1" column="1" >
+        <widget class="QPushButton" name="setHomeToCurrentPageButton" >
+         <property name="text" >
+          <string>Set to current page</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2" >
+        <spacer name="horizontalSpacer" >
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>280</width>
+           <height>18</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="2" column="0" >
+        <widget class="QLabel" name="label_4" >
+         <property name="text" >
+          <string>Remove history items:</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1" colspan="2" >
+        <widget class="QComboBox" name="expireHistory" >
+         <item>
+          <property name="text" >
+           <string>After one day</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>After one week</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>After two weeks</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>After one month</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>After one year</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>Manually</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+       <item row="3" column="0" >
+        <widget class="QLabel" name="label_7" >
+         <property name="text" >
+          <string>Save downloads to:</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="3" column="1" colspan="2" >
+        <widget class="QLineEdit" name="downloadsLocation" />
+       </item>
+       <item row="4" column="0" >
+        <widget class="QLabel" name="label_8" >
+         <property name="text" >
+          <string>Open links from applications:</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="1" colspan="2" >
+        <widget class="QComboBox" name="openLinksIn" >
+         <item>
+          <property name="text" >
+           <string>In a tab in the current window</string>
+          </property>
+         </item>
+         <item>
+          <property name="text" >
+           <string>In a new window</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+       <item row="5" column="1" colspan="2" >
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>391</width>
+           <height>262</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_3" >
+      <property name="geometry" >
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>627</width>
+        <height>243</height>
+       </rect>
+      </property>
+      <attribute name="title" >
+       <string>Appearance</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_3" >
+       <item row="0" column="0" >
+        <widget class="QLabel" name="label_5" >
+         <property name="text" >
+          <string>Standard font:</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1" >
+        <widget class="QLabel" name="standardLabel" >
+         <property name="sizePolicy" >
+          <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="frameShape" >
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="text" >
+          <string>Times 16</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="2" >
+        <widget class="QPushButton" name="standardFontButton" >
+         <property name="text" >
+          <string>Select...</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0" >
+        <widget class="QLabel" name="label_6" >
+         <property name="text" >
+          <string>Fixed-width font:</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1" >
+        <widget class="QLabel" name="fixedLabel" >
+         <property name="frameShape" >
+          <enum>QFrame::StyledPanel</enum>
+         </property>
+         <property name="text" >
+          <string>Courier 13</string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2" >
+        <widget class="QPushButton" name="fixedFontButton" >
+         <property name="text" >
+          <string>Select...</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1" >
+        <spacer name="verticalSpacer" >
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>20</width>
+           <height>93</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2" >
+      <property name="geometry" >
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>627</width>
+        <height>243</height>
+       </rect>
+      </property>
+      <attribute name="title" >
+       <string>Privacy</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_3" >
+       <item>
+        <widget class="QGroupBox" name="groupBox" >
+         <property name="title" >
+          <string>Web Content</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_2" >
+          <item>
+           <widget class="QCheckBox" name="enablePlugins" >
+            <property name="text" >
+             <string>Enable Plugins</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="enableJavascript" >
+            <property name="text" >
+             <string>Enable Javascript</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="cookiesGroupBox" >
+         <property name="title" >
+          <string>Cookies</string>
+         </property>
+         <layout class="QGridLayout" >
+          <item row="0" column="0" >
+           <widget class="QLabel" name="label_2" >
+            <property name="text" >
+             <string>Accept Cookies:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1" >
+           <widget class="QComboBox" name="acceptCombo" >
+            <item>
+             <property name="text" >
+              <string>Always</string>
+             </property>
+            </item>
+            <item>
+             <property name="text" >
+              <string>Never</string>
+             </property>
+            </item>
+            <item>
+             <property name="text" >
+              <string>Only from sites you navigate to</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="0" column="2" >
+           <widget class="QPushButton" name="exceptionsButton" >
+            <property name="text" >
+             <string>Exceptions...</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" >
+           <widget class="QLabel" name="label" >
+            <property name="text" >
+             <string>Keep until:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1" >
+           <widget class="QComboBox" name="keepUntilCombo" >
+            <item>
+             <property name="text" >
+              <string>They expire</string>
+             </property>
+            </item>
+            <item>
+             <property name="text" >
+              <string>I exit the application</string>
+             </property>
+            </item>
+            <item>
+             <property name="text" >
+              <string>At most 90 days</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="1" column="2" >
+           <widget class="QPushButton" name="cookiesButton" >
+            <property name="text" >
+             <string>Cookies...</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>371</width>
+           <height>177</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_4" >
+      <property name="geometry" >
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>627</width>
+        <height>243</height>
+       </rect>
+      </property>
+      <attribute name="title" >
+       <string>Proxy</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout" >
+       <item>
+        <widget class="QGroupBox" name="proxySupport" >
+         <property name="title" >
+          <string>Enable proxy</string>
+         </property>
+         <property name="checkable" >
+          <bool>true</bool>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_6" >
+          <item row="0" column="0" >
+           <widget class="QLabel" name="label_9" >
+            <property name="text" >
+             <string>Type:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1" colspan="2" >
+           <widget class="QComboBox" name="proxyType" >
+            <item>
+             <property name="text" >
+              <string>Socks5</string>
+             </property>
+            </item>
+            <item>
+             <property name="text" >
+              <string>Http</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+          <item row="1" column="0" >
+           <widget class="QLabel" name="label_10" >
+            <property name="text" >
+             <string>Host:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1" colspan="2" >
+           <widget class="QLineEdit" name="proxyHostName" />
+          </item>
+          <item row="2" column="0" >
+           <widget class="QLabel" name="label_11" >
+            <property name="text" >
+             <string>Port:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1" >
+           <widget class="QSpinBox" name="proxyPort" >
+            <property name="maximum" >
+             <number>10000</number>
+            </property>
+            <property name="value" >
+             <number>1080</number>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="2" >
+           <spacer name="horizontalSpacer_2" >
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>293</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item row="3" column="0" >
+           <widget class="QLabel" name="label_12" >
+            <property name="text" >
+             <string>User Name:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="1" colspan="2" >
+           <widget class="QLineEdit" name="proxyUserName" />
+          </item>
+          <item row="4" column="0" >
+           <widget class="QLabel" name="label_13" >
+            <property name="text" >
+             <string>Password:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="4" column="1" colspan="2" >
+           <widget class="QLineEdit" name="proxyPassword" >
+            <property name="echoMode" >
+             <enum>QLineEdit::Password</enum>
+            </property>
+           </widget>
+          </item>
+          <item row="5" column="0" >
+           <spacer name="verticalSpacer_2" >
+            <property name="orientation" >
+             <enum>Qt::Vertical</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>20</width>
+              <height>8</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_5" >
+      <attribute name="title" >
+       <string>Advanced</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_2" >
+       <item row="0" column="0" >
+        <widget class="QLabel" name="label_14" >
+         <property name="text" >
+          <string>Style Sheet:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1" >
+        <widget class="QLineEdit" name="userStyleSheet" />
+       </item>
+       <item row="1" column="1" >
+        <spacer name="verticalSpacer_3" >
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>20</width>
+           <height>176</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Settings</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Settings</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
--- a/demos/browser/ui_downloaditem.d	Wed May 20 21:06:33 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/********************************************************************************
-** Form generated from reading ui file 'downloaditem.ui'
-**
-** Created: Mon May 18 01:52:16 2009
-**      by: Qt User Interface Compiler version 4.5.0
-**
-** WARNING! All changes made in this file will be lost when recompiling ui file!
-********************************************************************************/
-
-import qt.core.QVariant;
-import qt.gui.QAction;
-import qt.gui.QApplication;
-import qt.gui.QButtonGroup;
-import qt.gui.QHBoxLayout;
-import qt.gui.QHeaderView;
-import qt.gui.QLabel;
-import qt.gui.QProgressBar;
-import qt.gui.QPushButton;
-import qt.gui.QSpacerItem;
-import qt.gui.QVBoxLayout;
-import qt.gui.QWidget;
-import squeezelabel;
-
-
-class Ui_DownloadItem
-{
-public:
-    QHBoxLayout horizontalLayout;
-    QLabel fileIcon;
-    QVBoxLayout verticalLayout_2;
-    SqueezeLabel fileNameLabel;
-    QProgressBar progressBar;
-    SqueezeLabel downloadInfoLabel;
-    QVBoxLayout verticalLayout;
-    QSpacerItem verticalSpacer;
-    QPushButton tryAgainButton;
-    QPushButton stopButton;
-    QPushButton openButton;
-    QSpacerItem verticalSpacer_2;
-
-    void setupUi(QWidget DownloadItem)
-    {
-        if (DownloadItem.objectName().isEmpty())
-            DownloadItem.setObjectName("DownloadItem");
-        DownloadItem.resize(423, 110);
-        horizontalLayout = new QHBoxLayout(DownloadItem);
-        horizontalLayout.setMargin(0);
-        horizontalLayout.setObjectName("horizontalLayout");
-        fileIcon = new QLabel(DownloadItem);
-        fileIcon.setObjectName("fileIcon");
-        QSizePolicy sizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum);
-        sizePolicy.setHorizontalStretch(0);
-        sizePolicy.setVerticalStretch(0);
-        sizePolicy.setHeightForWidth(fileIcon.sizePolicy().hasHeightForWidth());
-        fileIcon.setSizePolicy(sizePolicy);
-
-        horizontalLayout.addWidget(fileIcon);
-
-        verticalLayout_2 = new QVBoxLayout();
-        verticalLayout_2.setObjectName("verticalLayout_2"));
-        fileNameLabel = new SqueezeLabel(DownloadItem);
-        fileNameLabel.setObjectName("fileNameLabel"));
-        QSizePolicy sizePolicy1(QSizePolicy.Expanding, QSizePolicy.Preferred);
-        sizePolicy1.setHorizontalStretch(0);
-        sizePolicy1.setVerticalStretch(0);
-        sizePolicy1.setHeightForWidth(fileNameLabel.sizePolicy().hasHeightForWidth());
-        fileNameLabel.setSizePolicy(sizePolicy1);
-
-        verticalLayout_2.addWidget(fileNameLabel);
-
-        progressBar = new QProgressBar(DownloadItem);
-        progressBar.setObjectName("progressBar");
-        progressBar.setValue(0);
-
-        verticalLayout_2.addWidget(progressBar);
-
-        downloadInfoLabel = new SqueezeLabel(DownloadItem);
-        downloadInfoLabel.setObjectName("downloadInfoLabel"));
-        QSizePolicy sizePolicy2(QSizePolicy.Minimum, QSizePolicy.Preferred);
-        sizePolicy2.setHorizontalStretch(0);
-        sizePolicy2.setVerticalStretch(0);
-        sizePolicy2.setHeightForWidth(downloadInfoLabel.sizePolicy().hasHeightForWidth());
-        downloadInfoLabel.setSizePolicy(sizePolicy2);
-
-        verticalLayout_2.addWidget(downloadInfoLabel);
-
-
-        horizontalLayout.addLayout(verticalLayout_2);
-
-        verticalLayout = new QVBoxLayout();
-        verticalLayout.setObjectName("verticalLayout"));
-        verticalSpacer = new QSpacerItem(17, 1, QSizePolicy.Minimum, QSizePolicy.Expanding);
-
-        verticalLayout.addItem(verticalSpacer);
-
-        tryAgainButton = new QPushButton(DownloadItem);
-        tryAgainButton.setObjectName("tryAgainButton");
-        tryAgainButton.setEnabled(false);
-
-        verticalLayout.addWidget(tryAgainButton);
-
-        stopButton = new QPushButton(DownloadItem);
-        stopButton.setObjectName("stopButton");
-
-        verticalLayout.addWidget(stopButton);
-
-        openButton = new QPushButton(DownloadItem);
-        openButton.setObjectName("openButton");
-
-        verticalLayout.addWidget(openButton);
-
-        verticalSpacer_2 = new QSpacerItem(17, 5, QSizePolicy.Minimum, QSizePolicy.Expanding);
-
-        verticalLayout.addItem(verticalSpacer_2);
-
-
-        horizontalLayout.addLayout(verticalLayout);
-
-
-        retranslateUi(DownloadItem);
-
-        QMetaObject.connectSlotsByName(DownloadItem);
-    } // setupUi
-
-    void retranslateUi(QWidget DownloadItem)
-    {
-        DownloadItem.setWindowTitle(QApplication.translate("DownloadItem", "Form", 0, QApplication.UnicodeUTF8));
-        fileIcon.setText(QApplication.translate("DownloadItem", "Ico", 0, QApplication.UnicodeUTF8));
-        fileNameLabel.setProperty("text", QVariant(QApplication.translate("DownloadItem", "Filename", 0, QApplication.UnicodeUTF8)));
-        downloadInfoLabel.setProperty("text", QVariant(QString()));
-        tryAgainButton.setText(QApplication.translate("DownloadItem", "Try Again", 0, QApplication.UnicodeUTF8));
-        stopButton.setText(QApplication.translate("DownloadItem", "Stop", 0, QApplication.UnicodeUTF8));
-        openButton.setText(QApplication.translate("DownloadItem", "Open", 0, QApplication.UnicodeUTF8));
-        Q_UNUSED(DownloadItem);
-    } // retranslateUi
-
-}
-
-
-class DownloadItem: public Ui_DownloadItem {}