mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Finish the cleanup of mainwindow.ui
This is the last patch in the series of clearing up the mainwindo.ui. Now to bugfixing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									4867ee8ad8
								
							
						
					
					
						commit
						194dd8bd97
					
				
					 8 changed files with 16 additions and 18 deletions
				
			
		|  | @ -14,6 +14,7 @@ | ||||||
| #include "divelistview.h" | #include "divelistview.h" | ||||||
| #include "display.h" | #include "display.h" | ||||||
| #include "profile/profilewidget2.h" | #include "profile/profilewidget2.h" | ||||||
|  | #include "diveplanner.h" | ||||||
| 
 | 
 | ||||||
| #if defined(FBSUPPORT) | #if defined(FBSUPPORT) | ||||||
| #include "socialnetworks.h" | #include "socialnetworks.h" | ||||||
|  |  | ||||||
|  | @ -24,6 +24,7 @@ | ||||||
| #include "profile/profilewidget2.h" | #include "profile/profilewidget2.h" | ||||||
| #include "globe.h" | #include "globe.h" | ||||||
| #include "maintab.h" | #include "maintab.h" | ||||||
|  | #include "diveplanner.h" | ||||||
| #ifndef NO_PRINTING | #ifndef NO_PRINTING | ||||||
| #include <QPrintDialog> | #include <QPrintDialog> | ||||||
| #include "printdialog.h" | #include "printdialog.h" | ||||||
|  | @ -92,7 +93,7 @@ MainWindow::MainWindow() : QMainWindow(), | ||||||
| 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), diveListView, SLOT(reloadHeaderActions())); | 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), diveListView, SLOT(reloadHeaderActions())); | ||||||
| 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), information(), SLOT(updateDiveInfo())); | 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), information(), SLOT(updateDiveInfo())); | ||||||
| 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerWidget(), SLOT(settingsChanged())); | 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerWidget(), SLOT(settingsChanged())); | ||||||
| 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.plannerSettingsWidget, SLOT(settingsChanged())); | 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerSettingsWidget(), SLOT(settingsChanged())); | ||||||
| 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), TankInfoModel::instance(), SLOT(update())); | 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), TankInfoModel::instance(), SLOT(update())); | ||||||
| 	connect(ui.actionRecent1, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); | 	connect(ui.actionRecent1, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); | ||||||
| 	connect(ui.actionRecent2, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); | 	connect(ui.actionRecent2, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); | ||||||
|  | @ -119,7 +120,7 @@ MainWindow::MainWindow() : QMainWindow(), | ||||||
| 	diveListView->expand(dive_list()->model()->index(0, 0)); | 	diveListView->expand(dive_list()->model()->index(0, 0)); | ||||||
| 	diveListView->scrollTo(dive_list()->model()->index(0, 0), QAbstractItemView::PositionAtCenter); | 	diveListView->scrollTo(dive_list()->model()->index(0, 0), QAbstractItemView::PositionAtCenter); | ||||||
| 	divePlannerWidget()->settingsChanged(); | 	divePlannerWidget()->settingsChanged(); | ||||||
| 	ui.plannerSettingsWidget->settingsChanged(); | 	divePlannerSettingsWidget()->settingsChanged(); | ||||||
| #ifdef NO_MARBLE | #ifdef NO_MARBLE | ||||||
| 	ui.globePane->hide(); | 	ui.globePane->hide(); | ||||||
| 	ui.menuView->removeAction(ui.actionViewGlobe); | 	ui.menuView->removeAction(ui.actionViewGlobe); | ||||||
|  | @ -188,6 +189,10 @@ PlannerDetails *MainWindow::plannerDetails() const { | ||||||
| 	return qobject_cast<PlannerDetails*>(applicationState["PlanDive"].bottomRight); | 	return qobject_cast<PlannerDetails*>(applicationState["PlanDive"].bottomRight); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() { | ||||||
|  | 	return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void MainWindow::setLoadedWithFiles(bool f) | void MainWindow::setLoadedWithFiles(bool f) | ||||||
| { | { | ||||||
| 	filesAsArguments = f; | 	filesAsArguments = f; | ||||||
|  | @ -212,7 +217,6 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList) | ||||||
| 	globe()->reload(); | 	globe()->reload(); | ||||||
| 	if (doRecreateDiveList) | 	if (doRecreateDiveList) | ||||||
| 		recreateDiveList(); | 		recreateDiveList(); | ||||||
| 	ui.diveListPane->setCurrentIndex(0); // switch to the dive list
 |  | ||||||
| #ifdef NO_MARBLE | #ifdef NO_MARBLE | ||||||
| 	ui.globePane->hide(); | 	ui.globePane->hide(); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -32,6 +32,8 @@ class UpdateManager; | ||||||
| class UserManual; | class UserManual; | ||||||
| class DivePlannerWidget; | class DivePlannerWidget; | ||||||
| class ProfileWidget2; | class ProfileWidget2; | ||||||
|  | class PlannerDetails; | ||||||
|  | class PlannerSettingsWidget; | ||||||
| class UndoBuffer; | class UndoBuffer; | ||||||
| 
 | 
 | ||||||
| enum MainWindowTitleFormat { | enum MainWindowTitleFormat { | ||||||
|  | @ -68,6 +70,8 @@ public: | ||||||
| 	DiveListView *dive_list(); | 	DiveListView *dive_list(); | ||||||
| 	GlobeGPS *globe(); | 	GlobeGPS *globe(); | ||||||
| 	DivePlannerWidget *divePlannerWidget(); | 	DivePlannerWidget *divePlannerWidget(); | ||||||
|  | 	PlannerSettingsWidget *divePlannerSettingsWidget(); | ||||||
|  | 
 | ||||||
| 	void showError(QString message); | 	void showError(QString message); | ||||||
| 	void setTitle(enum MainWindowTitleFormat format); | 	void setTitle(enum MainWindowTitleFormat format); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -32,15 +32,6 @@ | ||||||
|        <property name="orientation"> |        <property name="orientation"> | ||||||
|         <enum>Qt::Horizontal</enum> |         <enum>Qt::Horizontal</enum> | ||||||
|        </property> |        </property> | ||||||
|        <widget class="QStackedWidget" name="diveListPane"> |  | ||||||
|         <property name="currentIndex"> |  | ||||||
|          <number>1</number> |  | ||||||
|         </property> |  | ||||||
|         <widget class="QWidget" name="page_3"> |  | ||||||
|          <layout class="QVBoxLayout" name="diveListLayout"/> |  | ||||||
|         </widget> |  | ||||||
|         <widget class="PlannerSettingsWidget" name="plannerSettingsWidget"/> |  | ||||||
|        </widget> |  | ||||||
|       </widget> |       </widget> | ||||||
|      </widget> |      </widget> | ||||||
|     </item> |     </item> | ||||||
|  | @ -705,12 +696,6 @@ | ||||||
|    <header>kmessagewidget.h</header> |    <header>kmessagewidget.h</header> | ||||||
|    <container>1</container> |    <container>1</container> | ||||||
|   </customwidget> |   </customwidget> | ||||||
|   <customwidget> |  | ||||||
|    <class>PlannerSettingsWidget</class> |  | ||||||
|    <extends>QWidget</extends> |  | ||||||
|    <header>diveplanner.h</header> |  | ||||||
|    <container>1</container> |  | ||||||
|   </customwidget> |  | ||||||
|   <customwidget> |   <customwidget> | ||||||
|    <class>MultiFilter</class> |    <class>MultiFilter</class> | ||||||
|    <extends>QWidget</extends> |    <extends>QWidget</extends> | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <QCompleter> | #include <QCompleter> | ||||||
| #include <QKeyEvent> | #include <QKeyEvent> | ||||||
|  | #include <QTextDocument> | ||||||
| 
 | 
 | ||||||
| QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const | QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ | ||||||
| #include <QPicture> | #include <QPicture> | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #include <QPointer> | #include <QPointer> | ||||||
|  | #include <QTableView> | ||||||
| 
 | 
 | ||||||
| #include "mainwindow.h" | #include "mainwindow.h" | ||||||
| #include "printdialog.h" | #include "printdialog.h" | ||||||
|  |  | ||||||
|  | @ -11,6 +11,7 @@ | ||||||
| #include "mainwindow.h" | #include "mainwindow.h" | ||||||
| #include "maintab.h" | #include "maintab.h" | ||||||
| #include "profile/profilewidget2.h" | #include "profile/profilewidget2.h" | ||||||
|  | #include "diveplanner.h" | ||||||
| 
 | 
 | ||||||
| #include <QSettings> | #include <QSettings> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -13,6 +13,7 @@ | ||||||
| #include "divepicturewidget.h" | #include "divepicturewidget.h" | ||||||
| #include "models.h" | #include "models.h" | ||||||
| #include "maintab.h" | #include "maintab.h" | ||||||
|  | #include "diveplanner.h" | ||||||
| 
 | 
 | ||||||
| #include <libdivecomputer/parser.h> | #include <libdivecomputer/parser.h> | ||||||
| #include <QScrollBar> | #include <QScrollBar> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue