mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Clean up yearly statistics
Remove the unused upper widget, set a somewhat random but at least more reasonable default size and finally support Ctrl-W and Ctrl-Q shortcuts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									d5d7fdc9af
								
							
						
					
					
						commit
						f5bea8fcfd
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -552,14 +552,16 @@ void MainWindow::on_actionAutoGroup_triggered() | |||
| void MainWindow::on_actionYearlyStatistics_triggered() | ||||
| { | ||||
| 	QDialog d; | ||||
| 	YearlyStatisticsWidget *newView = new YearlyStatisticsWidget(); | ||||
| 	QVBoxLayout *l = new QVBoxLayout(&d); | ||||
| 	l->addWidget(newView); | ||||
| 	YearlyStatisticsModel *m = new YearlyStatisticsModel(); | ||||
| 	QTreeView *view = new QTreeView(); | ||||
| 	view->setModel(m); | ||||
| 	newView->setModel(m); | ||||
| 	l->addWidget(view); | ||||
| 	d.resize(width() * .8, height() / 2); | ||||
| 	QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), &d); | ||||
| 	connect(close, SIGNAL(activated()), &d, SLOT(close())); | ||||
| 	QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), &d); | ||||
| 	connect(quit, SIGNAL(activated()), this, SLOT(close())); | ||||
| 	d.exec(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue