mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Random white space cleanup
Because I can. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2ec6303f50
commit
6ccb541f1d
13 changed files with 38 additions and 39 deletions
5
deco.h
5
deco.h
|
@ -5,9 +5,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern double tolerated_by_tissue[];
|
extern double tolerated_by_tissue[];
|
||||||
|
extern double buehlmann_N2_t_halflife[];
|
||||||
extern double buehlmann_N2_t_halflife[];
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
2
device.h
2
device.h
|
@ -9,7 +9,7 @@ extern "C" {
|
||||||
extern struct divecomputer *fake_dc(struct divecomputer* dc);
|
extern struct divecomputer *fake_dc(struct divecomputer* dc);
|
||||||
extern void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname);
|
extern void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname);
|
||||||
extern void call_for_each_dc(FILE *f, void (*callback)(FILE *, const char *, uint32_t,
|
extern void call_for_each_dc(FILE *f, void (*callback)(FILE *, const char *, uint32_t,
|
||||||
const char *, const char *, const char *));
|
const char *, const char *, const char *));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
class BuddyCompletionModel : public QStringListModel {
|
class BuddyCompletionModel : public QStringListModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static BuddyCompletionModel* instance();
|
static BuddyCompletionModel* instance();
|
||||||
void updateModel();
|
void updateModel();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class DiveComputerManagementDialog : public QDialog{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static DiveComputerManagementDialog *instance();
|
static DiveComputerManagementDialog *instance();
|
||||||
void update();
|
void update();
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ public slots:
|
||||||
void reject();
|
void reject();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit DiveComputerManagementDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
explicit DiveComputerManagementDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||||
Ui::DiveComputerManagementDialog ui;
|
Ui::DiveComputerManagementDialog ui;
|
||||||
DiveComputerModel *model;
|
DiveComputerModel *model;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -301,16 +301,16 @@ void DiveListView::selectionChanged(const QItemSelection& selected, const QItemS
|
||||||
void DiveListView::mergeDives()
|
void DiveListView::mergeDives()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct dive *dive, *maindive = NULL;
|
struct dive *dive, *maindive = NULL;
|
||||||
|
|
||||||
for_each_dive(i, dive) {
|
for_each_dive(i, dive) {
|
||||||
if (dive->selected) {
|
if (dive->selected) {
|
||||||
if (!maindive)
|
if (!maindive)
|
||||||
maindive = dive;
|
maindive = dive;
|
||||||
else
|
else
|
||||||
maindive = merge_two_dives(maindive, dive);
|
maindive = merge_two_dives(maindive, dive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mainWindow()->refreshDisplay();
|
mainWindow()->refreshDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ void DownloadFromDCWidget::reject()
|
||||||
QDialog::reject();
|
QDialog::reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadFromDCWidget::onDownloadThreadFinished()
|
void DownloadFromDCWidget::onFinished()
|
||||||
{
|
{
|
||||||
if (currentState == DOWNLOADING) {
|
if (currentState == DOWNLOADING) {
|
||||||
if (thread->error.isEmpty())
|
if (thread->error.isEmpty())
|
||||||
|
|
|
@ -99,10 +99,10 @@ class KMessageWidget : public QFrame
|
||||||
Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
|
Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
|
||||||
public:
|
public:
|
||||||
enum MessageType {
|
enum MessageType {
|
||||||
Positive,
|
Positive,
|
||||||
Information,
|
Information,
|
||||||
Warning,
|
Warning,
|
||||||
Error
|
Error
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -118,7 +118,7 @@ private:
|
||||||
void redrawProfile();
|
void redrawProfile();
|
||||||
void file_save();
|
void file_save();
|
||||||
void file_save_as();
|
void file_save_as();
|
||||||
void setupSplitters();
|
void setupSplitters();
|
||||||
};
|
};
|
||||||
|
|
||||||
MainWindow *mainWindow();
|
MainWindow *mainWindow();
|
||||||
|
|
|
@ -21,8 +21,8 @@ public:
|
||||||
explicit ComboBoxDelegate(QAbstractItemModel *model, QObject* parent = 0);
|
explicit ComboBoxDelegate(QAbstractItemModel *model, QObject* parent = 0);
|
||||||
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||||
virtual void setEditorData(QWidget* editor, const QModelIndex& index) const;
|
virtual void setEditorData(QWidget* editor, const QModelIndex& index) const;
|
||||||
virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||||
virtual bool eventFilter(QObject* object, QEvent* event);
|
virtual bool eventFilter(QObject* object, QEvent* event);
|
||||||
public slots:
|
public slots:
|
||||||
void testActivation(const QString& currString = QString());
|
void testActivation(const QString& currString = QString());
|
||||||
//HACK: try to get rid of this in the future.
|
//HACK: try to get rid of this in the future.
|
||||||
|
@ -37,7 +37,7 @@ class TankInfoDelegate : public ComboBoxDelegate{
|
||||||
public:
|
public:
|
||||||
explicit TankInfoDelegate(QObject* parent = 0);
|
explicit TankInfoDelegate(QObject* parent = 0);
|
||||||
virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
||||||
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||||
public slots:
|
public slots:
|
||||||
void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint);
|
void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint);
|
||||||
};
|
};
|
||||||
|
@ -47,7 +47,7 @@ class WSInfoDelegate : public ComboBoxDelegate{
|
||||||
public:
|
public:
|
||||||
explicit WSInfoDelegate(QObject* parent = 0);
|
explicit WSInfoDelegate(QObject* parent = 0);
|
||||||
virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
||||||
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||||
public slots:
|
public slots:
|
||||||
void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint);
|
void revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint);
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,8 +22,8 @@ class CleanerTableModel : public QAbstractTableModel{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CleanerTableModel();
|
CleanerTableModel();
|
||||||
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
|
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
|
||||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
protected:
|
protected:
|
||||||
void setHeaderDataStrings(const QStringList& headers);
|
void setHeaderDataStrings(const QStringList& headers);
|
||||||
private:
|
private:
|
||||||
|
@ -194,8 +194,8 @@ public:
|
||||||
enum Layout{TREE, LIST, CURRENT};
|
enum Layout{TREE, LIST, CURRENT};
|
||||||
|
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
DiveTripModel(QObject* parent = 0);
|
DiveTripModel(QObject* parent = 0);
|
||||||
Layout layout() const;
|
Layout layout() const;
|
||||||
void setLayout(Layout layout);
|
void setLayout(Layout layout);
|
||||||
|
|
||||||
|
|
|
@ -166,14 +166,14 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
||||||
profile->plot(dive, true);
|
profile->plot(dive, true);
|
||||||
QPixmap profilePm = QPixmap::grabWidget(profile); // Qt4
|
QPixmap profilePm = QPixmap::grabWidget(profile); // Qt4
|
||||||
painter.drawPixmap((scaledW + padW) * col,
|
painter.drawPixmap((scaledW + padW) * col,
|
||||||
(scaledH + padH) * row + yOffsetProfile,
|
(scaledH + padH) * row + yOffsetProfile,
|
||||||
profilePm);
|
profilePm);
|
||||||
// draw a table
|
// draw a table
|
||||||
model.setDive(dive);
|
model.setDive(dive);
|
||||||
QPixmap tablePm = QPixmap::grabWidget(table); // Qt4
|
QPixmap tablePm = QPixmap::grabWidget(table); // Qt4
|
||||||
painter.drawPixmap((scaledW + padW) * col,
|
painter.drawPixmap((scaledW + padW) * col,
|
||||||
(scaledH + padH) * row + yOffsetTable,
|
(scaledH + padH) * row + yOffsetTable,
|
||||||
tablePm);
|
tablePm);
|
||||||
col++;
|
col++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,8 +337,8 @@ void PrintLayout::printTable()
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
printer->newPage();
|
printer->newPage();
|
||||||
QRegion region(0, pageIndexes.at(i) - 1,
|
QRegion region(0, pageIndexes.at(i) - 1,
|
||||||
table.width(),
|
table.width(),
|
||||||
pageIndexes.at(i + 1) - pageIndexes.at(i) + 1);
|
pageIndexes.at(i + 1) - pageIndexes.at(i) + 1);
|
||||||
table.render(&painter, QPoint(0, 0), region);
|
table.render(&painter, QPoint(0, 0), region);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,11 +117,11 @@ private:
|
||||||
class GraphicsTextEditor : public QGraphicsTextItem{
|
class GraphicsTextEditor : public QGraphicsTextItem{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
GraphicsTextEditor(QGraphicsItem* parent = 0);
|
GraphicsTextEditor(QGraphicsItem* parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event);
|
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event);
|
||||||
virtual void keyReleaseEvent(QKeyEvent* event);
|
virtual void keyReleaseEvent(QKeyEvent* event);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void textChanged(const QString& text);
|
void textChanged(const QString& text);
|
||||||
|
|
|
@ -30,14 +30,14 @@ public:
|
||||||
void edit(const QModelIndex& index);
|
void edit(const QModelIndex& index);
|
||||||
QTableView *view();
|
QTableView *view();
|
||||||
protected:
|
protected:
|
||||||
virtual void showEvent(QShowEvent* );
|
virtual void showEvent(QShowEvent* );
|
||||||
virtual void resizeEvent(QResizeEvent* );
|
virtual void resizeEvent(QResizeEvent* );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void addButtonClicked();
|
void addButtonClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::TableView ui;
|
Ui::TableView ui;
|
||||||
QPushButton *plusBtn;
|
QPushButton *plusBtn;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue