overte/interface/src/ui/AttachmentsDialog.h
Andrzej Kapolka c424f6ce69 Save attachment data for attachment model/skeleton model combinations, let
scripts use those saved parameters so that you can tweak the location of
(for example) the gun and have it saved appropriately.
2014-05-08 18:00:41 -07:00

80 lines
1.6 KiB
C++

//
// AttachmentsDialog.h
// interface/src/ui
//
// Created by Andrzej Kapolka on 5/4/14.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_AttachmentsDialog_h
#define hifi_AttachmentsDialog_h
#include <QDialog>
#include <QFrame>
#include <AvatarData.h>
class QComboBox;
class QDoubleSpinner;
class QLineEdit;
class QVBoxLayout;
/// Allows users to edit the avatar attachments.
class AttachmentsDialog : public QDialog {
Q_OBJECT
public:
AttachmentsDialog();
virtual void setVisible(bool visible);
public slots:
void updateAttachmentData();
private slots:
void addAttachment(const AttachmentData& data = AttachmentData());
private:
QVBoxLayout* _attachments;
QPushButton* _ok;
};
/// A panel controlling a single attachment.
class AttachmentPanel : public QFrame {
Q_OBJECT
public:
AttachmentPanel(AttachmentsDialog* dialog, const AttachmentData& data = AttachmentData());
AttachmentData getAttachmentData() const;
private slots:
void chooseModelURL();
void setModelURL(const QString& url);
void modelURLChanged();
void updateAttachmentData();
private:
AttachmentsDialog* _dialog;
QLineEdit* _modelURL;
QComboBox* _jointName;
QDoubleSpinBox* _translationX;
QDoubleSpinBox* _translationY;
QDoubleSpinBox* _translationZ;
QDoubleSpinBox* _rotationX;
QDoubleSpinBox* _rotationY;
QDoubleSpinBox* _rotationZ;
QDoubleSpinBox* _scale;
};
#endif // hifi_AttachmentsDialog_h