Skip to content

Commit

Permalink
Ui: add generic dialog
Browse files Browse the repository at this point in the history
Ref: #325
  • Loading branch information
rodlie committed Nov 24, 2024
1 parent c15527e commit 5aec42c
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set(
dialogs/adjustscenedialog.cpp
dialogs/applyexpressiondialog.cpp
dialogs/commandpalette.cpp
dialogs/dialog.cpp
dialogs/durationrectsettingsdialog.cpp
dialogs/exportsvgdialog.cpp
dialogs/markereditordialog.cpp
Expand Down Expand Up @@ -116,6 +117,7 @@ set(
dialogs/adjustscenedialog.h
dialogs/applyexpressiondialog.h
dialogs/commandpalette.h
dialogs/dialog.h
dialogs/durationrectsettingsdialog.h
dialogs/exportsvgdialog.h
dialogs/markereditordialog.h
Expand Down
34 changes: 34 additions & 0 deletions src/ui/dialogs/dialog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
#
# Friction - https://friction.graphics
#
# Copyright (c) Ole-André Rodlie and contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# See 'README.md' for more information.
#
*/

#include "dialog.h"

using namespace Friction::Ui;

Dialog::Dialog(QWidget *parent)
: QDialog(parent)
{
#ifdef Q_OS_MAC
setWindowFlag(Qt::Tool);
#endif
}
44 changes: 44 additions & 0 deletions src/ui/dialogs/dialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
#
# Friction - https://friction.graphics
#
# Copyright (c) Ole-André Rodlie and contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# See 'README.md' for more information.
#
*/

#ifndef DIALOG_H
#define DIALOG_H

#include "ui_global.h"

#include <QDialog>

namespace Friction
{
namespace Ui
{
class UI_EXPORT Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = nullptr);
};
}
}

#endif // DIALOG_H

0 comments on commit 5aec42c

Please sign in to comment.