Actualización de CMakeLists.txt y composeview (añadido getTableView, manejo de carpeta seleccionada, sync, delete, flag)
This commit is contained in:
+13
-2
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(WinoMailQt VERSION 1.0.0 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt6 COMPONENTS Core Gui Widgets Network Sql Test Concurrent REQUIRED)
|
||||
@@ -21,6 +21,14 @@ include_directories(${PROJECT_SOURCE_DIR}/src/services/gmail)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/services/outlook)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/services/imap)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/services/pop3)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/tags/include)
|
||||
# Tag library headers for moc
|
||||
set(TAG_HEADERS
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/tags/include/tags_line_edit.hpp
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/tags/include/tags_edit.hpp
|
||||
)
|
||||
qt6_wrap_cpp(TAG_MOCS ${TAG_HEADERS})
|
||||
|
||||
|
||||
# Source files
|
||||
set(SRC_FILES
|
||||
@@ -82,8 +90,11 @@ set(SRC_FILES
|
||||
src/ui/connectionwizard.cpp
|
||||
src/ui/connectionwizard.h
|
||||
src/syncscheduler.cpp
|
||||
thirdparty/tags/src/tags_line_edit.cpp
|
||||
thirdparty/tags/src/tags_edit.cpp
|
||||
thirdparty/tags/src/config.cpp
|
||||
${TAG_MOCS}
|
||||
)
|
||||
|
||||
# Executable
|
||||
add_executable(wino-mail-qt ${SRC_FILES})
|
||||
|
||||
|
||||
+30
-17
@@ -4,6 +4,12 @@
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include "tags_line_edit.hpp"
|
||||
#include <QRegularExpression>
|
||||
#include <QTimer>
|
||||
#include <QTextList>
|
||||
#include <QTextTable>
|
||||
@@ -282,25 +288,32 @@ void ComposeView::onSignatureClicked() {
|
||||
// handle any ComposeView-specific logic here if needed
|
||||
}
|
||||
|
||||
void ComposeView::onSignatureEditRequested() {
|
||||
// This slot will be connected to the "Edit Signature..." action in the menu
|
||||
// For now, we'll just show a simple input dialog
|
||||
QString currentSignature = "";
|
||||
// In a real implementation, we would get the current signature for the selected account
|
||||
// For now, we'll use an empty string
|
||||
|
||||
bool ok;
|
||||
QString newSignature = QInputDialog::getMultiLineText(this, "Edit Signature",
|
||||
"Enter your signature:",
|
||||
currentSignature, &ok);
|
||||
if (ok && !newSignature.isEmpty()) {
|
||||
// In a real implementation, we would save this signature for the selected account
|
||||
// For now, we'll just insert it at the cursor position
|
||||
QTextCursor cursor = m_bodyEditor->textCursor();
|
||||
cursor.insertHtml(newSignature);
|
||||
void ComposeView::onSignatureEditRequested()
|
||||
{
|
||||
QDialog dialog(this);
|
||||
dialog.setWindowTitle(tr("Edit Signature"));
|
||||
dialog.setMinimumSize(600, 400);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(&dialog);
|
||||
|
||||
RichTextEditor *editor = new RichTextEditor(&dialog);
|
||||
editor->setupToolbar(layout);
|
||||
layout->addWidget(editor);
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
|
||||
layout->addWidget(buttonBox);
|
||||
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
|
||||
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
QString signatureHtml = editor->toHtml();
|
||||
if (!signatureHtml.isEmpty()) {
|
||||
QTextCursor cursor = m_bodyEditor->textCursor();
|
||||
cursor.insertHtml(signatureHtml);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ComposeView::setAccountService(AccountService *service)
|
||||
{
|
||||
m_accountService = service;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <QComboBox>
|
||||
#include <QListWidget>
|
||||
#include "models/EmailCompositionModel.h"
|
||||
#include "tags_line_edit.hpp"
|
||||
#include "services/accountservice.h"
|
||||
|
||||
class AccountService;
|
||||
|
||||
Reference in New Issue
Block a user