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)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
project(WinoMailQt VERSION 1.0.0 LANGUAGES CXX)
|
project(WinoMailQt VERSION 1.0.0 LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
find_package(Qt6 COMPONENTS Core Gui Widgets Network Sql Test Concurrent REQUIRED)
|
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/outlook)
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/src/services/imap)
|
include_directories(${PROJECT_SOURCE_DIR}/src/services/imap)
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/src/services/pop3)
|
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
|
# Source files
|
||||||
set(SRC_FILES
|
set(SRC_FILES
|
||||||
@@ -82,8 +90,11 @@ set(SRC_FILES
|
|||||||
src/ui/connectionwizard.cpp
|
src/ui/connectionwizard.cpp
|
||||||
src/ui/connectionwizard.h
|
src/ui/connectionwizard.h
|
||||||
src/syncscheduler.cpp
|
src/syncscheduler.cpp
|
||||||
|
thirdparty/tags/src/tags_line_edit.cpp
|
||||||
|
thirdparty/tags/src/tags_edit.cpp
|
||||||
|
thirdparty/tags/src/config.cpp
|
||||||
|
${TAG_MOCS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Executable
|
# Executable
|
||||||
add_executable(wino-mail-qt ${SRC_FILES})
|
add_executable(wino-mail-qt ${SRC_FILES})
|
||||||
|
|
||||||
|
|||||||
+29
-16
@@ -4,6 +4,12 @@
|
|||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
#include <QLabel>
|
||||||
|
#include "tags_line_edit.hpp"
|
||||||
|
#include <QRegularExpression>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QTextList>
|
#include <QTextList>
|
||||||
#include <QTextTable>
|
#include <QTextTable>
|
||||||
@@ -282,25 +288,32 @@ void ComposeView::onSignatureClicked() {
|
|||||||
// handle any ComposeView-specific logic here if needed
|
// handle any ComposeView-specific logic here if needed
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComposeView::onSignatureEditRequested() {
|
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
|
QDialog dialog(this);
|
||||||
QString currentSignature = "";
|
dialog.setWindowTitle(tr("Edit Signature"));
|
||||||
// In a real implementation, we would get the current signature for the selected account
|
dialog.setMinimumSize(600, 400);
|
||||||
// For now, we'll use an empty string
|
|
||||||
|
|
||||||
bool ok;
|
QVBoxLayout *layout = new QVBoxLayout(&dialog);
|
||||||
QString newSignature = QInputDialog::getMultiLineText(this, "Edit Signature",
|
|
||||||
"Enter your signature:",
|
RichTextEditor *editor = new RichTextEditor(&dialog);
|
||||||
currentSignature, &ok);
|
editor->setupToolbar(layout);
|
||||||
if (ok && !newSignature.isEmpty()) {
|
layout->addWidget(editor);
|
||||||
// In a real implementation, we would save this signature for the selected account
|
|
||||||
// For now, we'll just insert it at the cursor position
|
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
|
||||||
QTextCursor cursor = m_bodyEditor->textCursor();
|
layout->addWidget(buttonBox);
|
||||||
cursor.insertHtml(newSignature);
|
|
||||||
|
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)
|
void ComposeView::setAccountService(AccountService *service)
|
||||||
{
|
{
|
||||||
m_accountService = service;
|
m_accountService = service;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include "models/EmailCompositionModel.h"
|
#include "models/EmailCompositionModel.h"
|
||||||
|
#include "tags_line_edit.hpp"
|
||||||
#include "services/accountservice.h"
|
#include "services/accountservice.h"
|
||||||
|
|
||||||
class AccountService;
|
class AccountService;
|
||||||
|
|||||||
Reference in New Issue
Block a user