This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font: 10pt black "Verdana"; | |
} | |
#ToDoAppsClass { | |
background-color: #003049; | |
} | |
#ToDoAppsClass #TitleBarFrame { | |
background-color: #9ed9f8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ToDoApps::SlotDeleteTask() { | |
// Get the sender widget | |
QPushButton* fromButton = (QPushButton*)sender(); | |
// Get the widget referenced in the property | |
QVariant var; | |
var = fromButton->property("CurrentTask"); | |
QFrame* taskHBox = qvariant_cast<QFrame*>(var); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the part where widget created using code / the reference is in .ui file | |
void ToDoApps::createNewTask(QString taskName, QString date) { | |
{ | |
// The hierarchy of this widget will be like this | |
/* | |
+ Hframe (Frame) | |
+ Vframe (Frame) | |
+ titlelabel (Label) | |
+ tasklabel (Label) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ToDoApps::SlotAddNewTask() { | |
// Get the line edit text | |
QString taskName = ui.NewTaskLineEdit->text(); | |
// Get current date | |
QString date = QDate::currentDate().toString(); | |
createNewTask(taskName, date); | |
// This is how to trigger signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ToDoApps::initStylesheet() { | |
// You have to create the css file first in the main project directory | |
// Get the css file | |
QFile style("style_Generic.css"); | |
bool ok = style.open(QFile::ReadOnly); | |
QString s = QString::fromLatin1(style.readAll()); | |
setStyleSheet(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ToDoApps::ToDoApps(QWidget *parent) | |
: QWidget(parent) | |
{ | |
ui.setupUi(this); | |
// Set stylesheet | |
initStylesheet(); | |
// Connect the add new task button | |
connect(ui.AddNewBtn, SIGNAL(clicked()), this, SLOT(SlotAddNewTask())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <QtWidgets/QWidget> | |
#include "ui_ToDoApps.h" | |
#include <QDate> | |
#include <QDir> | |
class ToDoApps : public QWidget | |
{ | |
Q_OBJECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine.Internal; | |
using UnityEngine; | |
using System.Runtime.Serialization; | |
using System.Xml.Serialization; | |
/// <summary> | |
/// Quaternions are used to represent rotations. | |
/// A custom completely managed implementation of UnityEngine.Quaternion | |
/// Base is decompiled UnityEngine.Quaternion |