mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site rewrite: create a dive site edit dialog without borders
Plan is to make it pretty later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
266e754d08
commit
32928b3880
4 changed files with 33 additions and 2 deletions
|
@ -226,3 +226,15 @@ void LocationInformationWidget::resetPallete()
|
||||||
ui.diveSiteName->setPalette(p);
|
ui.diveSiteName->setPalette(p);
|
||||||
ui.diveSiteNotes->setPalette(p);
|
ui.diveSiteNotes->setPalette(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SimpleDiveSiteEditDialog::SimpleDiveSiteEditDialog(QWidget *parent) :
|
||||||
|
QDialog(parent, Qt::FramelessWindowHint | Qt::WindowSystemMenuHint),
|
||||||
|
ui(new Ui::SimpleDiveSiteEditDialog())
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleDiveSiteEditDialog::~SimpleDiveSiteEditDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
|
@ -44,4 +44,16 @@ private:
|
||||||
mode current_mode;
|
mode current_mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#include "ui_simpledivesiteedit.h"
|
||||||
|
class SimpleDiveSiteEditDialog : public QDialog {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SimpleDiveSiteEditDialog(QWidget *parent);
|
||||||
|
virtual ~SimpleDiveSiteEditDialog();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::SimpleDiveSiteEditDialog *ui;
|
||||||
|
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "divecomputerextradatamodel.h"
|
#include "divecomputerextradatamodel.h"
|
||||||
#include "divelocationmodel.h"
|
#include "divelocationmodel.h"
|
||||||
#include "divesite.h"
|
#include "divesite.h"
|
||||||
|
#include "locationinformation.h"
|
||||||
|
|
||||||
#if defined(FBSUPPORT)
|
#if defined(FBSUPPORT)
|
||||||
#include "socialnetworks.h"
|
#include "socialnetworks.h"
|
||||||
|
@ -57,7 +58,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
||||||
ui.extraData->setModel(extraDataModel);
|
ui.extraData->setModel(extraDataModel);
|
||||||
closeMessage();
|
closeMessage();
|
||||||
|
|
||||||
connect(ui.addDiveSite, SIGNAL(clicked()), this, SIGNAL(requestDiveSiteAdd()));
|
connect(ui.addDiveSite, SIGNAL(clicked()), this, SLOT(showDiveSiteSimpleEdit()));
|
||||||
|
|
||||||
QAction *action = new QAction(tr("Apply changes"), this);
|
QAction *action = new QAction(tr("Apply changes"), this);
|
||||||
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
|
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
|
||||||
|
@ -237,6 +238,12 @@ void MainTab::setCurrentLocationIndex()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainTab::showDiveSiteSimpleEdit()
|
||||||
|
{
|
||||||
|
SimpleDiveSiteEditDialog dlg(this);
|
||||||
|
dlg.exec();
|
||||||
|
}
|
||||||
|
|
||||||
void MainTab::enableGeoLookupEdition()
|
void MainTab::enableGeoLookupEdition()
|
||||||
{
|
{
|
||||||
ui.waitingSpinner->stop();
|
ui.waitingSpinner->stop();
|
||||||
|
|
|
@ -56,7 +56,6 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void addDiveFinished();
|
void addDiveFinished();
|
||||||
void dateTimeChanged();
|
void dateTimeChanged();
|
||||||
void requestDiveSiteAdd();
|
|
||||||
void diveSiteChanged(uint32_t uuid);
|
void diveSiteChanged(uint32_t uuid);
|
||||||
public
|
public
|
||||||
slots:
|
slots:
|
||||||
|
@ -96,6 +95,7 @@ slots:
|
||||||
void enableGeoLookupEdition();
|
void enableGeoLookupEdition();
|
||||||
void disableGeoLookupEdition();
|
void disableGeoLookupEdition();
|
||||||
void setCurrentLocationIndex();
|
void setCurrentLocationIndex();
|
||||||
|
void showDiveSiteSimpleEdit();
|
||||||
private:
|
private:
|
||||||
Ui::MainTab ui;
|
Ui::MainTab ui;
|
||||||
WeightModel *weightModel;
|
WeightModel *weightModel;
|
||||||
|
|
Loading…
Add table
Reference in a new issue