mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Removed old Notepad
This commit is contained in:
parent
3843864ff9
commit
13efdf86d5
@ -55,7 +55,6 @@
|
||||
#include "widgets/FlagsWidget.h"
|
||||
#include "widgets/VisualNavbar.h"
|
||||
#include "widgets/Dashboard.h"
|
||||
#include "widgets/Notepad.h"
|
||||
#include "widgets/Sidebar.h"
|
||||
#include "widgets/SdbDock.h"
|
||||
#include "widgets/Omnibar.h"
|
||||
@ -222,7 +221,6 @@ void MainWindow::initUI()
|
||||
ADD_DOCK(StringsWidget, stringsDock, ui->actionStrings);
|
||||
ADD_DOCK(FlagsWidget, flagsDock, ui->actionFlags);
|
||||
ADD_DOCK(JupyterWidget, jupyterDock, ui->actionJupyter);
|
||||
ADD_DOCK(Notepad, notepadDock, ui->actionNotepad);
|
||||
ADD_DOCK(Dashboard, dashboardDock, ui->actionDashboard);
|
||||
ADD_DOCK(SdbDock, sdbDock, ui->actionSDBBrowser);
|
||||
ADD_DOCK(ClassesWidget, classesDock, ui->actionClasses);
|
||||
@ -338,12 +336,6 @@ void MainWindow::finalizeOpen()
|
||||
core->cmd("fs sections");
|
||||
refreshAll();
|
||||
|
||||
if (core->getNotes().isEmpty())
|
||||
{
|
||||
core->setNotes(tr("# Binary information\n\n") + core->cmd("i") +
|
||||
"\n" + core->cmd("ie") + "\n" + core->cmd("iM") + "\n");
|
||||
}
|
||||
|
||||
addOutput(tr(" > Finished, happy reversing :)"));
|
||||
// Add fortune message
|
||||
addOutput("\n" + core->cmd("fo"));
|
||||
@ -543,7 +535,6 @@ void MainWindow::restoreDocks()
|
||||
tabifyDockWidget(dashboardDock, importsDock);
|
||||
tabifyDockWidget(dashboardDock, exportsDock);
|
||||
tabifyDockWidget(dashboardDock, symbolsDock);
|
||||
tabifyDockWidget(dashboardDock, notepadDock);
|
||||
tabifyDockWidget(dashboardDock, classesDock);
|
||||
tabifyDockWidget(dashboardDock, resourcesDock);
|
||||
tabifyDockWidget(dashboardDock, vTablesDock);
|
||||
@ -581,7 +572,6 @@ void MainWindow::showDefaultDocks()
|
||||
consoleDock,
|
||||
importsDock,
|
||||
symbolsDock,
|
||||
notepadDock,
|
||||
graphDock,
|
||||
disassemblyDock,
|
||||
sidebarDock,
|
||||
@ -622,11 +612,6 @@ void MainWindow::resetToDefaultLayout()
|
||||
Core()->setMemoryWidgetPriority(CutterCore::MemoryWidgetType::Disassembly);
|
||||
}
|
||||
|
||||
void MainWindow::sendToNotepad(const QString &txt)
|
||||
{
|
||||
core->setNotes(core->getNotes() + "```\n" + txt + "\n```");
|
||||
}
|
||||
|
||||
void MainWindow::addOutput(const QString &msg)
|
||||
{
|
||||
consoleDock->addOutput(msg);
|
||||
|
@ -17,7 +17,6 @@
|
||||
class CutterCore;
|
||||
class Omnibar;
|
||||
class PreviewWidget;
|
||||
class Notepad;
|
||||
class Highlighter;
|
||||
class AsciiHighlighter;
|
||||
class VisualNavbar;
|
||||
@ -86,7 +85,6 @@ public:
|
||||
void setFilename(const QString &fn);
|
||||
void addOutput(const QString &msg);
|
||||
void addDebugOutput(const QString &msg);
|
||||
void sendToNotepad(const QString &txt);
|
||||
void refreshOmniBar(const QStringList &flags);
|
||||
|
||||
public slots:
|
||||
@ -166,7 +164,6 @@ private:
|
||||
|
||||
QList<QDockWidget *> dockWidgets;
|
||||
QMap<QAction *, QDockWidget *> dockWidgetActions;
|
||||
Notepad *notepadDock = nullptr;
|
||||
DisassemblyWidget *disassemblyDock = nullptr;
|
||||
SidebarWidget *sidebarDock = nullptr;
|
||||
HexdumpWidget *hexdumpDock = nullptr;
|
||||
|
@ -258,7 +258,6 @@ border-top: 0px;
|
||||
<addaction name="actionSections"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionComments"/>
|
||||
<addaction name="actionNotepad"/>
|
||||
<addaction name="actionConsole"/>
|
||||
<addaction name="actionJupyter"/>
|
||||
</widget>
|
||||
@ -856,19 +855,6 @@ QToolButton:pressed {
|
||||
<string>Show/Hide bottom pannel</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSend_to_Notepad">
|
||||
<property name="text">
|
||||
<string>Send to Notepad</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNotepad">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Notepad</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSDBBrowser">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
|
@ -1349,7 +1349,6 @@ void CutterCore::openProject(const QString &name)
|
||||
cmd("Po " + name);
|
||||
|
||||
QString notes = QString::fromUtf8(QByteArray::fromBase64(cmd("Pnj").toUtf8()));
|
||||
setNotes(notes);
|
||||
}
|
||||
|
||||
void CutterCore::saveProject(const QString &name)
|
||||
@ -1366,12 +1365,6 @@ bool CutterCore::isProjectNameValid(const QString &name)
|
||||
return regexp.exactMatch(name) && !name.endsWith(".zip") ;
|
||||
}
|
||||
|
||||
void CutterCore::setNotes(const QString ¬es)
|
||||
{
|
||||
this->notes = notes;
|
||||
emit notesChanged(this->notes);
|
||||
}
|
||||
|
||||
QList<DisassemblyLine> CutterCore::disassembleLines(RVA offset, int lines)
|
||||
{
|
||||
QJsonArray array = cmdj(QString("pdJ ") + QString::number(lines) + QString(" @ ") + QString::number(offset)).array();
|
||||
|
@ -349,9 +349,6 @@ public:
|
||||
|
||||
static bool isProjectNameValid(const QString &name);
|
||||
|
||||
const QString &getNotes() const { return notes; }
|
||||
void setNotes(const QString ¬es);
|
||||
|
||||
QList<RBinPluginDescription> getRBinPluginDescriptions(const QString &type = nullptr);
|
||||
|
||||
QList<FunctionDescription> getAllFunctions();
|
||||
|
@ -82,7 +82,6 @@ SOURCES += \
|
||||
widgets/FlagsWidget.cpp \
|
||||
widgets/FunctionsWidget.cpp \
|
||||
widgets/ImportsWidget.cpp \
|
||||
widgets/Notepad.cpp \
|
||||
widgets/Omnibar.cpp \
|
||||
widgets/PieView.cpp \
|
||||
widgets/RelocsWidget.cpp \
|
||||
@ -147,7 +146,6 @@ HEADERS += \
|
||||
widgets/FlagsWidget.h \
|
||||
widgets/FunctionsWidget.h \
|
||||
widgets/ImportsWidget.h \
|
||||
widgets/Notepad.h \
|
||||
widgets/Omnibar.h \
|
||||
widgets/PieView.h \
|
||||
widgets/RelocsWidget.h \
|
||||
@ -202,7 +200,6 @@ FORMS += \
|
||||
widgets/ExportsWidget.ui \
|
||||
widgets/FunctionsWidget.ui \
|
||||
widgets/ImportsWidget.ui \
|
||||
widgets/Notepad.ui \
|
||||
widgets/SdbDock.ui \
|
||||
widgets/RelocsWidget.ui \
|
||||
widgets/SectionsDock.ui \
|
||||
|
@ -4,9 +4,6 @@
|
||||
#include "dialogs/NewFileDialog.h"
|
||||
#include "utils/Helpers.h"
|
||||
|
||||
// TODO: remove us
|
||||
#include "widgets/Notepad.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QFileInfo>
|
||||
#include <QFileDialog>
|
||||
|
@ -712,14 +712,6 @@ QToolTip {
|
||||
<string>Hexdump side panel</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSend_to_Notepad">
|
||||
<property name="text">
|
||||
<string>Send to notepad</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Send to notepad</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFunctionsUndefine">
|
||||
<property name="text">
|
||||
<string>Undefine</string>
|
||||
|
@ -1,322 +0,0 @@
|
||||
#include "Notepad.h"
|
||||
#include "ui_Notepad.h"
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
#include "utils/MdHighlighter.h"
|
||||
#include "utils/Highlighter.h"
|
||||
#include "utils/SvgIconEngine.h"
|
||||
|
||||
#include <QPlainTextEdit>
|
||||
#include <QFont>
|
||||
#include <QDebug>
|
||||
#include <QFontDialog>
|
||||
#include <QTextCursor>
|
||||
#include <QMenu>
|
||||
|
||||
|
||||
Notepad::Notepad(MainWindow *main, QWidget *parent) :
|
||||
QDockWidget(parent),
|
||||
ui(new Ui::Notepad)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->undoButton->setIcon(QIcon(new SvgIconEngine(QString(":/img/icons/undo.svg"), palette().buttonText().color())));
|
||||
ui->redoButton->setIcon(QIcon(new SvgIconEngine(QString(":/img/icons/redo.svg"), palette().buttonText().color())));
|
||||
|
||||
// Radare core found in:
|
||||
this->main = main;
|
||||
|
||||
highlighter = new MdHighlighter(ui->notepadTextEdit->document());
|
||||
isFirstTime = true;
|
||||
this->notesTextEdit = ui->notepadTextEdit;
|
||||
|
||||
// Increase notes document inner margin
|
||||
QTextDocument *docu = this->notesTextEdit->document();
|
||||
docu->setDocumentMargin(10);
|
||||
|
||||
// Context menu
|
||||
ui->notepadTextEdit->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(ui->notepadTextEdit, SIGNAL(customContextMenuRequested(const QPoint &)),
|
||||
this, SLOT(showNotepadContextMenu(const QPoint &)));
|
||||
connect(ui->notepadTextEdit, SIGNAL(textChanged()), this, SLOT(textChanged()));
|
||||
|
||||
connect(CutterCore::getInstance(), SIGNAL(notesChanged(const QString &)), this, SLOT(updateNotes(const QString &)));
|
||||
|
||||
updateNotes(CutterCore::getInstance()->getNotes());
|
||||
}
|
||||
|
||||
Notepad::~Notepad() {}
|
||||
|
||||
void Notepad::on_fontButton_clicked()
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
QFont font = QFontDialog::getFont(&ok, ui->notepadTextEdit->font(), this) ;
|
||||
if (ok)
|
||||
{
|
||||
// the user clicked OK and font is set to the font the user selected
|
||||
//ui->notepadTextEdit->setFont(font);
|
||||
//ui->previewTextEdit->setFont(font);
|
||||
this->setFonts(font);
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::setFonts(QFont font)
|
||||
{
|
||||
ui->notepadTextEdit->setFont(font);
|
||||
}
|
||||
|
||||
void Notepad::on_boldButton_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
if (cursor.hasSelection())
|
||||
{
|
||||
QString text = cursor.selectedText();
|
||||
cursor.removeSelectedText();
|
||||
cursor.insertText("**" + text + "**");
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertText("****");
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_italicsButton_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
if (cursor.hasSelection())
|
||||
{
|
||||
QString text = cursor.selectedText();
|
||||
cursor.removeSelectedText();
|
||||
cursor.insertText("*" + text + "*");
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertText("**");
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_h1Button_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
if (cursor.hasSelection())
|
||||
{
|
||||
QString text = cursor.selectedText();
|
||||
cursor.removeSelectedText();
|
||||
cursor.insertText("# " + text);
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertText("# ");
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_h2Button_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
if (cursor.hasSelection())
|
||||
{
|
||||
QString text = cursor.selectedText();
|
||||
cursor.removeSelectedText();
|
||||
cursor.insertText("## " + text);
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertText("## ");
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_h3Button_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
if (cursor.hasSelection())
|
||||
{
|
||||
QString text = cursor.selectedText();
|
||||
cursor.removeSelectedText();
|
||||
cursor.insertText("### " + text);
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.insertText("### ");
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_undoButton_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
QTextDocument *doc = ui->notepadTextEdit->document();
|
||||
doc->undo();
|
||||
}
|
||||
|
||||
void Notepad::on_redoButton_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->notepadTextEdit->textCursor();
|
||||
QTextDocument *doc = ui->notepadTextEdit->document();
|
||||
doc->redo();
|
||||
}
|
||||
|
||||
void Notepad::on_searchEdit_returnPressed()
|
||||
{
|
||||
QString searchString = ui->searchEdit->text();
|
||||
QTextDocument *document = ui->notepadTextEdit->document();
|
||||
|
||||
if (isFirstTime == false)
|
||||
document->undo();
|
||||
|
||||
if (!searchString.isEmpty())
|
||||
{
|
||||
|
||||
QTextCursor highlightCursor(document);
|
||||
QTextCursor cursor(document);
|
||||
|
||||
cursor.beginEditBlock();
|
||||
|
||||
QTextCharFormat plainFormat(highlightCursor.charFormat());
|
||||
QTextCharFormat colorFormat = plainFormat;
|
||||
colorFormat.setForeground(Qt::red);
|
||||
|
||||
while (!highlightCursor.isNull() && !highlightCursor.atEnd())
|
||||
{
|
||||
highlightCursor = document->find(searchString, highlightCursor, QTextDocument::FindWholeWords);
|
||||
|
||||
if (!highlightCursor.isNull())
|
||||
{
|
||||
highlightCursor.movePosition(QTextCursor::WordRight,
|
||||
QTextCursor::KeepAnchor);
|
||||
highlightCursor.mergeCharFormat(colorFormat);
|
||||
}
|
||||
}
|
||||
|
||||
cursor.endEditBlock();
|
||||
isFirstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_searchEdit_textEdited(const QString &arg1)
|
||||
{
|
||||
Q_UNUSED(arg1);
|
||||
|
||||
QString searchString = ui->searchEdit->text();
|
||||
QTextDocument *document = ui->notepadTextEdit->document();
|
||||
|
||||
if (isFirstTime == false)
|
||||
document->undo();
|
||||
|
||||
if (!searchString.isEmpty())
|
||||
{
|
||||
|
||||
QTextCursor highlightCursor(document);
|
||||
QTextCursor cursor(document);
|
||||
|
||||
cursor.beginEditBlock();
|
||||
|
||||
QTextCharFormat plainFormat(highlightCursor.charFormat());
|
||||
QTextCharFormat colorFormat = plainFormat;
|
||||
colorFormat.setForeground(Qt::red);
|
||||
|
||||
while (!highlightCursor.isNull() && !highlightCursor.atEnd())
|
||||
{
|
||||
highlightCursor = document->find(searchString, highlightCursor);
|
||||
|
||||
if (!highlightCursor.isNull())
|
||||
{
|
||||
//highlightCursor.movePosition(QTextCursor::WordRight,
|
||||
// QTextCursor::KeepAnchor);
|
||||
highlightCursor.mergeCharFormat(colorFormat);
|
||||
}
|
||||
}
|
||||
|
||||
cursor.endEditBlock();
|
||||
isFirstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::on_searchEdit_textChanged(const QString &arg1)
|
||||
{
|
||||
Q_UNUSED(arg1);
|
||||
|
||||
QString searchString = ui->searchEdit->text();
|
||||
QTextDocument *document = ui->notepadTextEdit->document();
|
||||
|
||||
if (isFirstTime == false)
|
||||
document->undo();
|
||||
|
||||
if (!searchString.isEmpty())
|
||||
{
|
||||
|
||||
QTextCursor highlightCursor(document);
|
||||
QTextCursor cursor(document);
|
||||
|
||||
cursor.beginEditBlock();
|
||||
|
||||
QTextCharFormat plainFormat(highlightCursor.charFormat());
|
||||
QTextCharFormat colorFormat = plainFormat;
|
||||
colorFormat.setForeground(Qt::red);
|
||||
|
||||
while (!highlightCursor.isNull() && !highlightCursor.atEnd())
|
||||
{
|
||||
highlightCursor = document->find(searchString, highlightCursor);
|
||||
|
||||
if (!highlightCursor.isNull())
|
||||
{
|
||||
//highlightCursor.movePosition(QTextCursor::WordRight,
|
||||
// QTextCursor::KeepAnchor);
|
||||
highlightCursor.mergeCharFormat(colorFormat);
|
||||
}
|
||||
}
|
||||
|
||||
cursor.endEditBlock();
|
||||
isFirstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Notepad::showNotepadContextMenu(const QPoint &pt)
|
||||
{
|
||||
// Set Notepad popup menu
|
||||
QMenu *menu = ui->notepadTextEdit->createStandardContextMenu();
|
||||
QTextCursor cur = ui->notepadTextEdit->textCursor();
|
||||
QAction *first = menu->actions().at(0);
|
||||
|
||||
if (!cur.hasSelection())
|
||||
{
|
||||
cur.select(QTextCursor::WordUnderCursor);
|
||||
}
|
||||
|
||||
addr = cur.selectedText();
|
||||
|
||||
static const int maxLength = 20;
|
||||
if(addr.length() > maxLength)
|
||||
{
|
||||
addr = addr.left(maxLength-1) + "\u2026";
|
||||
}
|
||||
|
||||
ui->actionSeekToSelection->setText(tr("Seek to \"%1\"").arg(addr));
|
||||
|
||||
menu->insertAction(first, ui->actionSeekToSelection);
|
||||
menu->insertSeparator(first);
|
||||
ui->notepadTextEdit->setContextMenuPolicy(Qt::DefaultContextMenu);
|
||||
menu->exec(ui->notepadTextEdit->mapToGlobal(pt));
|
||||
delete menu;
|
||||
ui->notepadTextEdit->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
}
|
||||
|
||||
void Notepad::on_actionSeekToSelection_triggered()
|
||||
{
|
||||
Core()->seek(addr);
|
||||
}
|
||||
|
||||
void Notepad::updateNotes(const QString ¬es)
|
||||
{
|
||||
disconnect(ui->notepadTextEdit, SIGNAL(textChanged()), this, SLOT(textChanged()));
|
||||
ui->notepadTextEdit->setPlainText(notes);
|
||||
connect(ui->notepadTextEdit, SIGNAL(textChanged()), this, SLOT(textChanged()));
|
||||
}
|
||||
|
||||
void Notepad::textChanged()
|
||||
{
|
||||
CutterCore *core = CutterCore::getInstance();
|
||||
disconnect(core, SIGNAL(notesChanged(const QString &)), this, SLOT(updateNotes(const QString &)));
|
||||
core->setNotes(ui->notepadTextEdit->toPlainText());
|
||||
connect(core, SIGNAL(notesChanged(const QString &)), this, SLOT(updateNotes(const QString &)));
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
#ifndef NOTEPAD_H
|
||||
#define NOTEPAD_H
|
||||
|
||||
#include <memory>
|
||||
#include <QDockWidget>
|
||||
|
||||
class MainWindow;
|
||||
class MdHighlighter;
|
||||
class Highlighter;
|
||||
class QPlainTextEdit;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Notepad;
|
||||
}
|
||||
|
||||
class Notepad : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Notepad(MainWindow *main, QWidget *parent = 0);
|
||||
~Notepad();
|
||||
|
||||
void highlightPreview();
|
||||
|
||||
public slots:
|
||||
void setFonts(QFont font);
|
||||
|
||||
private slots:
|
||||
void on_fontButton_clicked();
|
||||
void on_boldButton_clicked();
|
||||
void on_italicsButton_clicked();
|
||||
|
||||
void on_h1Button_clicked();
|
||||
void on_h2Button_clicked();
|
||||
void on_h3Button_clicked();
|
||||
|
||||
void on_undoButton_clicked();
|
||||
void on_redoButton_clicked();
|
||||
|
||||
void on_searchEdit_returnPressed();
|
||||
void on_searchEdit_textEdited(const QString &arg1);
|
||||
void on_searchEdit_textChanged(const QString &arg1);
|
||||
|
||||
void showNotepadContextMenu(const QPoint &pt);
|
||||
|
||||
void on_actionSeekToSelection_triggered();
|
||||
|
||||
void updateNotes(const QString ¬es);
|
||||
void textChanged();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::Notepad> ui;
|
||||
MdHighlighter *highlighter;
|
||||
Highlighter *disasm_highlighter;
|
||||
bool isFirstTime;
|
||||
MainWindow *main;
|
||||
QString addr;
|
||||
QPlainTextEdit *notesTextEdit;
|
||||
};
|
||||
|
||||
#endif // NOTEPAD_H
|
@ -1,649 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Notepad</class>
|
||||
<widget class="QDockWidget" name="Notepad">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>783</width>
|
||||
<height>440</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"> QSplitter::handle:horizontal {
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
QSplitter::handle:vertical {
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
padding: 2px;
|
||||
/*color: darkgray;*/
|
||||
background-color: rgb(232, 232, 232);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
background-color: rgb(128, 128, 128);
|
||||
color: darkgray;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Notepad</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 7px;
|
||||
padding: 0 8px;
|
||||
/*
|
||||
background-color: rgb(240, 240, 240);
|
||||
color: rgb(48, 48, 48);
|
||||
*/</string>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Search</string>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="undoButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
QToolButton { /* all types of tool button */
|
||||
padding: 2px;
|
||||
background-color: palette(light);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
background-color: palette(dark);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/img/icons/undo.svg</normaloff>:/img/icons/undo.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="redoButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
padding: 2px;
|
||||
background-color: palette(light);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
background-color: palette(dark);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/img/icons/redo.svg</normaloff>:/img/icons/redo.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: #333;</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="boldButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">Bold</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
border: 5px solid #333;
|
||||
border-left: 10px solid #333;
|
||||
border-right: 10px solid #333;
|
||||
border-radius: 0px;
|
||||
background-color: #333;
|
||||
color: rgb(172, 174, 175);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border: 5px solid #444;
|
||||
border-radius: 0px;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
border: 5px solid #2180a9;
|
||||
border-radius: 0px;
|
||||
background-color: #2180a9;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">B</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="italicsButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">Italics</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
border: 5px solid #333;
|
||||
border-left: 10px solid #333;
|
||||
border-right: 10px solid #333;
|
||||
border-radius: 0px;
|
||||
background-color: #333;
|
||||
color: rgb(172, 174, 175);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border: 5px solid #444;
|
||||
border-radius: 0px;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
border: 5px solid #2180a9;
|
||||
border-radius: 0px;
|
||||
background-color: #2180a9;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">I</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="h1Button">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">Title 1</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
border: 5px solid #333;
|
||||
border-left: 10px solid #333;
|
||||
border-right: 10px solid #333;
|
||||
border-radius: 0px;
|
||||
background-color: #333;
|
||||
color: rgb(172, 174, 175);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border: 5px solid #444;
|
||||
border-radius: 0px;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
border: 5px solid #2180a9;
|
||||
border-radius: 0px;
|
||||
background-color: #2180a9;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>H1</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="h2Button">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">Title 2</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
border: 5px solid #333;
|
||||
border-left: 10px solid #333;
|
||||
border-right: 10px solid #333;
|
||||
border-radius: 0px;
|
||||
background-color: #333;
|
||||
color: rgb(172, 174, 175);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border: 5px solid #444;
|
||||
border-radius: 0px;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
border: 5px solid #2180a9;
|
||||
border-radius: 0px;
|
||||
background-color: #2180a9;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>H2</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="h3Button">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">Title 3</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
border: 5px solid #333;
|
||||
border-left: 10px solid #333;
|
||||
border-right: 10px solid #333;
|
||||
border-radius: 0px;
|
||||
background-color: #333;
|
||||
color: rgb(172, 174, 175);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border: 5px solid #444;
|
||||
border-radius: 0px;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
border: 5px solid #2180a9;
|
||||
border-radius: 0px;
|
||||
background-color: #2180a9;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>H3</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="fontButton">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Big Caslon</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">Change font</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton { /* all types of tool button */
|
||||
border: 5px solid #333;
|
||||
border-left: 10px solid #333;
|
||||
border-right: 10px solid #333;
|
||||
border-radius: 0px;
|
||||
background-color: #333;
|
||||
color: rgb(172, 174, 175);
|
||||
}
|
||||
|
||||
QToolButton:hover {
|
||||
border: 5px solid #444;
|
||||
border-radius: 0px;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
QToolButton:pressed {
|
||||
border: 5px solid #2180a9;
|
||||
border-radius: 0px;
|
||||
background-color: #2180a9;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
background-color: #444;
|
||||
border: 3px solid #444;
|
||||
color: rgb(232, 232, 232);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="notepadTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Monaco</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="lineWrapMode">
|
||||
<enum>QPlainTextEdit::NoWrap</enum>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<action name="actionSeekToSelection">
|
||||
<property name="text">
|
||||
<string>Seek to</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user