changeset 554:930462068dcc find

Start experimentally adding Find button/field
author Chris Cannam
date Mon, 20 Feb 2012 18:15:53 +0000
parents 9c8147c9f245
children a1d210c767ab
files easyhg.pro src/mainwindow.cpp src/mainwindow.h
diffstat 3 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/easyhg.pro	Fri Feb 17 10:58:41 2012 +0000
+++ b/easyhg.pro	Mon Feb 20 18:15:53 2012 +0000
@@ -65,7 +65,8 @@
     src/hgignoredialog.h \
     src/versiontester.h \
     src/squeezedlabel.h \
-    src/fswatcher.h
+    src/fswatcher.h \
+    src/findwidget.h
 SOURCES = \
     src/main.cpp \
     src/mainwindow.cpp \
@@ -103,7 +104,8 @@
     src/hgignoredialog.cpp \
     src/versiontester.cpp \
     src/squeezedlabel.cpp \
-    src/fswatcher.cpp
+    src/fswatcher.cpp \
+    src/findwidget.cpp
 
 macx-* {
     SOURCES += src/common_osx.mm
--- a/src/mainwindow.cpp	Fri Feb 17 10:58:41 2012 +0000
+++ b/src/mainwindow.cpp	Mon Feb 20 18:15:53 2012 +0000
@@ -53,6 +53,7 @@
 #include "hgignoredialog.h"
 #include "versiontester.h"
 #include "fswatcher.h"
+#include "findwidget.h"
 
 
 MainWindow::MainWindow(QString myDirPath) :
@@ -107,12 +108,15 @@
 #endif
 
     m_workStatus = new WorkStatusWidget(this);
-    cl->addWidget(m_workStatus, row++, 0);
+    cl->addWidget(m_workStatus, row, 0);
+
+    m_findWidget = new FindWidget(this);
+    cl->addWidget(m_findWidget, row++, 1, Qt::AlignRight | Qt::AlignTop);
 
     m_hgTabs = new HgTabWidget(central, m_workFolderPath);
     connectTabsSignals();
 
-    cl->addWidget(m_hgTabs, row++, 0);
+    cl->addWidget(m_hgTabs, row++, 0, 1, 2);
 
     connect(m_hgTabs, SIGNAL(selectionChanged()),
             this, SLOT(enableDisableActions()));
@@ -153,6 +157,11 @@
 }
 
 
+void MainWindow::resizeEvent(QResizeEvent *)
+{
+}
+
+
 QString MainWindow::getUserInfo() const
 {
     QSettings settings;
--- a/src/mainwindow.h	Fri Feb 17 10:58:41 2012 +0000
+++ b/src/mainwindow.h	Mon Feb 20 18:15:53 2012 +0000
@@ -36,6 +36,7 @@
 
 class WorkStatusWidget;
 class FsWatcher;
+class FindWidget;
 
 class MainWindow : public QMainWindow
 {
@@ -46,6 +47,7 @@
 
 protected:
     void closeEvent(QCloseEvent *event);
+    void resizeEvent(QResizeEvent *event);
 
 public slots:
     void open(QString local);
@@ -180,6 +182,7 @@
 
     WorkStatusWidget *m_workStatus;
     HgTabWidget *m_hgTabs;
+    FindWidget *m_findWidget;
 
     QString m_remoteRepoPath;
     QString m_workFolderPath;